Zerouter

io.github.ZerouterAI由 GitHub 账号 ZerouterAI 发布v0.1.0更新于 Oct 25, 2026

AI API gateway MCP: Claude, GPT, Gemini, Grok & Kimi with one Zerouter API key, plus API pricing.

已验证STDIO仅桌面数据与分析AI 与机器学习

概览

AI 生成的概览

Zerouter 是一个本地 MCP 服务器,让助手通过一个 AI API 网关密钥与 Claude、GPT、Gemini、Grok 和 Kimi 对话、比较模型并查询 API 价格。

可以做什么
通过一个网关与任意受支持的模型对话,可发送提示词或消息列表,并可选设置系统提示、最大 token 数和温度,服务器会为不同模型系列自动选择正确的端点格式。把同一个提示词并行发送给 2 到 4 个模型,返回每个答案及 token 用量、延迟和预估费用。查询每百万输入和输出 token 的当前 API 价格,并与厂商官方标价对照,可按模型或供应商筛选。列出可用模型 ID 及各自使用的端点。需要时可按请求覆盖端点。
适用场景
适合希望在同一个编辑器或桌面客户端里用一个密钥访问多个模型系列,或在决定前比较不同模型的回答,或想不离开对话就核对网关价格与官方标价的情况。
运行要求
以 stdio 在本地运行。使用 npx 安装需要 Node.js 18 或更高版本及 npm 10 或更高版本,也可用 Claude Desktop 的 MCPB 包、克隆构建或 Docker 方式。chat 和 compare_models 需要 Zerouter 账户及放在 ZEROUTER_API_KEY 环境变量中的 API 密钥;价格查询和模型列表无需密钥。需要访问网关的网络连接,网关地址可用 ZEROUTER_BASE_URL 修改。
安装前请注意
ZEROUTER_API_KEY 中的 API 密钥是会产生费用的凭据;chat 和 compare_models 会把提示词发送到第三方网关并产生费用,compare_models 还会在多个模型上重复计费。提示词会离开本机发往 Zerouter 服务器。README 还提到一个供应商计划,会把付费流量路由到你自己的 AI 账户并以 USDC 结算,涉及本服务器之外的账户与付款安排。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Zerouter,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

zerouter-mcp

[GitHub release] [MCP Registry] [License: MIT]

AI API gateway MCP for Claude, GPT, Gemini, Grok and Kimi via Zerouter.

zerouter-mcp connects Claude Desktop, Cursor, Claude Code and other MCP clients to Zerouter, an OpenAI-compatible AI API gateway. With one API key you can chat with any supported model, compare answers side by side, or look up API pricing per 1M tokens, without leaving your editor.

Why Zerouter

  • One API key for Claude, GPT, Gemini, Grok and Kimi. The same sk- key routes to every model. Zerouter exposes Anthropic-compatible and OpenAI-compatible endpoints, so it works with Claude Code, Codex and Cursor—change the base URL and keep your existing clients.
  • API pricing you can check in chat. Claude Opus 5.5 on Zerouter is $1.16 input / $5.81 output per 1M tokens (Anthropic list price $4 / $20). Live rates for GPT, Gemini, Grok and Kimi are on the Zerouter pricing page.
  • Compare models before you commit. Send one prompt to 2–4 models in parallel and get each answer with token usage, latency and estimated cost.
  • Stable routing, real models. The model ID you send is the model that runs and the one you're billed for. Prompts aren't rewritten and models aren't swapped.
  • Host unused subscription quota. If you have an official AI account with capacity you don't use, the Zerouter provider program routes paid traffic to it and pays you the larger share of each request, currently about 80%, in USDC.

What it does

ToolWhat it's forNeeds a key?
get_pricingCurrent Zerouter API pricing per 1M input/output tokens, next to each vendor's official list price. Filter by model or provider.No
list_modelsAI model IDs you can call, and which endpoint each one uses.No (uses /v1/models when a key is set)
chatSend a prompt or a message list to any model, with optional system, max_tokens and temperature.Yes
compare_modelsSend the same prompt to 2–4 models in parallel. You get each answer back with token usage, latency and an estimated cost.Yes

