Claude Code Router CLI

A local gateway for Claude Code, Codex, OpenCode and other agents: pick model providers, route requests, set fallbacks and read logs

  • 37,899 ★ on the repository
  • Last commit
  • MIT
CLIEditors’ pick

Broad access

Why this level

  • Stores model provider API keys
  • All agent traffic, including project code, goes through the gateway to the chosen providers
All reasons and checks

musistudio/claude-code-router

Install

In your terminal, with SkillFoxx CLI

npx skillfoxx add cli/claude-code-router

Detects the agents on your machine, shows the access level and pins the version.

Other ways to install

Access and checks

How we review

Broad accessThe tool can change data, run commands or handle secrets.

  • Stores model provider API keys
  • All agent traffic, including project code, goes through the gateway to the chosen providers

This is third-party code. Review the repository files before installing.

What it does

CCR runs a single local endpoint that coding agents connect to, while you choose the providers and models behind it. Requests can be routed by conditions, rewritten, retried on failure and moved to a fallback model. It speaks the OpenAI, Anthropic and Gemini protocols and supports OpenRouter, DeepSeek, Moonshot, Mistral and custom compatible endpoints. The dashboard shows which provider and model served each request, token usage, latency and an estimated cost.

Who it is for. For developers who want to run Claude Code and similar agents on other providers' models or manage several keys in one place.

Good fit when

  • You want Claude Code to use DeepSeek, Kimi or your own OpenAI-compatible server
  • Several agents should share one set of keys and routing rules
  • You need retries and fallback models when a provider fails
  • You want to see token usage and the route of every request

Not a fit when

  • You use one agent with its default provider
  • Company policy forbids sending requests through a third-party gateway

Example request

Set up Claude Code to use DeepSeek and switch to another model when it fails

Limitations

You need your own keys or subscriptions with model providers. Availability from Russia depends on the chosen provider, some do not work without a VPN. The CLI requires Node.js 22 or newer. Agent quality on third-party models may differ from the native model.

How to disable. Remove the CCR profile from the agent in Agent Config, stop the server, then run npm uninstall -g @musistudio/claude-code-router or uninstall the desktop app.

FAQ

How does the desktop app differ from the CLI?

Both run the same gateway on port 3456. The CLI skips Electron and serves the management UI in the browser on port 3458.

Which agents can connect?

The README lists Claude Code, Codex, OpenCode, Kimi CLI, Grok CLI, Kilo Code, Pi and several apps, plus any client with a compatible API.

Discussion

No questions or reviews yet.

CLI tools

CCS

CCS - Claude Codex Switch

A CLI that switches Claude Code between accounts, providers and local models without editing configs

CLIBroad access2.9KRepository stars

A CLI that plugs third-party models into Claude Code orchestration: workflows, agent teams and subagents on DeepSeek, GLM, Kimi, Qwen or a Codex subscription

CLIBroad access185Repository stars

A Claude Code plugin that asks several AI models the same question and shows their answers side by side with a synthesis of agreement and divergence

PluginExtended access911Repository stars
Editors’ pick

Multi-agent orchestration for Claude Code: teams, roles, autopilot and task routing across skills and subagents

PluginBroad access40.4KRepository stars

A desktop app to switch providers and manage MCP servers, prompts and skills for Claude Code, Codex, Gemini CLI and other agents

CLIBroad access150KRepository stars
Needs a VPN

An MCP server that lets Claude Code, Codex and other agents call Gemini, GPT, Grok and local models for review, debugging and consensus

MCP serverExtended access11.8KRepository stars

README in short

The README presents CCR as a local gateway and control panel for coding agents. The main install is a desktop app for macOS, Windows and Linux, with an npm package that serves a web UI and a Docker option. Setup goes step by step: add a provider, start the server, apply an agent profile, check the logs. Extras include credential pools, web search and MCP tools for models, client key quotas and relaying the agent to chat apps. MIT licensed.

README badge

Report a problem

Foxx AIClaude Code Router
Foxx AI

I am Foxx AI and I have already vetted this tool. Ask about install, setup or anything else, and I will keep it simple.