原型 · 预览版:收录官方注册中心里的全部服务器,每 30 分钟同步一次。使用 Google 登录即可撰写评价。
PopNx MCP为使用 AI 的人准备的 MCP 服务器 · 用大白话讲清楚

TokenLab MCP Server

作者:hedging8563版本 0.6.45i★ 1i在你的电脑上运行
注册名称io.github.hedging8563/tokenlab

安装方法

概览

作者提供的说明(英文原文)

TokenLab MCP server: generate images and video, call models. 32 default and 89 full-profile tools.

它能帮你做什么

我们还没有为它写通俗的介绍。下面是我们从注册中心读取到的事实。

  • 连接方式: 在你的电脑上运行
  • 传输方式: stdio
  • 分类: 设计、图片与音频
  • 你需要填写:TOKENLAB_API_KEY, TOKENLAB_MANAGEMENT_TOKEN

安装

选择你使用的 AI 应用,然后复制设置。

通过 3/3 项检查 · 在你的电脑上运行

第一步:你用哪个 AI?

选择你用的应用,步骤会显示在下方。

可连接 Claude,但需要先准备

需要 TokenLab MCP Server 的密钥(在开发者网站注册,可能收费) · 需要先在电脑上安装 Node.js(只需一次) · 仅限电脑上的 Claude 应用(Windows 或 Mac),网页和手机不可用

  1. 安装 Node.js

    只需一次,所有需要 Node.js 的服务器都能用

    打开 Node.js 下载页 ↗

  2. 注册并创建 TokenLab MCP Server 的密钥

    打开开发者网站,注册账户并创建 API 密钥,下一步要用。可能收费。

    打开 TokenLab MCP Server 网站 ↗

  3. 打开电脑版 Claude 应用的设置文件

    SettingsDeveloperEdit Config

  4. 粘贴这些设置并保存文件

    {
      "mcpServers": {
        "tokenlab": {
          "command": "npx",
          "args": [
            "-y",
            "@tokenlabai/mcp-server"
          ],
          "env": {
            "TOKENLAB_API_BASE": "your-value",
            "TOKENLAB_API_KEY": "your-value",
            "TOKENLAB_REQUEST_TIMEOUT_MS": "your-value",
            "TOKENLAB_MCP_TOOL_PROFILE": "your-value",
            "TOKENLAB_MCP_SCHEMA_MODE": "your-value",
            "TOKENLAB_MCP_MAX_FILE_BYTES": "your-value",
            "TOKENLAB_MCP_INLINE_BYTES": "your-value",
            "TOKENLAB_ARTIFACT_DIR": "your-value",
            "TOKENLAB_MANAGEMENT_TOKEN": "your-value"
          }
        }
      }
    }

    只把密钥粘贴到应用的输入框里,不要粘贴到聊天中或发给任何人

  5. 退出 Claude 再重新打开

  6. 试一试

    用 TokenLab MCP Server 告诉我你能帮我做什么,然后做一件给我看

    ✓ 如果 Claude 说正在使用 TokenLab MCP Server,或回答中出现 TokenLab MCP Server 的工具名称,就表示连接成功

菜单名称已于 2026年11月11日 对照 Anthropic 帮助页面核实 · 你的界面可能因版本略有不同

ChatGPT 暂时无法连接 TokenLab MCP Server

TokenLab MCP Server 需要安装在你的电脑上,而 ChatGPT 只能连接在网上运行的服务器

你可以改用这些方式

A · 使用能连接 TokenLab MCP Server 的应用

  • 需要 TokenLab MCP Server 的密钥(在开发者网站注册,可能收费) · 需要先在电脑上安装 Node.js(只需一次) · 仅限电脑上的 Claude 应用(Windows 或 Mac),网页和手机不可用
  • 需要 TokenLab MCP Server 的密钥(在开发者网站注册,可能收费) · 需要先在电脑上安装 Node.js(只需一次)
  • 需要 TokenLab MCP Server 的密钥(在开发者网站注册,可能收费) · 需要先在电脑上安装 Node.js(只需一次)
  • 需要 TokenLab MCP Server 的密钥(在开发者网站注册,可能收费) · 需要先在电脑上安装 Node.js(只需一次)

