Claude Code Router (CCR)
One local control plane for every AI agent: route, fail over, extend, and observe from a single app.
Evidence shows the project provides a local gateway, API key management, routing rules, and logging, but does not clearly specify least privilege, user confirmation, data flow transparency, sensitive data handling, dependency security, external effects, rollback, and source attribution. Therefore, these criteria are only partially met, scoring 1.
The project includes unit tests and architecture tests, indicating some consistency, but dependency availability and failure messages are not detailed enough, so scores are 1 or 2.
The project targets multiple agents and providers, offering rich configuration options, but capability boundaries and trigger precision are not detailed, so score 2.
The project provides detailed README, installation instructions, examples, and documentation, but known limitations and changelog are unclear, so score 2.
The project offers multiple features like routing, failover, logging, but cost-benefit and output usability are not quantified, so score 2.
The project provides tests and documentation, but the correspondence between claims and evidence is unclear, and external verification is lacking, so score 1.
- Publisher identity is unverified; proceed with caution.
- Dependency security is not explicitly audited; check supply chain risks.
- Sensitive data handling details are not disclosed; verify API key storage security.
What does this agent do, and when should you use it?
Claude Code Router (CCR) is a local model gateway that provides a stable local endpoint (default http://127.0.0.1:3456) for coding agents including Claude Code, Claude Design, Codex, Grok CLI, Kimi CLI, Kilo Code, OpenCode, Pi, and ZCode. It supports protocols like OpenAI Chat/Responses, Anthropic Messages, Gemini Generate Content/Interactions, OpenRouter, DeepSeek, SiliconFlow, Moonshot, Kimi Code, Mistral, Z.AI, Bailian, and custom compatible endpoints. CCR offers a desktop app (macOS, Windows, Linux), a CLI via npm, and Docker deployment. Core capabilities include provider presets, model discovery, routing rules, retries, credential pools, key rotation, fallback models, Fusion vision, web search, MCP tools, and ToolHub. It provides detailed request logs, latency, token usage, cost estimates, and account status. The project is MIT-licensed and has an active community and sponsor support.
CCR runs as a local proxy that intercepts API requests from multiple AI agents and forwards them to chosen providers based on configured routing rules. It provides routing rules, credential pools, retries, fallback models, request rewriting, and conditional matching. It supports Fusion models (vision, web search, MCP tools) and ToolHub, extending capabilities via plugins. It logs requests and responses, including resolved provider, model, credential, status, latency, tokens, cost, and tool calls. It supports agent relay through Weixin iLink, WeCom, Slack, Discord, Telegram, LINE, Feishu, and DingTalk via AgentClaw.
- A developer using Claude Code who wants to switch models or providers without editing config files.
- A team using multiple AI agents (e.g., Claude Code and Codex) that wants to unify model configuration and credentials.
- A user needing high availability with retries, credential pools, and fallback models to keep requests running.
- A user wanting to add vision, web search, or MCP tool capabilities to existing models using Fusion and ToolHub.
- An organization requiring detailed audit logs, cost estimates, and performance metrics for AI usage.
- A user needing to relay agent requests through enterprise communication platforms like Slack or DingTalk via AgentClaw.
What are this agent's strengths and limitations?
- Centralizes management of multiple agents and providers, reducing configuration fragmentation.
- Supports built-in presets and custom endpoints, compatible with multiple protocols (OpenAI, Anthropic, etc.).
- Provides retries, credential pools, key rotation, and fallback models for high reliability.
- Extends model capabilities via Fusion and ToolHub, supporting vision, search, and MCP tools.
- Offers detailed logs and cost estimation for better observability.
- Active community and sponsor support, with ongoing development.
- Desktop app requires installing an Electron app, which may use significant system resources.
- CLI requires Node.js 22 or higher, which may not be available in older environments.
- Dependent on third-party API keys and subscriptions, with provider lock-in risk.
- Advanced routing and plugin configuration has a learning curve.
- Some features (e.g., AgentClaw) require additional external service configuration.
- Documentation is mostly in English, with limited Chinese resources.
How do you install or deploy this agent?
Desktop app: Download the installer for macOS, Windows, or Linux from GitHub Releases and launch it. CLI: Ensure Node.js 22+, run npm install -g @musistudio/claude-code-router, then execute ccr ui. Docker: Clone the repo and run docker compose up -d --build.
How do you use this agent?
After launching CCR, open Providers → Add Provider, choose a built-in preset or custom endpoint, enter the API key, select protocol and models. Start the server (default http://127.0.0.1:3456). In Agent Config, select your agent (e.g., Claude Code), choose a model, and apply the profile. Then use your agent normally; open Logs to see resolved provider, model, status, tokens, latency, and errors. Configure conditions, retries, request rewrites, and fallback models in Routing.
How does this agent compare with similar options?
Similar tools include LiteLLM and OpenRouter, but CCR focuses on a local control plane and agent management without relying on cloud services.
FAQ
Does CCR slow down request latency?
Can I use CCR without the desktop app?
ccr ui) provides a browser-based management UI, and Docker deployment is also available.