Tokenlab MCP Server logo

Tokenlab MCP Server

by hedging8563

Connects MCP agents to TokenLab for model discovery, pricing, multimodal generation, inference, files, embeddings, and async tasks.

Install Tokenlab MCP Server

Pick your client, then add it in one click or paste the config.

STDIONode.js
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "hedging8563-tokenlab-mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "@tokenlabai/mcp-server"
      ],
      "env": {
        "TOKENLAB_API_BASE": "YOUR_VALUE_HERE",
        "TOKENLAB_API_KEY": "YOUR_VALUE_HERE",
        "TOKENLAB_MCP_TOOL_PROFILE": "YOUR_VALUE_HERE",
        "TOKENLAB_MCP_SCHEMA_MODE": "YOUR_VALUE_HERE",
        "TOKENLAB_REQUEST_TIMEOUT_MS": "YOUR_VALUE_HERE",
        "TOKENLAB_MCP_MAX_FILE_BYTES": "YOUR_VALUE_HERE",
        "TOKENLAB_MCP_INLINE_BYTES": "YOUR_VALUE_HERE",
        "TOKENLAB_ARTIFACT_DIR": "YOUR_VALUE_HERE"
      }
    }
  }
}

Settings → Developer → Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.

Values are written into the snippet above so you can paste it as is. They never leave your browser.

Install not yet sandbox-tested— the server itself is confirmed live (we called its tools/list endpoint). The stdio install command is a separate, ongoing check.

Overview

hedging8563/tokenlab-mcp-server exposes TokenLab’s model catalog, pricing data, native inference APIs, media generation, file operations, embeddings, reranking, translation, and task management through MCP tools. Public discovery and pricing calls work without credentials, while inference and other developer operations use an optional TokenLab API key. Choose it when an agent needs current model capabilities and prices before making requests, or when one MCP connection should cover text, image, audio, video, music, and 3D workflows. Its catalog, core, and full profiles let operators control the size and scope of the published tool set.

Use cases

  • Inspect model capabilities before constructing a native request
  • Compare provider pricing for candidate models
  • Generate and poll video, music, or 3D tasks
  • Run multimodal inference and embedding workflows
  • Manage files used by TokenLab-compatible requests

Key features

  • Model discovery and pricing comparison
  • OpenAI, Anthropic, and Gemini request formats
  • Image, audio, video, music, and 3D generation
  • Asynchronous task polling and supported cancellation
  • Embeddings, reranking, translation, and file operations
  • Configurable catalog, core, and full tool profiles

Tools31

What Tokenlab MCP Server lets your agent do. Expand a tool for its parameters.

Verified live~12.2k tokens of context

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked 3d ago

Recent health check succeeded.

22/22 checks healthy over the last 92d

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 5d ago via OSV.dev · @tokenlabai/mcp-server (npm)

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars1Stargazers on the source repository.
npm downloads3.6kPackage downloads in the last 30 days.
Last commit5d agoMost recent push to the default branch.
Tools exposed31Callable tools this server registers over MCP.
Directory activity5 viewsConfig copies, upvotes, and views on AllMCPs.

How Tokenlab MCP Server works

What hedging8563/tokenlab-mcp-server does

hedging8563/tokenlab-mcp-server connects MCP clients to TokenLab’s public model directory and developer API. Agents can inspect available models, retrieve model-specific capabilities and pricing, compare several models, and list public prices with provider or tag filters. Catalog operations are available without an API key.

Credentialed operations cover OpenAI-compatible Chat Completions, the OpenAI Responses API, Anthropic Messages, and Gemini GenerateContent. Additional tools support image creation and editing, speech synthesis, transcription, audio translation, text translation, embeddings, multimodal embeddings, document reranking, and file upload, listing, retrieval, and deletion. Video, music, and 3D generation are represented as asynchronous jobs.

How it works

The server is generated from TokenLab’s public OpenAPI contract with an MCP-specific overlay. It preserves native request shapes instead of converting every provider to one shared prompt format. Gemini fields use the API’s camelCase representation, while the server validates calls against the full generated schema before sending requests.

Three exposure profiles control the published tool set:

  • catalog provides the smallest public discovery and pricing surface.
  • core is the default and includes catalog, inference, media, task, file, embedding, reranking, and translation operations.
  • full exposes the broader allowlisted developer API, including additional lifecycle and batch operations.