B · 设计、图片与音频 类中能连接 ChatGPT 的其他服务器

从同类中使用较多的里挑选,仅限用地址即可连接、无需密钥的

可连接 Claude Code,但需要先准备

需要 TokenLab MCP Server 的密钥(在开发者网站注册,可能收费) · 需要先在电脑上安装 Node.js(只需一次)

  1. 安装 Node.js

    只需一次,所有需要 Node.js 的服务器都能用

    打开 Node.js 下载页 ↗

  2. 注册并创建 TokenLab MCP Server 的密钥

    打开开发者网站,注册账户并创建 API 密钥,下一步要用。可能收费。

    打开 TokenLab MCP Server 网站 ↗

  3. 打开终端

    Mac:按 Command+空格,输入 Terminal · Windows:打开 PowerShell

  4. 粘贴这条命令并按 Enter

    claude mcp add tokenlab --env TOKENLAB_API_BASE=your-value --env TOKENLAB_API_KEY=your-value --env TOKENLAB_REQUEST_TIMEOUT_MS=your-value --env TOKENLAB_MCP_TOOL_PROFILE=your-value --env TOKENLAB_MCP_SCHEMA_MODE=your-value --env TOKENLAB_MCP_MAX_FILE_BYTES=your-value --env TOKENLAB_MCP_INLINE_BYTES=your-value --env TOKENLAB_ARTIFACT_DIR=your-value --env TOKENLAB_MANAGEMENT_TOKEN=your-value -- npx -y @tokenlabai/mcp-server

    按 Enter 前,把“your-value”改成你的密钥

    只把密钥粘贴到应用的输入框里,不要粘贴到聊天中或发给任何人

  5. 在 Claude Code 中输入 /mcp

    应能看到 TokenLab MCP Server 在列表中并显示已连接

  6. 试一试

    用 TokenLab MCP Server 告诉我你能帮我做什么,然后做一件给我看

    ✓ 如果 Claude Code 说正在使用 TokenLab MCP Server,或回答中出现 TokenLab MCP Server 的工具名称,就表示连接成功

菜单名称已于 2026年11月11日 对照 Anthropic 帮助页面核实 · 你的界面可能因版本略有不同

可连接 Cursor,但需要先准备

需要 TokenLab MCP Server 的密钥(在开发者网站注册,可能收费) · 需要先在电脑上安装 Node.js(只需一次)

  1. 安装 Node.js

    只需一次,所有需要 Node.js 的服务器都能用

    打开 Node.js 下载页 ↗

  2. 注册并创建 TokenLab MCP Server 的密钥

    打开开发者网站,注册账户并创建 API 密钥,下一步要用。可能收费。

    打开 TokenLab MCP Server 网站 ↗

  3. 点击这个按钮打开 Cursor

    在 Cursor 中打开

    Cursor 会请你确认安装,点击 Install

  4. 填写你的密钥

    在 TokenLab MCP Server 的设置中,TOKENLAB_API_BASE, TOKENLAB_API_KEY, TOKENLAB_REQUEST_TIMEOUT_MS, TOKENLAB_MCP_TOOL_PROFILE, TOKENLAB_MCP_SCHEMA_MODE, TOKENLAB_MCP_MAX_FILE_BYTES, TOKENLAB_MCP_INLINE_BYTES, TOKENLAB_ARTIFACT_DIR, TOKENLAB_MANAGEMENT_TOKEN 还是空的,填入你的密钥并保存

    只把密钥粘贴到应用的输入框里,不要粘贴到聊天中或发给任何人

  5. 在 Cursor 中以 Agent 模式打开 AI 聊天

  6. 试一试

    用 TokenLab MCP Server 告诉我你能帮我做什么,然后做一件给我看

    ✓ 如果 Cursor 说正在使用 TokenLab MCP Server,或回答中出现 TokenLab MCP Server 的工具名称,就表示连接成功

菜单名称已于 2026年11月11日 对照 Cursor 帮助页面核实 · 你的界面可能因版本略有不同

可连接 VS Code,但需要先准备

