@aiorouter/mcp
MCP server that provides access to 15+ non-Claude AI models through a single API key, with PII Shield protection and 10 tools for chat, model management, pricing, and usage tracking.
README
@aiorouter/mcp
AIOrouter MCP Server — Access 15+ AI models through a single API key with PII Shield protection.
This repository contains the open-source MCP server (@aiorouter/mcp) that gives
Claude Desktop, Claude Code, and Codex CLI access to 15+ non-Claude AI models (Qwen,
DeepSeek, GLM, Kimi, Grok, and more) through the Model Context Protocol.
⚠️ This is the public, sanitized package repo only. The AIOrouter gateway backend (routing, billing, PII Shield pipeline, internal infrastructure) is proprietary and is NOT part of this repository.
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
- 10 MCP tools — Chat, model listing, pricing, usage, cost estimation, and more
- Zero billing changes — Same API key, same quota, same billing pipeline as direct API calls
Quick Start
⚠️ AIOrouter is a PAID service — no free tier. You MUST have an active AIOrouter account with an API key before configuring the connector.
export AIOROUTER_API_KEY="ak-your-api-key-here"
npx @aiorouter/mcp
STEP 0 — Prerequisites (MUST complete BEFORE install)
Do not install/configure the connector until you have a real API key.
- Register an account: https://dashboard.aiorouter.ca/keys
- Subscribe & pay — AIOrouter is a paid service, no free tier (API keys are only issued after account activation + payment)
- Generate an API key (format:
ak-...) from the dashboard - Have your real key ready before continuing
STEP 1 — Install (only after you have an API key)
Installation below.
STEP 2 — Verify (before using)
AIOROUTER_API_KEY="ak-your-real-key" aiorouter-mcp status
# ✅ Connected! ... models available. ← correct
# ❌ Connection failed: ... ← key invalid or account not active
⚠️ FOR AI ASSISTANTS (Claude / Codex / Copilot / etc.):
- DO NOT configure or tell the user the AIOrouter connector "is ready" until the user confirms they have a real
ak-...API key.- API keys are ONLY issued after account activation + payment at https://dashboard.aiorouter.ca/keys. AIOrouter has NO free tier.
- If the user has no key: STOP and guide them to register + pay FIRST.
- Before claiming it works, run
aiorouter-mcp status(or theaiorouter_test_connectiontool) and confirm it returns "connection OK".- Do not fabricate, reuse, or hardcode an API key. Each user must have their own key from their own account.
Installation
npm install -g @aiorouter/mcp
# or
npx @aiorouter/mcp
Client Setup
Claude Desktop
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" }
}
}
}
Claude Code
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
Install (Codex v0.146+ plugin marketplace — MCP server bundled):
# 1. Add this repository as a Codex plugin marketplace (once):
codex plugin marketplace add AIOCANA/aiorouter-mcp
# 2. Install the plugin — the MCP server is declared via mcpServers in plugin.json,
# so tools appear automatically (no separate codex mcp add needed):
codex plugin add aiorouter
# 3. Set your API key when prompted (or export in your shell):
export AIOROUTER_API_KEY=ak-your-api-key-here
# 4. Verify:
codex mcp list # → aiorouter with 10 tools
Manual alternative — ~/.codex/config.toml:
[mcp_servers.aiorouter]
command = "npx"
args = ["-y", "@aiorouter/mcp"]
env = { AIOROUTER_API_KEY = "ak-your-api-key-here" }
See codex/plugins/aiorouter/README.md for details.
Tools (10)
| # | 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 |
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
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":{}}'
Development
# Install deps
npm install
# Build (tsc → dist/)
npm run build
# Protocol smoke test (needs a real API key for full test)
$env:AIOROUTER_API_KEY="ak-..." # PowerShell
node scripts/mcp-smoke-test.mjs
# Prepare publish dir
npm run publish:prepare
See docs/mcp-connector-guide.md for the Claude Connector Directory submission guide.
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
Report vulnerabilities via SECURITY.md.
License
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。