Responses include structured MCP content alongside serialized text. Media creation returns a normalized delivery summary. When a request is asynchronous, the response supplies a task ID and usually a polling URL; call get_task_status until the task reaches a terminal state. The server also publishes resources for the live API overview, OpenAPI snapshot, and compact MCP contract, plus prompts that help agents select models and build requests.

Setup and configuration

Install from npm with npx -y @tokenlabai/mcp-server, or install the package and run npm start. The server can also run in Docker and communicates over standard input and output. A typical client configuration sets TOKENLAB_API_BASE, which defaults to https://api.tokenlab.sh.

Set TOKENLAB_API_KEY for inference, media generation, asynchronous tasks, embeddings, reranking, decisions, and translation. Select the published surface with TOKENLAB_MCP_TOOL_PROFILE. TOKENLAB_MCP_SCHEMA_MODE accepts portable, exact, or strict; portable is the tested default for the selected profile, while exact publishes complete nested schemas and strict targets clients requiring explicit required properties and closed objects.

TOKENLAB_REQUEST_TIMEOUT_MS controls request timeouts. TOKENLAB_MCP_MAX_FILE_BYTES limits local uploads, and TOKENLAB_MCP_INLINE_BYTES controls how much binary or JSON output is returned inline. Larger responses are written to TOKENLAB_ARTIFACT_DIR, which defaults to a temporary tokenlab-mcp directory.

Tools and capabilities

  • Discover models with list_models and inspect individual model support with get_model.
  • Read prices using get_pricing or get_model_pricing, and compare several models with compare_models.
  • Send requests through Chat Completions, Responses, Anthropic Messages, or Gemini GenerateContent.
  • Generate or edit images and create speech, transcriptions, translations, video, music, and 3D jobs.
  • Create and poll asynchronous tasks, including cancellation for supported queued Seedance video jobs.
  • Upload, enumerate, retrieve, and delete TokenLab-compatible files.
  • Create text or multimodal embeddings and rerank documents.

Limitations and notes

Realtime and streaming-only operations are excluded because stdio MCP calls return one final result. Requests that accept streaming are internally fixed to non-streaming behavior. Video, music, and 3D creation always run asynchronously; image operations may be synchronous or asynchronous depending on the selected model, so clients should inspect the delivery mode rather than assume an immediate result.

Multipart tools accept local file paths. Small audio and image results can be returned as native MCP content, while larger or other binary results are stored as artifacts. For inline Chat Completions images, use byte-accurate PNG, JPEG, WebP, or GIF data URLs. Recognized images labeled as generic octet-stream are corrected, but unrecognized generic binary image data is rejected before a billable request.

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Tokenlab MCP Server

hedging8563/tokenlab-mcp-server is an MCP server that connects agents to TokenLab’s model catalog and developer API. Its main tools cover model discovery, pricing, OpenAI-compatible chat and Responses requests, Anthropic Messages, Gemini content generation, media creation, files, embeddings, reranking, translation, and asynchronous task polling.

Install it with `npx -y @tokenlabai/mcp-server`, or clone and run `npm install` followed by `npm start`. It can also run from Docker with an interactive standard-input connection.

No, public model discovery and pricing tools work without a key. Set `TOKENLAB_API_KEY` when using inference, media generation, asynchronous tasks, embeddings, reranking, decisions, or translation.

Set `TOKENLAB_MCP_TOOL_PROFILE` to `catalog`, `core`, or `full`. `core` is the default; `catalog` limits exposure to public discovery and pricing, while `full` exposes the broader allowlisted developer API.

Call `get_task_status` with the task ID returned by the creation tool, preferably using the returned `poll_url`. Continue polling until the delivery summary reports a terminal result.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewTokenlab MCP Server AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/hedging8563-tokenlab-mcp-server?style=directory)](https://allmcps.com/mcp/hedging8563-tokenlab-mcp-server)
HTML Embed
<a href="https://allmcps.com/mcp/hedging8563-tokenlab-mcp-server"><img src="https://allmcps.com/api/badge/hedging8563-tokenlab-mcp-server?style=directory" alt="Tokenlab MCP Server on AllMCPs" /></a>