AI API gateway MCP: Claude, GPT, Gemini, Grok & Kimi with one Zerouter API key, plus API pricing.
Runs on your machine from its package; the steps are below.
At most: moves money, runs code or commands, deletes data, or sends messages for you.
Odel charges nothing per call. The publisher may charge for its own service.
Runs locally over stdio
This server isn't hosted — your MCP client launches it from a package registry. Use one of the commands below, or drop the config into your client (e.g. Claude Desktop).
Distributed as an MCP bundle (`https://github.com/ZerouterAI/zerouter-mcp/releases/download/v0.1.0/zerouter-mcp-0.1.0.mcpb`) — download it and import the bundle in your MCP client.
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.
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.| Tool | What it's for | Needs a key? |
|---|---|---|
get_pricing | Current Zerouter API pricing per 1M input/output tokens, next to each vendor's official list price. Filter by model or provider. | No |
list_models | AI model IDs you can call, and which endpoint each one uses. | No (uses /v1/models when a key is set) |
chat | Send a prompt or a message list to any model, with optional system, max_tokens and temperature. | Yes |
compare_models | Send 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:
POST /v1/messages (Anthropic format)POST /v1/responses (OpenAI Responses)POST /v1/chat/completionsIf you need to, you can override this with the endpoint argument.
sk- and work for every model.ZEROUTER_API_KEY environment variable, as in the configs below.See the pricing page for current API pricing and the quickstart for setup details.
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.
Edit claude_desktop_config.json. On macOS it's in ~/Library/Application Support/Claude/ and on Windows in %APPDATA%\Claude\:
{
"mcpServers": {
"zerouter": {
"command": "npx",
"args": ["-y", "github:ZerouterAI/zerouter-mcp"],
"env": {
"ZEROUTER_API_KEY": "sk-xxxx"
}
}
}
}
Restart Claude Desktop afterwards.
Add this to ~/.cursor/mcp.json for all projects, or to .cursor/mcp.json in a single project:
{
"mcpServers": {
"zerouter": {
"command": "npx",
"args": ["-y", "github:ZerouterAI/zerouter-mcp"],
"env": {
"ZEROUTER_API_KEY": "sk-xxxx"
}
}
}
}
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.
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:
git clone https://github.com/ZerouterAI/zerouter-mcp.git
cd zerouter-mcp
npm install # also builds dist/ via the prepare script
Then point your client at the built file, using the absolute path on your machine:
{
"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 build -t zerouter-mcp .
docker run -i --rm -e ZEROUTER_API_KEY=sk-xxxx zerouter-mcp
| Variable | Required | Default | Notes |
|---|---|---|---|
ZEROUTER_API_KEY | For chat and compare_models | none | Your key from zerouter.ai |
ZEROUTER_BASE_URL | No | https://api.zerouter.ai | Change it only if you route through a proxy |
ZEROUTER_TIMEOUT_MS | No | 120000 | Timeout 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.
git clone https://github.com/ZerouterAI/zerouter-mcp.git
cd zerouter-mcp
npm install # runs the build through the prepare script
npm test # spawns the server over stdio and calls every tool (no key needed)
npx @modelcontextprotocol/inspector node dist/index.js
MIT. Built by the Zerouter team.