需要 TokenLab MCP Server 的密钥(在开发者网站注册,可能收费) · 需要先在电脑上安装 Node.js(只需一次)

  1. 安装 Node.js

    只需一次,所有需要 Node.js 的服务器都能用

    打开 Node.js 下载页 ↗

  2. 注册并创建 TokenLab MCP Server 的密钥

    打开开发者网站,注册账户并创建 API 密钥,下一步要用。可能收费。

    打开 TokenLab MCP Server 网站 ↗

  3. 点击这个按钮打开 VS Code

    在 VS Code 中打开

    VS Code 会请你确认安装,点击 Install

  4. 填写你的密钥

    在 TokenLab MCP Server 的设置中,TOKENLAB_API_BASE, TOKENLAB_API_KEY, TOKENLAB_REQUEST_TIMEOUT_MS, TOKENLAB_MCP_TOOL_PROFILE, TOKENLAB_MCP_SCHEMA_MODE, TOKENLAB_MCP_MAX_FILE_BYTES, TOKENLAB_MCP_INLINE_BYTES, TOKENLAB_ARTIFACT_DIR, TOKENLAB_MANAGEMENT_TOKEN 还是空的,填入你的密钥并保存

    只把密钥粘贴到应用的输入框里,不要粘贴到聊天中或发给任何人

  5. 在 VS Code 中以 Agent 模式打开 AI 聊天

  6. 试一试

    用 TokenLab MCP Server 告诉我你能帮我做什么,然后做一件给我看

    ✓ 如果 VS Code 说正在使用 TokenLab MCP Server,或回答中出现 TokenLab MCP Server 的工具名称,就表示连接成功

菜单名称已于 2026年11月11日 对照 VS Code 帮助页面核实 · 你的界面可能因版本略有不同

其他支持 MCP 的应用(如 Windsurf、Zed、Gemini CLI)添加方式各不相同,请在应用列表中查看

查看所有支持 MCP 的应用 →

JSON 设置在下方“开发者专用”中

卡住了?问问正在用 TokenLab MCP Server 的人💬 讨论 →
开发者专用:终端命令和 JSON 设置

安装在电脑上

Claude Code

claude mcp add tokenlab --env TOKENLAB_API_BASE=your-value --env TOKENLAB_API_KEY=your-value --env TOKENLAB_REQUEST_TIMEOUT_MS=your-value --env TOKENLAB_MCP_TOOL_PROFILE=your-value --env TOKENLAB_MCP_SCHEMA_MODE=your-value --env TOKENLAB_MCP_MAX_FILE_BYTES=your-value --env TOKENLAB_MCP_INLINE_BYTES=your-value --env TOKENLAB_ARTIFACT_DIR=your-value --env TOKENLAB_MANAGEMENT_TOKEN=your-value -- npx -y @tokenlabai/mcp-server

Claude Desktop (claude_desktop_config.json)

{
  "mcpServers": {
    "tokenlab": {
      "command": "npx",
      "args": [
        "-y",
        "@tokenlabai/mcp-server"
      ],
      "env": {
        "TOKENLAB_API_BASE": "your-value",
        "TOKENLAB_API_KEY": "your-value",
        "TOKENLAB_REQUEST_TIMEOUT_MS": "your-value",
        "TOKENLAB_MCP_TOOL_PROFILE": "your-value",
        "TOKENLAB_MCP_SCHEMA_MODE": "your-value",
        "TOKENLAB_MCP_MAX_FILE_BYTES": "your-value",
        "TOKENLAB_MCP_INLINE_BYTES": "your-value",
        "TOKENLAB_ARTIFACT_DIR": "your-value",
        "TOKENLAB_MANAGEMENT_TOKEN": "your-value"
      }
    }
  }
}

Cursor (~/.cursor/mcp.json)

{
  "mcpServers": {
    "tokenlab": {
      "command": "npx",
      "args": [
        "-y",
        "@tokenlabai/mcp-server"
      ],
      "env": {
        "TOKENLAB_API_BASE": "your-value",
        "TOKENLAB_API_KEY": "your-value",
        "TOKENLAB_REQUEST_TIMEOUT_MS": "your-value",
        "TOKENLAB_MCP_TOOL_PROFILE": "your-value",
        "TOKENLAB_MCP_SCHEMA_MODE": "your-value",
        "TOKENLAB_MCP_MAX_FILE_BYTES": "your-value",
        "TOKENLAB_MCP_INLINE_BYTES": "your-value",
        "TOKENLAB_ARTIFACT_DIR": "your-value",
        "TOKENLAB_MANAGEMENT_TOKEN": "your-value"
      }
    }
  }
}

