# hedging8563/tokenlab-mcp-server [Health: Active]

**Category:** 🔗 Aggregators  
**Repository:** https://github.com/hedging8563/tokenlab-mcp-server  
**GitHub Stars:** 0  
**npm Downloads (last month):** 680  
**Views:** 3  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/hedging8563-tokenlab-mcp-server

## Description
TokenLab AI gateway MCP server for model and pricing discovery, OpenAI-compatible Chat Completions, and native Responses, Anthropic Messages, and Gemini inference. Catalog tools require no API key; inference tools use an optional TokenLab key.

## Tools
Capabilities this server exposes over MCP:

- **cancel_task** — Cancel async task Cancels a queued asynchronous task when cancellation is supported for the selected task. Cancellation currently supports queued Seedance video tasks (`seedance-1.5-pro`, `seedance-2.0`, and `seedance-2.0-fast`) while they are still waiting to run. Tasks that are already processing, completed, failed, expired, or unsupported are not cancelled.
- **create_3d_model** — Create 3D model generation task Creates a 3D model generation task using Tripo3D. Returns a task ID for polling.
- **create_anthropic_message** — Create message (Anthropic-compatible) Creates a model response using Anthropic's native request format. Supports Claude models with vision and streaming. **Authentication:** Use `x-api-key` header or `Authorization: Bearer` header.
- **create_chat_completion** — Create an OpenAI-compatible chat completion. For inline image_url data URLs, declare the byte-accurate image MIME type. The MCP boundary corrects recognized PNG, JPEG, WebP, and GIF payloads declared as application/octet-stream and rejects unrecognized generic binary image payloads before sending a billable request.
- **create_embedding** — Create embeddings Creates an embedding vector representing the input text.
- **create_gemini_content** — Generate content (Gemini-compatible) Generates content using the native Gemini GenerateContent shape. This route is exposed only when the model details advertise Gemini requests and a same-protocol route is currently available. ProtoJSON lowerCamelCase and original proto snake_case field names are preserved. Unknown fields are forwarded best-effort and support is determined by the selected provider. **Authentication:** Use `?key=` query parameter, `x-goog-api-key` header, or `Authorization: Bearer` header.
- **create_image** — Create image Creates an image given a prompt.
- **create_image_file** — Create image Creates an image given a prompt.
- **create_multimodal_embedding** — Create multimodal embeddings Creates embeddings for multimodal input items. Text input is generally available; image input may require feature enablement.
- **create_music** — Create music generation task Creates a music generation task using Suno. Returns a task ID for polling.
- **create_response** — Create response (OpenAI Responses API) Creates a response using the native OpenAI Responses API shape. The model details must advertise the Responses request format and a same-protocol route must be currently available; model names and providers do not imply availability. Unknown request fields are forwarded on a best-effort basis and remain subject to the selected provider's support.
- **create_speech** — Create speech Generates audio from the input text (Text-to-Speech).
- **create_video** — Create video generation task Creates an asynchronous video generation task. The response returns a canonical task ID and usually a preferred `poll_url`; clients should poll `poll_url` first, or use `/v1/tasks/{id}` as the fixed status endpoint.
- **delete_file** — Delete file Deletes a batch file or a bound image/reference file. When the request includes anthropic-beta: files-api-2025-04-14, the route uses Anthropic Files API mode for the bound workspace.
- **edit_image** — Edit image Edits an image using multipart image uploads, JSON image URLs, or the official JSON images array for supported GPT Image models.
- **edit_image_file** — Edit image Edits an image using multipart image uploads, JSON image URLs, or the official JSON images array for supported GPT Image models.
- **get_model** — Get model Retrieves current model details, including supported operations, request parameters, request endpoints, selector limits, and pricing when available. Non-chat integrations should read these current model-specific request details before creating a request.
- **get_model_pricing** — Get model pricing Retrieves pricing-only detail for one model. Use this endpoint for price explanation, not for non-chat request construction.
- **get_pricing** — List model pricing Returns the public pricing surface for active models, with optional provider and tag filters.
- **get_task_status** — Get async task status Retrieves the status and result of an asynchronous generation task. Prefer the `poll_url` returned by the create response; `/v1/tasks/{id}` is the canonical fixed status endpoint for video, music, and 3D jobs.
- **list_files** — List files
- **list_models** — List models Lists the currently available models. Use `view=compact` for model selection and `view=full` for the existing OpenAI-compatible discovery shape. Native API calls default to `full`; integrations may choose `compact` as their default. Non-chat recommendations are available through `recommended_for`.
- **rerank_documents** — Rerank documents Reranks documents by relevance to a query using semantic similarity.
- **retrieve_file** — Retrieve file
- **retrieve_file_content** — Retrieve file content
- **transcribe_audio** — Create transcription Transcribes audio into text (Speech-to-Text).
- **translate_audio** — Translate audio Transcribes audio and translates the result to English.
- **translate_text** — Translate text Translates text into a target language using the current translation request format.
- **upload_file** — Upload file Uploads a TokenLab/OpenAI-compatible batch or image file. With anthropic-beta: files-api-2025-04-14, uploads an Anthropic Files resource without a purpose field and returns Anthropic file metadata.
- **compare_models** — Compare public TokenLab model details and pricing for several model IDs.
- **get_api_overview** — Fetch TokenLab's agent-readable API overview.

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

