TokenLab MCP Server
by hedging8563io.github.hedging8563/tokenlabv0.6.26
TokenLab AI gateway: model and price discovery plus OpenAI-compatible Chat Completions, Responses, Anthropic Messages and Gemini inference.
context tax
queued
security
queued
cold start
queued
freshness
Active7d ago
Install TokenLab MCP server
Install in Claude Code
claude mcp add tokenlabai -e TOKENLAB_API_KEY='<tokenlab-api-key>' -e TOKENLAB_MANAGEMENT_TOKEN='<tokenlab-management-token>' -- npx -y @tokenlabai/mcp-serverInstall in Cursor
{
"mcpServers": {
"tokenlabai": {
"command": "npx",
"args": [
"-y",
"@tokenlabai/mcp-server"
],
"env": {
"TOKENLAB_API_KEY": "<tokenlab-api-key>",
"TOKENLAB_MANAGEMENT_TOKEN": "<tokenlab-management-token>"
}
}
}
}Add to ~/.cursor/mcp.json (global) or .cursor/mcp.json (project).
Install in Claude Desktop
{
"mcpServers": {
"tokenlabai": {
"command": "npx",
"args": [
"-y",
"@tokenlabai/mcp-server"
],
"env": {
"TOKENLAB_API_KEY": "<tokenlab-api-key>",
"TOKENLAB_MANAGEMENT_TOKEN": "<tokenlab-management-token>"
}
}
}
}Settings → Developer → Edit Config (claude_desktop_config.json), then restart.
Install in VS Code
{
"servers": {
"tokenlabai": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@tokenlabai/mcp-server"
],
"env": {
"TOKENLAB_API_KEY": "<tokenlab-api-key>",
"TOKENLAB_MANAGEMENT_TOKEN": "<tokenlab-management-token>"
}
}
}
}Add to .vscode/mcp.json in your workspace.
Install in Windsurf
{
"mcpServers": {
"tokenlabai": {
"command": "npx",
"args": [
"-y",
"@tokenlabai/mcp-server"
],
"env": {
"TOKENLAB_API_KEY": "<tokenlab-api-key>",
"TOKENLAB_MANAGEMENT_TOKEN": "<tokenlab-management-token>"
}
}
}
}Add to ~/.codeium/windsurf/mcp_config.json.
Configuration
| Variable | Required | Secret | Description |
|---|---|---|---|
| TOKENLAB_API_BASE | — | — | Optional TokenLab API base URL. Defaults to https://api.tokenlab.sh. |
| TOKENLAB_API_KEY | — | yes | Optional TokenLab API key. Required for LLM inference, multimodal generation, async task, embedding, rerank, and translation tools. |
| TOKENLAB_REQUEST_TIMEOUT_MS | — | — | Optional request timeout in milliseconds. Defaults to 120000. |
| TOKENLAB_MCP_TOOL_PROFILE | — | — | Optional generated tool profile: catalog, core (default), or full. |
| TOKENLAB_MCP_SCHEMA_MODE | — | — | Optional tool schema mode: portable, exact, or strict. Defaults to the selected profile's tested mode. |
| TOKENLAB_MCP_MAX_FILE_BYTES | — | — | Optional maximum local upload size per file. Defaults to 104857600 bytes. |
| TOKENLAB_MCP_INLINE_BYTES | — | — | Optional maximum response size returned inline. Defaults to 2097152 bytes. |
| TOKENLAB_ARTIFACT_DIR | — | — | Optional local directory for response artifacts that are not returned inline. |
| TOKENLAB_MANAGEMENT_TOKEN | — | yes | Optional workspace Management Token (mt-...) for webhook tools in the full profile. Separate from inference API keys; never put it in tool arguments. |
Freshness
Active — last maintenance signal 7d ago. The newest of the signals below sets the band.
Last commit (default branch)
2026-10-02 · 7d ago · GitHub
Latest release
2026-10-02 · 7d ago · GitHub · v0.6.26
Package published
no data · npm/PyPI
Registry entry updated
2026-10-02 · 7d ago · official registry · v0.6.26
FAQ
›How do I install the TokenLab MCP server in Claude Code?
Run: claude mcp add tokenlabai -e TOKENLAB_API_KEY='<tokenlab-api-key>' -e TOKENLAB_MANAGEMENT_TOKEN='<tokenlab-management-token>' -- npx -y @tokenlabai/mcp-server. For Cursor, VS Code, Claude Desktop and Windsurf, use the install tabs above.
›Does TokenLab require an API key?
Yes. It expects TOKENLAB_API_KEY, TOKENLAB_MANAGEMENT_TOKEN, of which 2 are secrets.
›Can I use TokenLab as a remote (hosted) MCP server?
No hosted endpoint is published; it runs locally over stdio.
›Is TokenLab in the official MCP registry?
Yes, as io.github.hedging8563/tokenlab.
Alternatives to TokenLab
Other ai & llm tools MCP servers.