VS Code (mcp.json)

{
  "servers": {
    "tokenlab": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@tokenlabai/mcp-server"
      ],
      "env": {
        "TOKENLAB_API_BASE": "your-value",
        "TOKENLAB_API_KEY": "your-value",
        "TOKENLAB_REQUEST_TIMEOUT_MS": "your-value",
        "TOKENLAB_MCP_TOOL_PROFILE": "your-value",
        "TOKENLAB_MCP_SCHEMA_MODE": "your-value",
        "TOKENLAB_MCP_MAX_FILE_BYTES": "your-value",
        "TOKENLAB_MCP_INLINE_BYTES": "your-value",
        "TOKENLAB_ARTIFACT_DIR": "your-value",
        "TOKENLAB_MANAGEMENT_TOKEN": "your-value"
      }
    }
  }
}

需要你填写的值

  • TOKENLAB_API_BASE env
    Optional TokenLab API base URL. Defaults to https://api.tokenlab.sh.
  • TOKENLAB_API_KEY 机密 env
    Optional TokenLab API key. Required for LLM inference, multimodal generation, async task, embedding, rerank, and translation tools.
  • TOKENLAB_REQUEST_TIMEOUT_MS env
    Optional request timeout in milliseconds. Defaults to 120000.
  • TOKENLAB_MCP_TOOL_PROFILE env
    Optional generated tool profile: catalog, core (default), or full.
  • TOKENLAB_MCP_SCHEMA_MODE env
    Optional tool schema mode: portable, exact, or strict. Defaults to the selected profile's tested mode.
  • TOKENLAB_MCP_MAX_FILE_BYTES env
    Optional maximum local upload size per file. Defaults to 104857600 bytes.
  • TOKENLAB_MCP_INLINE_BYTES env
    Optional maximum response size returned inline. Defaults to 2097152 bytes.
  • TOKENLAB_ARTIFACT_DIR env
    Optional local directory for response artifacts that are not returned inline.
  • TOKENLAB_MANAGEMENT_TOKEN 机密 env
    Optional workspace Management Token (mt-...) for webhook tools in the full profile. Separate from inference API keys; never put it in tool arguments.

这些设置是根据作者在注册中心的条目生成的。如果 README 的写法不同,请以 README 为准。

一览

每周下载量i
1,442/周
连接方式
在你的电脑上运行
最新版本i
0.6.45
发布到注册中心i
2026年11月7日
代码最后更新i
2026年11月7日
作者
hedging8563
软件包
npm: @tokenlabai/mcp-server
注册状态
活跃

哪些应用可以使用它

依据这个服务器的连接方式和各应用自己的文档,检查于 2026年11月10日。

在你的电脑上运行,适用于

ClaudeGooseLM StudioMsty StudioCherry StudioCursorVS Code + GitHub CopilotVisual StudioWindsurf (Devin Desktop)ZedKiroClineContinueJetBrains AI AssistantClaude CodeCodex CLIGemini CLIOpenCodenodecodeWarpLibreChatRaycast

全部应用及其优缺点 →

它能做什么

它在你的电脑上运行;安装后,工具列表会显示在你的 AI 应用中。

基础检查i

我们检查的是任何人都能看到的信息;我们没有阅读代码。不适用的检查项不计入总数。 · 检查于 2026年11月11日

  • ✓ 通过

    作者与仓库一致

    注册名称已通过 GitHub 账户 hedging8563 验证,该账户拥有此仓库

  • ✓ 通过

    仍在维护

    代码最后更新于4天前

  • ✓ 通过

    有许可证

    使用 MIT

  • – 不适用

    端点有响应

    它在你的电脑上运行,没有互联网端点

  • – 不适用

    使用 OAuth 登录

    在你的电脑上运行,改用本地设置

  • … 尚未检查

    工具描述中没有隐藏指令

    它在你的电脑上运行;我们只能读取互联网端点的工具列表

讨论

提问、分享技巧或报告无法使用。按“有帮助”数量排序。

还没有帖子,欢迎第一个提问或分享。

