A desktop application for managing and switching between different provider configurations & MCP for Claude Code and Codex.

This project is sponsored by Z.ai, supporting us with their GLM CODING PLAN.
GLM CODING PLAN is a subscription service designed for AI coding, starting at just $3/month. It provides access to their flagship GLM-4.6 model across 10+ popular AI coding tools (Claude Code, Cline, Roo Code, etc.), offering developers top-tier, fast, and stable coding experiences.
Get 10% OFF the GLM CODING PLAN with this link!
![]() |
Thanks to PackyCode for sponsoring this project! PackyCode is a reliable and efficient API relay service provider, offering relay services for Claude Code, Codex, Gemini, and more. PackyCode provides special discounts for our software users: register using this link and enter the "cc-switch" promo code during recharge to get 10% off. |
| Main Interface | Add Provider |
|---|---|
![]() |
![]() |
Core Capabilities
v3.6 Highlights
System Features
Download the latest CC-Switch-v{version}-Windows.msi installer or CC-Switch-v{version}-Windows-Portable.zip portable version from the Releases page.
Method 1: Install via Homebrew (Recommended)
brew tap farion1231/ccswitch
brew install --cask cc-switch
Update:
brew upgrade --cask cc-switch
Method 2: Manual Download
Download CC-Switch-v{version}-macOS.zip from the Releases page and extract to use.
Note: Since the author doesn't have an Apple Developer account, you may see an "unidentified developer" warning on first launch. Please close it first, then go to "System Settings" → "Privacy & Security" → click "Open Anyway", and you'll be able to open it normally afterwards.
Download the latest CC-Switch-v{version}-Linux.deb package or CC-Switch-v{version}-Linux.AppImage from the Releases page.
~/.claude.json (Claude) or ~/.codex/config.toml (Codex)Claude Code
~/.claude/settings.json (or claude.json)env.ANTHROPIC_AUTH_TOKEN or env.ANTHROPIC_API_KEY~/.claude.json → mcpServersCodex
~/.codex/auth.json (required) + config.toml (optional)OPENAI_API_KEY in auth.json~/.codex/config.toml → [mcp_servers] tablesGemini
~/.gemini/.env (API key) + ~/.gemini/settings.json (auth type for quick switching)GEMINI_API_KEY inside .env~/.gemini/.env so the Gemini CLI picks up the new credentials immediatelyCC Switch Storage
~/.cc-switch/config.json~/.cc-switch/settings.json~/.cc-switch/backups/ (auto-rotate, keep 10)Note: First launch auto-imports existing Claude/Codex configs as default provider.
┌─────────────────────────────────────────────────────────────┐
│ Frontend (React + TS) │
│ ┌─────────────┐ ┌──────────────┐ ┌──────────────────┐ │
│ │ Components │ │ Hooks │ │ TanStack Query │ │
│ │ (UI) │──│ (Bus. Logic) │──│ (Cache/Sync) │ │
│ └─────────────┘ └──────────────┘ └──────────────────┘ │
└────────────────────────┬────────────────────────────────────┘
│ Tauri IPC
┌────────────────────────▼────────────────────────────────────┐
│ Backend (Tauri + Rust) │
│ ┌─────────────┐ ┌──────────────┐ ┌──────────────────┐ │
│ │ Commands │ │ Services │ │ Models/Config │ │
│ │ (API Layer) │──│ (Bus. Layer) │──│ (Data) │ │
│ └─────────────┘ └──────────────┘ └──────────────────┘ │
└─────────────────────────────────────────────────────────────┘
Core Design Patterns
~/.cc-switch/config.jsonKey Components
v3.6 Refactoring
# Install dependencies
pnpm install
# Dev mode (hot reload)
pnpm dev
# Type check
pnpm typecheck
# Format code
pnpm format
# Check code format
pnpm format:check
# Run frontend unit tests
pnpm test:unit
# Run tests in watch mode (recommended for development)
pnpm test:unit:watch
# Build application
pnpm build
# Build debug version
pnpm tauri build --debug
cd src-tauri
# Format Rust code
cargo fmt
# Run clippy checks
cargo clippy
# Run backend tests
cargo test
# Run specific tests
cargo test test_name
# Run tests with test-hooks feature
cargo test --features test-hooks
Frontend Testing:
Test Coverage:
useProviderActions - Provider operationsuseMcpActions - MCP managementuseSettings series - Settings managementuseImportExport - Import/exportRunning Tests:
# Run all tests
pnpm test:unit
# Watch mode (auto re-run)
pnpm test:unit:watch
# With coverage report
pnpm test:unit --coverage
Frontend: React 18 · TypeScript · Vite · TailwindCSS 4 · TanStack Query v5 · react-i18next · react-hook-form · zod · shadcn/ui · @dnd-kit
Backend: Tauri 2.8 · Rust · serde · tokio · thiserror · tauri-plugin-updater/process/dialog/store/log
Testing: vitest · MSW · @testing-library/react
├── src/ # Frontend (React + TypeScript)
│ ├── components/ # UI components (providers/settings/mcp/ui)
│ ├── hooks/ # Custom hooks (business logic)
│ ├── lib/
│ │ ├── api/ # Tauri API wrapper (type-safe)
│ │ └── query/ # TanStack Query config
│ ├── i18n/locales/ # Translations (zh/en)
│ ├── config/ # Presets (providers/mcp)
│ └── types/ # TypeScript definitions
├── src-tauri/ # Backend (Rust)
│ └── src/
│ ├── commands/ # Tauri command layer (by domain)
│ ├── services/ # Business logic layer
│ ├── app_config.rs # Config data models
│ ├── provider.rs # Provider domain models
│ ├── mcp.rs # MCP sync & validation
│ └── lib.rs # App entry & tray menu
├── tests/ # Frontend tests
│ ├── hooks/ # Unit tests
│ └── components/ # Integration tests
└── assets/ # Screenshots & partner resources
See CHANGELOG.md for version update details.
Releases retains v2.0.3 legacy Electron version
If you need legacy Electron code, you can pull the electron-legacy branch
Issues and suggestions are welcome!
Before submitting PRs, please ensure:
pnpm typecheckpnpm format:checkpnpm test:unitMIT © Jason Young
$ claude mcp add cc-switch-web \
-- python -m otcore.mcp_server <graph>