claude-model-router
Routes each task to the cheapest Claude model that still clears the quality bar — a Claude Code skill + MCP server that optimizes total cost to an acceptable answer, not sticker price.
Install / Use
claude mcp add manishk753 -- npx -y github:manishk753/claude-model-routerIf the server publishes to npm under a different name, use that package instead — check the repo README.
MCP Server
Model Context Protocol server
Quality Score
Category
AI & Machine LearningSupported Platforms
Tags
Our assessment of claude-model-router
claude-model-router scores 78/100 on our quality scale, 793rd of 961 AI & Machine Learning skills we index.
Its MCP Server is 3.5 KB long, well organised into 11 sections with 8 code examples: a solid amount of guidance for an agent.
It has 3 GitHub stars, so there is little community track record yet; judge it on its content.
Maintenance, license and trust
- The repository was last updated about 3 months ago, so claude-model-router is actively maintained.
- Our last check on 2026-09-06 found the source still online.
- It is released under the MIT license, a permissive license that allows use, modification and commercial use with attribution.
- Its trust signals score 92/100, with 1 caution from licensing, adoption, age or documentation. These come from repository metadata, not a code audit — read the skill file before letting an agent act on it.
claude-model-router compared with similar skills
All 4 of these similar skills score higher than claude-model-router; compare them before choosing.
| Skill | Score | Stars | Updated | Format |
|---|---|---|---|---|
| claude-model-router (this skill)by manishk753 | 78 | 3 | 3mo ago | MCP Server |
| claude-memby thedotmack | 100 | 96.4k | today | CLAUDE.md |
| Agent-Reachby Panniantong | 100 | 91.6k | 20d ago | CLAUDE.md |
| Understand-Anythingby Egonex-AI | 100 | 85.3k | 3d ago | CLAUDE.md |
| headroomby headroomlabs-ai | 100 | 74.4k | today | CLAUDE.md |
Frequently asked questions
- How do I install claude-model-router?
- Run
claude mcp add manishk753 -- npx -y github:manishk753/claude-model-router. The install tabs above show the steps for each supported agent. - Which AI agents does claude-model-router work with?
- It is written for Claude Code and Claude Desktop, as a MCP Server file. Other agents that read the same format can often use it too.
- Is claude-model-router safe to use?
- It is MIT-licensed and scores 92/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
- Is claude-model-router still maintained?
- The repository was last updated about 3 months ago, so claude-model-router is actively maintained.
Skill content
View source on GitHubModel Router
Route every task to the cheapest Claude model that still gets it right — and cut cost by ~60% vs always using the top model.

The catch it solves: the cheapest model is not the cheapest answer. Underpower a hard task and it fails, you retry on a bigger model, and you've paid twice. This router picks the right tier the first time — and escalates automatically if it's wrong.
- ✅ 100% routing accuracy on a held-out test set
- ✅ ~60% cheaper than always-top
- ✅ Pure Python, stdlib-only — nothing to
pip install
Requirements
- Python 3.9+
- (optional) the
claudeCLI — lets the installer auto-register the MCP server
Install
git clone https://github.com/manishk753/claude-model-router.git
cd claude-model-router
./install.sh
Installs the Claude Code skill, registers the MCP server (if claude is on your PATH), and runs a smoke test. Re-running is safe. Restart Claude Code afterward so the tools load.
Want just one piece?
| Command | Installs |
|---|---|
| ./install.sh | Skill + MCP server (all projects) |
| ./install.sh --skill | Skill only |
| ./install.sh --mcp-user | MCP server only (all projects) |
| ./install.sh --mcp | MCP server only (this project) |
| ./install.sh --help | Show help |
Use it
Run the examples below from the repo directory.
1. Command line
python3 -m router "Debug this race condition in our async job queue"
Returns JSON: model, tier, complexity, confidence, rationale, escalate_to.
Force the top tier for high-stakes work:
python3 -m router "Delete inactive users in production" --context '{"critical": true}'
2. Claude Code (skill)
Type /model-router <task>. Claude routes, then uses the returned tier's model — cheap → haiku, mid → sonnet, high → opus, top → fable.
3. MCP server
Exposes one tool: route_task(task, critical?, context_tokens?). The installer registers it for you. To do it by hand from the repo directory:
claude mcp add --scope user model-router -- python3 "$(pwd)/router/mcp_server.py"
Claude Desktop — add to claude_desktop_config.json (use the absolute path to router/mcp_server.py):
{"mcpServers": {"model-router": {
"command": "python3",
"args": ["/absolute/path/to/claude-model-router/router/mcp_server.py"]
}}}
4. Python API
pip install anthropic # only this path needs it
from router.dispatcher import dispatch
response, decision, attempts = dispatch("Debug this race condition: ...")
dispatch() routes, calls the chosen model, and auto-escalates one tier on failure.
Try the eval
python3 eval/run_eval.py # scores every strategy, prints a table
python3 eval/run_test.py # held-out set + writes eval/test_report.html
Configure
All model IDs, prices, tier cutoffs, and weights live in config.json — no code changes needed.
⚠️ Model IDs and prices change over time. Verify them against the live API.
Tune: run python3 eval/run_eval.py, read the misroute list, then adjust tier_cutoffs first, weights second, keyword banks last.
How it works
Free deterministic heuristics handle clear cases. A tiny Haiku classifier breaks ties only on ambiguous tasks. A capped escalation path catches the rest. Full decision contract and rules: SKILL.md.
Related Skills
claude-mem
96.4kPersistent Context Across Sessions for Every Agent – Captures everything your agent does during sessions, compresses it with AI, and injects relevant context back into future sessions. Works with Claude Code, OpenClaw, Codex, Gemini, Hermes, Copilot, OpenCode + More
Agent-Reach
91.6kGive your AI agent eyes to see the entire internet. Read & search Twitter, Reddit, YouTube, GitHub, Bilibili, XiaoHongShu — one CLI, zero API fees.
Understand-Anything
85.3kGraphs that teach > graphs that impress. Turn any code into an interactive knowledge graph you can explore, search, and ask questions about. Works with Claude Code, Codex, Cursor, Copilot, Gemini CLI, and more.
headroom
74.4kCompress tool outputs, logs, files, and RAG chunks before they reach the LLM. 20% fewer tokens for coding agents, 60-95% fewer tokens for JSON, same answers. Library, proxy, MCP server.
Languages
Trust signals
From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.
