Managing Claude Code Provider configurations has never been easier.
Configuring API Providers for Claude Code traditionally requires manually editing JSON files, memorizing various API endpoints, and handling complex OAuth authorization flows.
CC Switch UI lets you manage all of this in a browser-first workflow:
- One-click Provider Switching: Instantly switch between 50+ model providers without ever touching a config file.
- Built-in Presets: 50+ pre-configured providers (DeepSeek, OpenAI, Anthropic, Google, Copilot, Codex, MiniMax, etc.).
- Dual Authentication Support: Supports both API Key and OAuth authentication flows.
- Direct Config + Local Route: Manage direct provider config and local route takeover separately.
- Real-time Live Sync: Changes are immediately synchronized with your local Claude Code configuration and take effect instantly.
- All core features complete: Providers (50+ presets), local route takeover, MCP Servers, Skills, Proxy, OAuth, Usage tracking.
- Backend database module modularized into domain sub-modules (
providers,mcp,skills,proxy,usage,migrations,types). - Proxy streaming pipeline modularized under
cc-switch-server/src/proxy/streaming/. - Usage supports both proxy-mode logs and Claude local session-log sync (
~/.claude/projects/*/*.jsonl). - Custom providers now support endpoint detection, model list fetch, and protocol-specific routing (
anthropic,openai_chat,openai_responses).
50+ providers with presets, including:
| Provider | Type | Auth Method | Description |
|---|---|---|---|
| Anthropic | Official | API Key | Claude Opus, Sonnet, Haiku models |
| OpenAI | Official | API Key | GPT series, o-series models |
| DeepSeek | Official | API Key | DeepSeek V4, R1 models |
| Google Gemini | Official | API Key | Gemini 2.5, 2.0 models |
| Copilot | GitHub | OAuth | GPT, Claude via GitHub Copilot |
| Codex | OpenAI | OAuth | ChatGPT Plus/Pro subscription |
| MiniMax | Official | API Key | M2.7 and other models |
| SiliconFlow | Aggregator | API Key | Various models |
| OpenRouter | Aggregator | API Key | 200+ Models available |
The easiest way to install CC Switch UI is using our installation script:
curl -fsSL https://raw.githubusercontent.com/huangbogeng/cc-switch-ui/main/install.sh | bashAfter installation, simply run:
cc-switch-uiThe installer places the application under ~/.local/share/cc-switch-ui by default. User data stays in ~/.cc-switch, including the SQLite database.
cc-switch-ui start launches the backend server and serves frontend static assets (/ui) in one process (production mode).
# Start with defaults: 0.0.0.0:5007, proxy 15721
cc-switch-ui start
# Custom bind/proxy ports
cc-switch-ui start --host 127.0.0.1 --port 5007 --proxy-port 15721
# Health check
cc-switch-ui status
# Show version
cc-switch-ui version
# Diagnose installation/path/permission issues
cc-switch-ui doctorIf you prefer to build from source:
# Build frontend assets first (required for /ui in production mode)
cd cc-switch-ui && npm ci && npm run build && cd ..
# Build and run CLI entrypoint
cargo build --release
cargo run -p cc-switch-cli -- startOpen your browser and navigate to: http://localhost:5007/ui
(Note: An admin token is required for the first login, which can be found printed in your terminal startup logs.)
- Go to the Providers page in the dashboard.
- Select a preset or configure a custom endpoint.
- Enter your API Key if required.
- Optionally use Detect endpoint type and Fetch models for custom endpoints.
- Click Save and switch to it.
Claude Code will immediately start using the selected direct Provider.
- Stay on the Providers page.
- Pick a Route Target in the
Local Routepanel. - Start the local route.
Once started, Claude Code traffic goes to the local route first, then the route forwards requests to the selected target provider.
- 50+ built-in Provider presets for quick setup.
- Support for custom Provider configurations.
- One-click switching with real-time configuration sync.
- Endpoint-type detection for custom URLs.
- Model list fetch for OpenAI-compatible
/modelsendpoints. - Failover queue with circuit breaker.
- Codex: Device code OAuth flow for ChatGPT Plus/Pro subscription.
- GitHub Copilot: Device code OAuth flow with multi-account and GHES support.
- Multi-account management for both Codex and Copilot.
- Full CRUD management for MCP servers with JSON editor.
- Sync to
~/.claude.jsonpreserving other root fields. - Import from existing Claude Code config.
- Enable/disable toggle per server.
- Full CRUD management for Claude Code skills.
- Sync from SSOT (
~/.cc-switch/skills/) to~/.claude/skills/. - Import from
~/.claude/skills/and~/.claude/plugins/. - Collection grouping and enable/disable toggle.
- HTTP proxy on port 15721 (configurable).
- Provider adapter chain with request/response format conversion.
- Separate route target selection and route start/stop control.
- Circuit breaker per provider, failover queue.
- Streaming response transformation (Anthropic β OpenAI formats).
- Automatically writes direct configurations to Claude Code when switching Providers.
- Local route takeover can replace direct config at runtime without changing the selected direct provider.
- Merge-only env updates preserve other settings in
settings.json. - Completely eliminates the need to manually edit config files.
- Request logs and trend charts are sourced from
proxy_request_logs. - Session usage sync is available via
POST /api/usage/sync-sessionand can import Claude local JSONL sessions. - Data source breakdown is available via
GET /api/usage/sources(proxy/session_log). - Model pricing is used for session-synced records; proxy-ingested records currently keep
total_cost_usdempty/zero unless cost is filled later in the pipeline.
CC Switch UI is a browser-first Web architecture with a Rust workspace backend:
graph TD
%% Define Styles
classDef frontend fill:#0f172a,stroke:#3b82f6,stroke-width:2px,color:#f8fafc
classDef backend fill:#1e1e1e,stroke:#f97316,stroke-width:2px,color:#f8fafc
classDef library fill:#27272a,stroke:#10b981,stroke-width:2px,color:#f8fafc
classDef ext fill:#172554,stroke:#6366f1,stroke-width:1px,color:#cbd5e1
%% Nodes
UI["π» Browser (React UI)<br/>http://localhost:5007/ui"]:::frontend
subgraph CC_Switch_Server ["cc-switch-server (Rust + Axum)"]
API["π REST API<br/>/api/*"]:::backend
OAuth["π OAuth Handler<br/>codex / copilot"]:::backend
Proxy["π Local Proxy<br/>:15721"]:::backend
end
subgraph CC_Switch_Lib ["cc-switch-lib (Rust Core)"]
DB[("ποΈ SQLite DB<br/>rusqlite")]:::library
LiveConfig["β‘ Live Config<br/>File Sync"]:::library
OAuthCore["π OAuth Core<br/>Token Mgt"]:::library
McpSkills["π MCP & Skills<br/>CRUD + Sync"]:::library
end
ClaudeCode["π€ Claude Code<br/>CLI Tool"]:::ext
ProviderAPI["βοΈ Provider API<br/>Anthropic/OpenAI/etc."]:::ext
%% Connections
UI -- "HTTP /api/*" --> API
UI -- "OAuth Redirects" --> OAuth
API -.-> DB
API -.-> LiveConfig
API -.-> McpSkills
OAuth -.-> OAuthCore
Proxy -.-> OAuthCore
LiveConfig -- "Writes settings.json" --> ClaudeCode
ClaudeCode -- "Sends Prompts" --> Proxy
Proxy -- "Forwards Requests" --> ProviderAPI
| Environment Variable | Default Value | Description |
|---|---|---|
CC_SWITCH_ADMIN_TOKEN |
Auto-generated | Admin password for Web UI |
CC_SWITCH_PROXY_PORT |
15721 |
Port for the local proxy server |
CC_SWITCH_TEST_HOME |
- |
Home directory for testing purposes |
cd cc-switch-ui
npm install
npm run dev # Start dev server on http://localhost:5173
npm run build # Production build
npm run lint # Run ESLint checkscargo run -p cc-switch-server # Run backend server directly
cargo fmt && cargo clippy # Formatting and linting
cargo test # Run testscc-switch-ui/ # React frontend workspace
βββ src/
βββ api/ # API client layer
βββ components/ # Reusable UI components
βββ pages/ # Dashboard (read-only), Providers, MCP, Skills, Usage, etc.
cc-switch-server/ # Axum HTTP server (Rust)
βββ src/
βββ handlers/ # REST API handlers (providers, mcp, skills, etc.)
βββ proxy/ # HTTP proxy server with streaming conversion
cc-switch-lib/ # Shared core library (Rust)
βββ src/
βββ database/ # SQLite persistence (modularized)
β βββ types.rs
β βββ providers.rs
β βββ mcp.rs
β βββ skills.rs
β βββ proxy.rs
β βββ usage.rs
β βββ migrations.rs
βββ oauth/ # OAuth handling (Codex + Copilot)
βββ mcp.rs # MCP sync logic
βββ skills.rs # Skills sync + import logic
βββ config.rs # Configuration management
βββ live.rs # Live Config sync to settings.json
This project is a fork of the excellent cc-switch. Here are the main differences:
| Feature | cc-switch (Original) | CC Switch UI (This Project) |
|---|---|---|
| Deployment | Tauri Desktop App | Pure Web Service |
| System Tray | Supported | Not Supported |
| MCP Management | Supported | Supported |
| Skills Management | Not Supported | Supported |
| Cloud Sync | Supported | Not Supported |
| Multi-Account OAuth | Not Supported | Supported |
| Core Focus | Full feature set | Headless server for Claude Code CLI |
Built upon the excellent open-source project cc-switch.
This project is licensed under the MIT License.