此处内容由用户撰写,不代表 PopNx 团队。

使用 Google 登录后发帖

用户评价

还没有评价

用 Google 登录后写评价

与“设计、图片与音频”中的其他服务器比较i

  • 星标数多于此分类中其他 2927 个服务器的 77%
  • 发布到注册中心的时间比此分类中其他 2927 个服务器的 88% 更新
  • 基础检查结果等于或优于此分类中其他 2927 个服务器的 100%

与注册中心里这个分类中所有活跃的服务器比较。只有当发布者拥有该仓库时,星标数才计入。

常见问题

TokenLab MCP Server 安全吗?

它在 3 项适用的基础检查中通过了 3 项。我们没有阅读代码。在添加密钥或令牌之前,请先看看这个服务器要求哪些权限,并使用只具备所需权限的密钥。

它需要哪些密钥或代码?

你需要填写:TOKENLAB_API_KEY, TOKENLAB_MANAGEMENT_TOKEN

它在我的电脑上运行还是在云端?

它在你的电脑上运行。你的 AI 应用会在需要时启动它,数据不会经过作者的服务器(除非它自己调用在线服务)。

它还在维护吗?

GitHub 仓库最后更新于4天前,最新版本(0.6.45)于4天前进入注册中心。

哪些应用可以使用它?

支持 MCP 的应用,例如 Claude Desktop、Claude Code、Cursor 和 VS Code。你的电脑上还需要有 Node.js。

有什么可以替代它?

同一分类中有:Next AI Draw.io, Pascal 3D Editor, screenpipe

替代选择

同一分类中其他作者的服务器,按星标数排序。

如何看卡片:↓ 每周下载量i★ GitHub 星标i三大支柱:评价 · 检查 · 使用情况i更新 = 最新版本发布到注册中心的时间i

Next AI Draw.io

draw.io diagrams your AI agent draws on a live browser canvas that you can also edit by hand

作者:DayuanJiang广泛使用↓ 2.2万/周★ 3.7万4天前更新

在你的电脑上运行

Pascal 3D Editor

Create, inspect, validate, and save editable 3D building scenes with Pascal's MCP server.

作者:pascalorg广泛使用↓ 1037/周★ 2.5万昨天更新

电脑或云端✓ pascal.app

screenpipe

Search your local screen recordings, audio transcripts, and computer activity from screenpipe.

作者:screenpipe广泛使用↓ 6626/周★ 2.2万9天前更新

在你的电脑上运行

作者的 README

打开 README

按原文从作者的仓库复制。PopNx MCP 没有审查或背书其内容。HTML、图片和脚本已被移除。链接会离开本站。

TokenLab MCP Server

OpenAPI-generated Model Context Protocol server for TokenLab public model discovery, pricing, native LLM endpoints, typed decisions, multimodal generation, async tasks, files, embeddings, rerank, translation, resources, prompts, and the broader developer API.

It exposes public catalog tools for agents that need to choose models, inspect supported request formats, or compare pricing before calling TokenLab APIs. Credentialed tools cover text inference, image generation and editing, video, music, 3D, async task polling, embeddings, rerank, typed decisions, and text translation.

Generated Tool Profiles

The checked-in generated/tools.json manifest is generated from TokenLab's public OpenAPI document plus the small MCP-only overlay in contract/mcp-overlay.json. Version 0.6.44 generates 87 endpoint tools; with the two MCP-only composite discovery tools, the full profile returns 89 tools from tools/list.

ProfileEndpoint toolsTotal registered toolsModel-facing schemaCoverage
catalog46ExactPublic model discovery and pricing only; no API key required
core (default)3032PortableCatalog and pricing; Chat Completions, Responses, Anthropic Messages, Gemini generateContent; System One typed decisions; images, video, music, 3D, speech and transcription; async tasks; files; embeddings, rerank, and translation
full8789PortableEvery allowlisted developer API operation in the checked-in OpenAPI snapshot, including core plus response lifecycle, batches, worlds, and native model discovery