```json
"mcpServers": {
  "tokenlab-mcp-server": {
    "command": "npx",
    "args": ["-y","@tokenlabai/mcp-server"]
  }
}
```

## Documentation

## What hedging8563/tokenlab-mcp-server MCP server does

The hedging8563/tokenlab-mcp-server MCP server connects MCP clients to TokenLab's public catalog and broader developer API. Agents can list models, inspect model-specific operations and request formats, retrieve pricing, and compare several models before selecting an endpoint. The catalog profile is public-only, while the default core profile adds common inference, media, file, embedding, reranking, translation, and task operations. A full profile exposes the wider allowlisted API surface.

The server supports OpenAI-compatible Chat Completions, the OpenAI Responses format, Anthropic Messages, and Gemini GenerateContent. It also exposes image creation and editing, speech synthesis, transcription, audio translation, video, music, and 3D generation. File operations cover uploads, listing, retrieval, content retrieval, and deletion.

## How it works

The package is generated from TokenLab's OpenAPI contract with an MCP-specific overlay. Tool definitions retain the relevant HTTP bindings, content types, authentication requirements, and endpoint-oriented argument structures. Calls are checked against the generated schema before an API request is sent. MCP responses include structured content while retaining serialized text for clients that do not consume structured results.

The server offers `catalog`, `core`, and `full` tool profiles through `TOKENLAB_MCP_TOOL_PROFILE`. Schema presentation can use portable, exact, or strict modes. Two prompts help agents choose a model from live information and construct a request without losing the selected native protocol shape. Resources provide the API overview, OpenAPI snapshot, and compact public contract.

Video, music, and 3D jobs are asynchronous. Image operations can be synchronous or asynchronous depending on the selected model. Creation responses provide normalized delivery information such as a task ID and polling URL; clients use `get_task_status` until the task reaches a terminal state. Larger binary results can be written to an artifact directory instead of being returned inline.

## Setup and configuration

Install and run the package with:

```bash
npx -y @tokenlabai/mcp-server
```

A local installation can instead use `npm install` followed by `npm start`, or the project can be run from its Docker image. The documented Claude Desktop configuration starts the npm package with `npx` and can set `TOKENLAB_API_BASE`; the default API base is `https://api.tokenlab.sh`.

No key is needed for model discovery and pricing. Set `TOKENLAB_API_KEY` for credentialed inference, generation, asynchronous task, embedding, reranking, and translation calls. Other settings control the exposed profile, schema mode, request timeout, upload limit, inline response limit, and artifact output directory.

## Tools and capabilities

The hedging8563/tokenlab-mcp-server MCP server includes tools for:

- Discovering models, model capabilities, pricing, and model comparisons.
- Sending Chat Completions, Responses, Anthropic Messages, and Gemini requests.
- Generating or editing images, speech, video, music, and 3D assets.
- Creating embeddings, multimodal embeddings, reranking documents, and translating text or audio.
- Uploading, listing, retrieving, and deleting files.
- Creating, polling, and cancelling supported asynchronous tasks.

Multipart operations accept local file paths. Chat image data URLs should use accurate image MIME types; recognized PNG, JPEG, WebP, and GIF data mislabeled as generic binary can be corrected at the MCP boundary.

## Limitations and notes

Availability depends on the selected model's advertised request format and the provider route currently exposed by TokenLab. A model name or provider alone does not guarantee support for Responses or Gemini-native requests. Unknown fields are forwarded on a best-effort basis and remain subject to provider support.

Streaming-only and realtime operations are excluded because stdio MCP calls return one final result. Requests that accept streaming have it fixed internally to non-streaming. Cancellation currently applies only to queued Seedance video tasks for the documented model variants; processing, completed, failed, expired, and unsupported tasks are not cancelled. Image input and some multimodal features may require provider-specific enablement.

_Full upstream README: https://allmcps.com/mcp/hedging8563-tokenlab-mcp-server/readme_

