On this pageShort answer

Claude Code Router: What It Is and How to Set It Up

Xtrusio6 min read
Focused developer working across several code monitors

Short answer

Claude Code Router (CCR) is a community-built local gateway that sends Claude Code requests to the provider and model you choose. Install its desktop app, add a provider, start the server, apply the Claude Code profile and check Logs.

CCR runs on your machine and listens at http://127.0.0.1:3456 by default. Anthropic does not support routing Claude Code to non-Claude models through a gateway, so treat CCR as an open-source community tool rather than an Anthropic product.

Picture a developer who uses Claude Code all day and wants a second provider ready. A long session can then continue on another model when the first one is not the right fit. CCR puts that choice in one local control panel.

Before you start

  • Install Claude Code.
  • Get an API key from the provider you want to use.
  • Install the CCR desktop app, or install Node.js 22 or newer for the npm route.

At the end, requests sent through http://127.0.0.1:3456 should appear in Logs with the resolved provider and model.

What Claude Code Router does

CCR gives coding agents one stable local endpoint. Behind it, you manage providers, models, accounts and routing rules. You can change a provider without editing the agent's configuration again.

The project lists Claude Code, Claude Design, Codex and several other agents. It works with OpenAI, Anthropic, Gemini, OpenRouter, DeepSeek and other compatible endpoints. Its routing tools add retries, credential pools, key rotation and ordered fallback models.

Logs show the resolved provider and model, status, token use, latency and errors. CCR can also add web search, vision and MCP tools to models. The project uses the MIT License, and its full documentation is at ccrdesk.top.

CCR can also connect Codex. Keep that agent's own choices in your Codex CLI configuration; use CCR for the provider route.

Setup at a glance

Route

What you need

Management screen

Gateway

First check

Desktop app

macOS, Windows or Linux app

Inside the app

http://127.0.0.1:3456

Open Logs

npm CLI

Node.js 22 or newer

http://127.0.0.1:3458

http://127.0.0.1:3456

Open Logs

Source: Claude Code Router README, read 3 November 2026.

What Anthropic supports, and what it does not

Anthropic says a gateway can work when it exposes a supported API format. ANTHROPIC_BASE_URL is the variable that points Claude Code at that gateway. For the surrounding options, see the guide to Claude Code settings.

Anthropic doesn’t endorse, maintain, or audit third-party gateway products, and doesn’t support routing Claude Code to non-Claude models through any gateway.

Official wording: Anthropic, LLM gateway configuration, read 3 November 2026, code.claude.com.

A base URL by itself does not replace a claude.ai subscription login. When a gateway credential is active, requests carry that credential instead and the subscription limits do not apply to them. Keep the gateway updated because a gateway that does not forward a new Claude Code capability breaks that feature.

Set it up in the desktop app

Use these moves in order: add a provider, start the server, apply the Claude Code profile, then check the logs.

Add a provider; Start the server; Apply the Claude Code profile; Check the logs

1. Add a provider

Download Claude Code Router for macOS, Windows or Linux from the project's GitHub Releases page and launch it.

Open Providers, then Add Provider.

Choose the provider and enter its API key. You should now see its connection fields.

Select the protocol and model, then save. For OpenAI, the README names Chat or Responses; for Anthropic, Messages; for Gemini, Generate Content or Interactions. It also lists OpenRouter and DeepSeek as supported providers. You should now see the provider in your saved provider list.

2. Start the server

Open Server and click Start. The local model gateway listens at http://127.0.0.1:3456 by default. You should now see the server running on port 3456.

3. Apply the Claude Code profile

Open Agent Config and choose Claude Code. Select a model and apply the profile. This provider route does not replace project instructions in CLAUDE.md or your slash commands. You should now see the Claude Code profile applied.

Return to Claude Code and send a small request through the applied profile. A request should now appear in Logs.

4. Check Logs

Check the resolved provider, model, status, tokens, latency and errors in Logs. You should now see the first request and its resolved route.

Open Routing when you want more control. Work through its fields in this order: conditions, retries, request rewrites, then fallback models.

Set it up from the command line

The npm route needs Node.js 22 or newer. Install CCR and open its management UI with the commands from the project README.

npm install -g @musistudio/claude-code-router
ccr ui

Open http://127.0.0.1:3458 and follow the same Providers flow. The model gateway stays at http://127.0.0.1:3456. You should now see the management UI and the same provider controls as the desktop app.

Our example: a routing plan for one developer

Our example (illustrative): FallbackPlan. Replace every all-caps placeholder with the exact value from your own provider account or CCR's discovered model list.

  • Main provider: OpenRouter. Use the built-in preset, enter YOUR_OPENROUTER_API_KEY, select the protocol, and choose YOUR_OPENROUTER_MODEL_ID from the discovered models.
  • Ordered fallback: DeepSeek. Enter YOUR_DEEPSEEK_API_KEY, select its protocol, and choose YOUR_DEEPSEEK_MODEL_ID, then place it after the OpenRouter route.
  • Create a separate CCR client key, the local credential CCR gives an agent. Set its expiry and local request, token or image limits to match the developer's own budget.
  • After the first request, read Logs for the resolved provider, model, status, tokens, latency and any error.

Open Routing to add the ordered fallback. This setup changes where requests go; it does not promise a price, speed or quality result.

Check it worked, and fix common problems

Logs are the clearest first check. If no request appears, confirm that the server runs at http://127.0.0.1:3456 and that the Claude Code profile is applied.

  • No authentication: a value for ANTHROPIC_BASE_URL alone does not replace a gateway credential or subscription login.
  • Wrong screen: the CLI management UI uses port 3458; model requests use port 3456.
  • A Claude Code feature breaks: update the gateway so it can forward the capability Claude Code now sends.
  • The wrong model answers: read the resolved route in Logs, then check the selected profile and Routing rules.

Choose the route, then check how AI describes your product

Choosing which model answers your code matters; seeing how AI engines describe your product matters too. Xtrusio plans content from the searches the engines run, a strategist approves it, and each piece counts only when an engine cites that exact URL.

Get your free AI visibility check to see when ChatGPT and Gemini mention your business, which competitors appear instead and what to work on next.

Frequently asked questions

Is Claude Code Router made by Anthropic?

No. CCR is a community-built, open-source project under the MIT License. Anthropic does not endorse, maintain or audit third-party gateways.

Does Claude Code Router work with non-Claude models?

CCR lists OpenAI, Gemini, OpenRouter, DeepSeek and other compatible providers. Anthropic does not support routing Claude Code to non-Claude models through a gateway.

Which port does Claude Code Router use?

The model gateway listens at http://127.0.0.1:3456 by default. The npm management UI opens at http://127.0.0.1:3458.

Do I need the command line?

No. The project recommends its desktop app for macOS, Windows and Linux. The npm CLI is another route and needs Node.js 22 or newer.

How do I see which model answered?

Open Logs after a request. It shows the resolved provider and model, status, token use, latency and errors.

Sources

Topics

  • claude code router

Xtrusio

AI visibility research

Xtrusio is the Perception Engine for B2B brands.