You don't have to think about API formats. chat sends each request to the right Zerouter endpoint for you:

  • Claude and Kimi go to POST /v1/messages (Anthropic format)
  • GPT, Codex and Grok go to POST /v1/responses (OpenAI Responses)
  • Gemini and the compatible channels (Qwen/Dashscope and others) go to POST /v1/chat/completions

If you need to, you can override this with the endpoint argument.

Get a key

  1. Sign in at zerouter.ai and open the dashboard.
  2. Create an API key. Keys start with sk- and work for every model.
  3. Put it in the ZEROUTER_API_KEY environment variable, as in the configs below.

See the pricing page for current API pricing and the quickstart for setup details.

Setup

You need Node.js 18 or newer with npm 10 or newer (bundled with current Node 18/20/22 releases). npx fetches the server straight from GitHub, builds it once and runs it. The first start takes up to a minute while it installs; later starts use the npx cache.

The package isn't published to npm, so use github:ZerouterAI/zerouter-mcp as shown below (not zerouter-mcp). Prefer not to use npx? See Other ways to install.

Claude Desktop

Edit claude_desktop_config.json. On macOS it's in ~/Library/Application Support/Claude/ and on Windows in %APPDATA%\Claude\:

json
{  "mcpServers": {    "zerouter": {      "command": "npx",      "args": ["-y", "github:ZerouterAI/zerouter-mcp"],      "env": {        "ZEROUTER_API_KEY": "sk-xxxx"      }    }  }}

Restart Claude Desktop afterwards.

Cursor

Add this to ~/.cursor/mcp.json for all projects, or to .cursor/mcp.json in a single project:

json
{  "mcpServers": {    "zerouter": {      "command": "npx",      "args": ["-y", "github:ZerouterAI/zerouter-mcp"],      "env": {        "ZEROUTER_API_KEY": "sk-xxxx"      }    }  }}

Claude Code

bash
claude mcp add zerouter --env ZEROUTER_API_KEY=sk-xxxx -- npx -y github:ZerouterAI/zerouter-mcp

Add --scope user to make it available in every project.

Other ways to install

MCPB bundle (Claude Desktop one-click). Download zerouter-mcp-0.1.0.mcpb from the latest release and open it, or drag it into Claude Desktop under Settings → Extensions. Claude Desktop asks for your API key; no Node.js setup needed.

Clone and build. Works with any MCP client that can run a local command:

bash
git clone https://github.com/ZerouterAI/zerouter-mcp.gitcd zerouter-mcpnpm install        # also builds dist/ via the prepare script

Then point your client at the built file, using the absolute path on your machine:

json
{  "mcpServers": {    "zerouter": {      "command": "node",      "args": ["/absolute/path/to/zerouter-mcp/dist/index.js"],      "env": {        "ZEROUTER_API_KEY": "sk-xxxx"      }    }  }}

For Claude Code: claude mcp add zerouter --env ZEROUTER_API_KEY=sk-xxxx -- node /absolute/path/to/zerouter-mcp/dist/index.js

Docker

bash
docker build -t zerouter-mcp .docker run -i --rm -e ZEROUTER_API_KEY=sk-xxxx zerouter-mcp

Environment variables

VariableRequiredDefaultNotes
ZEROUTER_API_KEYFor chat and compare_modelsnoneYour key from zerouter.ai
ZEROUTER_BASE_URLNohttps://api.zerouter.aiChange it only if you route through a proxy
ZEROUTER_TIMEOUT_MSNo120000Timeout for each request

If no key is set, get_pricing and list_models still work. chat and compare_models return a clear error that tells you where to get a key.

Example prompts

  • "What does Claude Opus 5.5 cost on Zerouter compared with the official API pricing?"
  • "Ask gemini-3.8-flash to summarise this file."
  • "Compare claude-sonnet-5-5, gpt-6-sol and grok-4.6 on this regex question and tell me which answer is right."
  • "Which models on Zerouter cost less than $0.50 per million input tokens?"

Development

bash
git clone https://github.com/ZerouterAI/zerouter-mcp.gitcd zerouter-mcpnpm install       # runs the build through the prepare scriptnpm test          # spawns the server over stdio and calls every tool (no key needed)npx @modelcontextprotocol/inspector node dist/index.js

Links

License

MIT. Built by the Zerouter team.

来源:README.md,提交 b5eb0d7

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

1
  1. v0.1.0最新Oct 17, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分