The total registered count is the number returned by tools/list. All profiles include compare_models and get_api_overview, producing totals of 6, 32, and 89 tools. Realtime and streaming-only operations are excluded because stdio MCP tool calls return one final result. API operations that accept stream fix it internally to false without exposing a boolean const to provider adapters, and the Gemini query-string API key is intentionally hidden from tool arguments. create_gemini_content exposes the camelCase Gemini fields (systemInstruction, generationConfig, safetySettings, toolConfig, cachedContent) and hides their snake_case proto spellings, which the API accepts as aliases.

The portable projection keeps every top-level argument but bounds deeply nested model-facing shapes. The server still validates calls against the complete generated OpenAPI schema before issuing an API request. Compatibility budgets keep core at no more than 60 KB and depth 8, and full at no more than 115 KB and depth 8 for the complete tools/list response. Tests also run the full profile through the Google AI SDK version used by the observed OpenCode/Gemini failure and keep its function declarations within 90 KB.

Set TOKENLAB_MCP_TOOL_PROFILE=catalog for the smallest public-only tool list or TOKENLAB_MCP_TOOL_PROFILE=full for the broad developer API. Set TOKENLAB_MCP_SCHEMA_MODE=exact only when a client needs the complete nested JSON Schema and can accept its larger/deeper tool payload. Use strict for providers that require every property to be listed in required and every object to set additionalProperties: false; complex top-level arguments are represented as JSON-encoded strings and decoded before canonical validation. Canonical tool names, descriptions, input JSON Schemas, HTTP bindings, content types, auth requirements, and task behavior can be inspected in generated/tools.json.

The smaller generated/public-contract.json is the machine-readable projection used by TokenLab's website and other public consumers. It contains package identity, profile counts, core tool layers, resources, prompts, and source hashes without copying all endpoint schemas.

Native MCP Features

  • JSON tool responses include structuredContent while retaining serialized text for older clients.
  • HTTP errors retain the original response text (up to 4,000 characters), including public correction hints, alongside structured status, request ID and retry timing. Only the request ID and retry headers are exposed; failed generation requests are never submitted again automatically.
  • Generated tools expose human-readable titles, standard read-only/destructive/idempotent/open-world annotations, and response request IDs when available.
  • Tool schemas are published and validated directly as JSON Schema. The runtime does not round-trip generated tool schemas through Zod; exact mode is byte-shape equivalent to the generated canonical schema.
  • Three resources expose the live API overview, the package's OpenAPI snapshot, and the compact MCP public contract.
  • choose_tokenlab_model and build_tokenlab_request prompts guide agents to use live model truth and preserve native endpoint shapes.
  • Server instructions tell clients to confirm billable or destructive operations and treat external model/API output as untrusted content.

Run

npm install

npm start

Install from npm:

npx -y @tokenlabai/mcp-server

Agent-assisted installers can follow llms-install.md for a credential-safe setup and verification flow.

Run in Docker:

docker build -t tokenlab-mcp-server .

docker run --rm -i tokenlab-mcp-server

Add -e TOKENLAB_API_KEY when using credentialed API tools. Public catalog tools do not require a key.

Claude Desktop style config:

{

"mcpServers": { "tokenlab-model-catalog": { "command": "npx", "args": ["-y", "@tokenlabai/mcp-server"], "env": { "TOKENLAB_API_BASE": "https://api.tokenlab.sh" } } } }

No TokenLab API key is required for public catalog and pricing operations. Set TOKENLAB_API_KEY when credentialed tools should call TokenLab APIs. Generated tools preserve the OpenAPI request shape for OpenAI-compatible and native endpoints instead of flattening them into a shared prompt format.

Multipart operations accept local file paths. Small image and audio responses are returned as native MCP content; larger or other binary responses are written to TOKENLAB_ARTIFACT_DIR and returned as a path with MIME type and byte count.

Sync and Async Media Results

Video, music, and 3D creation tools always return an async task. Image generation and editing may return a completed result or an async task depending on the selected model and request.

Media tools preserve the complete TokenLab API response under response and add a normalized delivery summary:

{

"delivery": { "mode": "async", "task_id": "ldtask_...", "status": "pending", "poll_url": "/v1/tasks/ldtask_...", "terminal": false, "next_tool": "get_task_status" }, "response": {} }

Use delivery.mode instead of assuming all image requests are synchronous. For async tasks, call get_task_status with { "id": delivery.task_id } until delivery.terminal is true. Completion is determined from status, not from an optional progress field.

