
quickrouter-mcp-server
io.github.YunSongMax/quickrouter-mcp-server
Browse QuickRouter models and rates, estimate token costs, and send text chat requests.
Documentation
QuickRouter MCP Server
A local Model Context Protocol server for browsing QuickRouter models and pricing, estimating text-token costs, and sending non-streaming text chat requests. The server communicates over stdio and requires Node.js 20 or newer.
Run
Run the npm package:
npx -y quickrouter-mcp-server
To run from source, run npm ci, then npm run build and node dist/index.js. Set the client command to node and its first argument to the absolute path of dist/index.js. The process waits for MCP messages on stdin.
The three catalog tools work without a key. To enable chat, set QUICKROUTER_API_KEY in the local server process environment. Get a key from the QuickRouter console. Keep it out of source control. Chat sends the selected model ID and message text to https://api.quickrouter.ai/v1/chat/completions and may incur charges. Catalog tools fetch https://quickrouter.ai/api/model-pricing without the key.
Client configuration
These examples use the npm package. For the local build, substitute the node command and script path described above. If a GUI client cannot find npx, use the absolute path returned by command -v npx on macOS or Linux, or where npx on Windows.
Claude Desktop
Open Settings → Developer → Edit Config, add the entry to claude_desktop_config.json, then restart Claude Desktop. For chat, inject QUICKROUTER_API_KEY in the local process environment. If the app does not inherit that environment, set the key in the private config's server-level env map. Local MCP setup
{
"mcpServers": {
"quickrouter": {
"command": "npx",
"args": ["-y", "quickrouter-mcp-server"]
}
}
}
Cursor / Grok Build
Add this to .cursor/mcp.json for the project or ~/.cursor/mcp.json for your account. Start the client with the key in its environment if enabling chat. To use catalog tools only, omit the env entry. MCP configuration
{
"mcpServers": {
"quickrouter": {
"type": "stdio",
"command": "npx",
"args": ["-y", "quickrouter-mcp-server"],
"env": {"QUICKROUTER_API_KEY": "${env:QUICKROUTER_API_KEY}"}
}
}
}
Windsurf / Devin Desktop
Add the entry through the MCP settings. Existing Windsurf installations use ~/.codeium/windsurf/mcp_config.json. Devin Desktop uses ~/.config/devin/mcp_config.json for the user scope, or .devin/mcp_config.local.json for a local project override. Inject the key through the local process environment or the private server-level env map if using chat. Current Devin MCP configuration
{
"mcpServers": {
"quickrouter": {
"command": "npx",
"args": ["-y", "quickrouter-mcp-server"]
}
}
}
Claude Code
Use a project .mcp.json file and run claude mcp list to confirm the registration. Omit env when using the catalog without a key. MCP scopes and environment expansion
{
"mcpServers": {
"quickrouter": {
"type": "stdio",
"command": "npx",
"args": ["-y", "quickrouter-mcp-server"],
"env": {"QUICKROUTER_API_KEY": "${QUICKROUTER_API_KEY}"}
}
}
}
Tools
| Tool | Common inputs | Result |
|---|---|---|
list_models | query, family, limit | Matching model IDs, capability tags, and catalog endpoint URLs. The in-memory catalog cache expires after 60 seconds. |
get_model_pricing | model_id | Exact or unique partial match with group rates, price units, published rate tiers, capabilities, and pricing timestamp. Unknown context windows are returned as null. |
estimate_cost | model_id, input_tokens, output_tokens, optional requests, group | Per-request and total USD for applicable text-token rates. Uses each group's matching published input and output tiers. |
chat_completion | messages, optional model, max_tokens | Text, returned model, finish reason, and available token usage. Defaults to claude-sonnet-5-5. Requires QUICKROUTER_API_KEY. |
For example, estimate ten identical requests with {"model_id":"gpt-6.2-sol","input_tokens":1200,"output_tokens":300,"requests":10}. Batch here means a repeated-request estimate. The estimate covers uncached text and excludes cache, media and batch discounts. The actual API key group, rate tier, and usage in the console determine charges. Consult QuickRouter pricing.
For a text chat, send {"messages":[{"role":"user","content":"Reply with OK."}],"max_tokens":32}. Custom model IDs are passed through to the gateway and require model access on your key. Use max_tokens where the selected route accepts it. HTTP 401 indicates a rejected key, 403 indicates denied access, and 429 indicates a rate or quota limit. The server does not automatically retry chat calls.
Model IDs
The following 13 IDs were checked in the public QuickRouter catalog. Availability for chat depends on your key group.
| Family | IDs |
|---|---|
| GPT | gpt-6.2-astra, gpt-6.2-sol, gpt-6.1-terra |
| Claude | claude-opus-5-5, claude-fable-5-2, claude-sonnet-5-5, claude-haiku-5-5 |
| Gemini | gemini-4-carbon, gemini-4-hydrogen, gemini-4-neon |
| DeepSeek | deepseek-v4.1-flash, deepseek-v4-pro |
| Grok | grok-4.7 |
Development
npm ci
npm run typecheck
npm run test
npm run build
npm pack --dry-run
The production dependency is the official TypeScript SDK v1 line, @modelcontextprotocol/sdk, with Zod validation. Unit tests use MCP InMemoryTransport and mocked fetch. The software is distributed under the MIT License.
quickrouter-mcp-servernpm install quickrouter-mcp-server