@aiorouter/mcp
v1.1.1
Published
AIOrouter MCP Server — 15+ AI models, single API key, privacy protection
Maintainers
Readme
@aiorouter/mcp
AIOrouter MCP Server — Access 15+ AI models through a single API key with PII Shield protection.
Features
- 15+ AI models — Qwen, DeepSeek, GLM, Kimi, Grok, and more through a single API key
- MCP Protocol — Model Context Protocol (stdio transport) for Claude Desktop, Claude Code, and Codex CLI
- PII Shield — Personal information and technical secrets are protected before routing
- Zero billing changes — Same API key, same quota, same billing pipeline as direct API calls
- 10 MCP tools — Chat, model listing, pricing, usage, cost estimation, and more
Quick Start
# Set your API key
export AIOROUTER_API_KEY="ak-your-api-key-here"
# Run the MCP server
npx @aiorouter/mcpGet your API key at dashboard.aiorouter.ca/keys.
Installation
# Global install
npm install -g @aiorouter/mcp
# Or use npx (zero install)
npx @aiorouter/mcpClaude Desktop Setup
Scenario A: Anthropic Subscription + MCP Tools
Use your Anthropic subscription for Claude, and access 15+ other models through MCP tools.
Edit claude_desktop_config.json:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"aiorouter": {
"command": "npx",
"args": ["-y", "@aiorouter/mcp"],
"env": {
"AIOROUTER_API_KEY": "ak-your-api-key-here"
}
}
}
}Scenario B: AIOrouter as Third-Party Inference Gateway
Route ALL Claude Desktop traffic through AIOrouter for complete privacy protection — even Anthropic never sees your real data.
- Configure AIOrouter as your Claude Desktop third-party inference provider
- Add the MCP server config above
- All traffic (Claude + non-Claude) goes through AIOrouter PII Shield
Claude Code Setup
Add to .mcp.json in your project root:
{
"mcpServers": {
"aiorouter": {
"command": "npx",
"args": ["-y", "@aiorouter/mcp"],
"env": {
"AIOROUTER_API_KEY": "ak-your-api-key-here"
},
"type": "stdio"
}
}
}Codex CLI Setup
{
"mcpServers": {
"aiorouter": {
"command": "npx",
"args": ["-y", "@aiorouter/mcp"],
"env": {
"AIOROUTER_API_KEY": "ak-your-api-key-here"
}
}
}
}Tools Reference
| # | Tool | Description |
|:---|:---|:---|
| 1 | aiorouter_chat | Send a chat completion to any AIOrouter model |
| 2 | aiorouter_list_models | List all available models with provider info |
| 3 | aiorouter_get_presets | Show CODE-MAS orchestrator triple preset configuration |
| 4 | aiorouter_get_pricing | Get public retail pricing (USD per 1M tokens) |
| 5 | aiorouter_get_usage | Get usage, billing, and subscription status |
| 6 | aiorouter_test_connection | Test API key validity and show account info |
| 7 | aiorouter_export_config | Generate MCP config JSON for Claude Desktop/Code/Codex |
| 8 | aiorouter_compare_models | Compare 2-5 models side-by-side |
| 9 | aiorouter_estimate_cost | Estimate cost for a prompt (input + output tokens) |
| 10 | aiorouter_get_model_info | Get detailed info for a single model |
Example: Using aiorouter_chat
Ask Claude Desktop:
"Use aiorouter_chat to call deepseek-v4-pro and ask: what is MCP protocol?"
Claude will:
- Call
aiorouter_list_modelsto confirm the model is available - Call
aiorouter_chatwithmodel="deepseek-v4-pro"and your message - Return the model's response
Remote HTTP MCP Server
AIOrouter also provides a Remote HTTP MCP Server at https://api.aiorouter.ca/mcp:
- Transport: Streamable HTTP (stateless)
- Auth: API Key (
Authorization: Bearer ak-...) or OAuth 2.1 - Same 10 tools as the local stdio server
# Example: list tools via HTTP
curl -X POST https://api.aiorouter.ca/mcp \
-H "Authorization: Bearer ak-your-api-key" \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/list","params":{}}'Pricing & Billing
- Zero changes to your existing billing — MCP tools use the same API key quota
- All
aiorouter_chatcalls go through the same billing pipeline (TokenCounter → CreditEngine → BudgetGuard) - Check usage at dashboard.aiorouter.ca/billing
Security
- PII Shield: Personal information and technical secrets are protected before routing to any model
- API Key Safety: Your API key stays in your environment variable — never written to disk
- HTTPS Only: All communication with AIOrouter uses HTTPS
- No Package Secrets: This npm package contains zero API keys or secrets
CLI Commands
aiorouter-mcp # Start stdio MCP server (default)
aiorouter-mcp setup # Interactive setup guide
aiorouter-mcp status # Check API key validity
aiorouter-mcp version # Show version