Environment

  • TOKENLAB_API_BASE: optional, defaults to https://api.tokenlab.sh
  • TOKENLAB_API_KEY: optional; required for text inference, multimodal generation, async task, embedding, rerank, decision, and translation tools
  • TOKENLAB_MCP_TOOL_PROFILE: optional, catalog, core (default), or full
  • TOKENLAB_MCP_SCHEMA_MODE: optional, portable, exact, or strict; defaults to the selected profile's tested mode
  • TOKENLAB_REQUEST_TIMEOUT_MS: optional request timeout in milliseconds, defaults to 120000
  • TOKENLAB_MCP_MAX_FILE_BYTES: optional maximum local upload size per file, defaults to 104857600 (100 MiB)
  • TOKENLAB_MCP_INLINE_BYTES: optional maximum binary/JSON response size returned inline, defaults to 2097152 (2 MiB)
  • TOKENLAB_ARTIFACT_DIR: optional output directory for non-inline response artifacts, defaults to the OS temp directory under tokenlab-mcp

For Chat Completions image inputs, prefer byte-accurate data URLs such as data:image/png;base64,.... If an MCP caller labels a recognized PNG, JPEG, WebP, or GIF payload as application/octet-stream, the server corrects that generic MIME before forwarding. An unrecognized generic binary payload is rejected locally with a precise input error.

Contract Sync

The public OpenAPI document is the API contract source. The overlay contains only MCP-specific choices: profile exposure, stable tool aliases, secret omission, non-streaming constraints, content-type variants, async task semantics, and the compact public projection consumed by the website and docs gates.

npm run contract:source-check # compare the snapshot with the live canonical OpenAPI (read-only)

npm run contract:check # check generated output against the checked-in snapshot (offline) npm run contract:sync # fetch OpenAPI and regenerate; refuses dirty outputs or a stale branch npm test # compile profiles and test exact/portable/strict schemas, provider conversion, routing, tasks, files, and binary output

Always run git pull --ff-only before a manual contract sync. contract:check proves internal consistency only; contract:source-check proves freshness against the canonical source. The scheduled Sync TokenLab OpenAPI contract workflow runs the full write sequence and commits only the verified OpenAPI snapshot and generated manifest to main. A failed fetch, stale local branch, dirty generated output, generation error, schema compilation error, or test leaves the tracked contract unchanged.

MCP Registry Metadata

This repository includes server.json for the official MCP Registry.

Release metadata:

  • npm package: @tokenlabai/mcp-server@0.6.44
  • MCP registry name: io.github.hedging8563/tokenlab
  • package.json.mcpName: io.github.hedging8563/tokenlab

For a new release:

  1. Bump the matching versions in package.json, package-lock.json, and server.json.
  2. Push a matching tag such as v0.6.0.
  3. The publish workflow tests and publishes npm through trusted publishing, then publishes the MCP Registry entry through GitHub Actions OIDC.

The same workflow can be run manually from main to republish only the current MCP Registry metadata. No npm or MCP Registry token is stored in GitHub.

Security

Use the catalog profile when no credentialed tools are needed. Keep TOKENLAB_API_KEY in the local MCP client's secret environment, enable human confirmation for billable and destructive calls, and review tool annotations before granting persistent approval. Do not send a TokenLab API key to an untrusted hosted MCP server.

Each API request sends X-TokenLab-Client-Source: mcp- (for example mcp-create_image) so TokenLab can count which tools are used. Reading the tokenlab://api/overview resource sends mcp-resource-api_overview. The header holds only the lowercased tool name, cut to 64 characters, and no tool arguments.

Links

  • Website: https://tokenlab.sh/mcp
  • Docs: https://tokenlab.sh/docs
  • OpenAPI: https://tokenlab.sh/docs/openapi.json
  • Model catalog: https://api.tokenlab.sh/v1/models
  • Skills: https://github.com/hedging8563/tokenlab-skills

Webhook management

Use the full profile to configure workspace webhooks with list_webhooks, create_webhook, get_webhook, update_webhook, delete_webhook, rotate_webhook_secret, test_webhook and list_webhook_deliveries.

Set `TOKENLAB_MANAGEMENT

只显示了开头部分;其余内容请在仓库中阅读