oroute-mcp
v0.1.1
Published
O'Route MCP Server — use 13 AI models from Claude Code, Cursor, or any MCP tool
Maintainers
Readme
O'Route MCP Server
Use 13 AI models (Claude, GPT, Gemini, DeepSeek, Qwen) from Claude Code, Cursor, or any MCP-compatible tool through a single unified interface.
What is this?
O'Route MCP Server exposes O'Route's intelligent routing engine as an MCP server. Once installed, your AI IDE (Claude Code, Cursor, or Claude Desktop) can call any of 13 AI models through O'Route with automatic optimization for:
- Task complexity — simple Q&A → Haiku, complex reasoning → Opus
- Cost — cheapest provider that meets quality bar
- Geography — lowest-latency provider for your region
- Fallback — auto-retry with a different provider on failure
Quick start
1. Install
npm install -g oroute-mcpOr run directly via npx without installing:
npx oroute-mcp2. Get an API key
Sign up at oroute.itshin.com and create an API key (free tier available).
3. Configure your MCP client
Claude Desktop
Edit ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):
{
"mcpServers": {
"oroute": {
"command": "npx",
"args": ["-y", "oroute-mcp"],
"env": {
"OROUTE_API_KEY": "orut_sk_..."
}
}
}
}Cursor
Add to .cursor/mcp.json:
{
"mcpServers": {
"oroute": {
"command": "npx",
"args": ["-y", "oroute-mcp"],
"env": {
"OROUTE_API_KEY": "orut_sk_..."
}
}
}
}Claude Code CLI
claude mcp add oroute npx -y oroute-mcpSet the API key in your shell:
export OROUTE_API_KEY="orut_sk_..."4. Use it
Once configured, your AI client has access to these O'Route tools:
| Tool | Purpose |
|------|---------|
| oroute_chat | Send a message, auto-routed to the best model |
| oroute_chat_with_model | Send a message to a specific model (override routing) |
| oroute_list_models | List all available models with capabilities |
| oroute_get_cost_estimate | Estimate cost before sending |
| oroute_get_usage | Query your current credit balance and usage |
Examples
In Claude Code
You: Use oroute to compare GPT-5 and Claude Opus on this prompt: "Explain the halting problem"
Claude Code: I'll use the oroute tool to send the prompt to both models.
[calls oroute_chat_with_model twice, compares outputs]In Cursor
Cursor: (while editing code)
> @oroute Generate a Python test for this function using Gemini 2.5 Pro
[Cursor calls oroute_chat_with_model with model="gemini-2.5-pro"]Supported models (13)
| Provider | Models | |----------|--------| | Anthropic | claude-opus-4-6, claude-sonnet-4-6, claude-haiku-4-5 | | OpenAI | gpt-5, gpt-4.1, gpt-4o-mini | | Google | gemini-2.5-pro, gemini-2.5-flash | | DeepSeek | deepseek-v3.2, deepseek-coder | | Qwen | qwen3-max, qwen3-coder | | Meta (via OpenRouter) | llama-3.3-70b |
Advanced usage
Routing hints
// Via tool arguments
oroute_chat({
messages: [{ role: 'user', content: '...' }],
cost_mode: 'cheapest', // 'cheapest' | 'balanced' | 'quality'
routing_strategy: 'auto', // 'auto' | 'cascade' | 'ensemble'
});Per-request tool use
O'Route passes through Anthropic-compatible tools arrays. Use any MCP tool from your client — O'Route forwards them to the selected model.
Ensemble mode (Pro+ plan)
oroute_chat({
messages: [...],
routing_strategy: 'ensemble', // sends to 2 providers, picks best
});With ENABLE_ADVISOR_TOOL=true, ensemble "pick better" decisions are made by Claude Haiku + Opus advisor for maximum accuracy.
Configuration
Environment variables:
| Variable | Default | Description |
|----------|---------|-------------|
| OROUTE_API_KEY | (required) | Your O'Route API key |
| OROUTE_API_URL | https://api.oroute.itshin.com | Custom endpoint (self-hosted) |
| OROUTE_DEFAULT_COST_MODE | balanced | Default cost mode |
| OROUTE_LOG_LEVEL | info | debug / info / warn / error |
Development
git clone https://github.com/netclaus/oroute
cd oroute/packages/mcp-server
npm install
npm run devTest with an MCP-compatible client:
# Use MCP inspector
npx @modelcontextprotocol/inspector npx oroute-mcpTroubleshooting
Server won't start
Check the API key is set:
echo $OROUTE_API_KEY # Should start with "orut_sk_""Unauthorized" errors
- Verify your API key at oroute.itshin.com/settings/api-keys
- Check credit balance (free tier: 1000 requests/month)
Slow responses
- Set
cost_mode: 'cheapest'to prefer faster models - Check status.oroute.itshin.com for incidents
- Try a different region: set
OROUTE_API_URLto a regional endpoint
Tool not showing up in Claude Desktop
- Restart Claude Desktop after editing config
- Check logs:
~/Library/Logs/Claude/mcp.log(macOS) - Validate JSON:
cat claude_desktop_config.json | jq
Security
- API key: Stored in MCP client config, never logged by the server
- Request body: Not logged server-side except for metrics aggregation
- User data: See oroute.itshin.com/privacy
Related
- O'Route homepage
- O'Route TypeScript SDK — for programmatic use
- O'Route CLI — for shell scripts
- MCP specification
License
MIT © 2026 O'Route
