Page summary

Configure Claude Desktop provider settings and local integration behavior.

2.6 Claude Desktop

Overview

The Claude Desktop page lets you manage Claude Desktop provider configurations in CC Switch.

Once enabled, you can:

Claude Desktop and Claude Code are separate app entry points. Claude Code uses ~/.claude/settings.json, while Claude Desktop uses its own 3P profile configuration. In CC Switch they appear as separate apps: "Claude" and "Claude Desktop"; the Claude Desktop icon in the sidebar has a small badge in the bottom-right corner to help distinguish them.

Support Scope

ItemDescription
Supported systemsmacOS, Windows, Linux
Flatpak noteThe Flatpak build of CC Switch always uses the host ~/.config and does not follow a custom XDG_CONFIG_HOME
Takes effectRestart Claude Desktop after switching providers
Official modeUses Claude Desktop built-in sign-in; no API key or endpoint URL required
Third-party modeWrites the 3P profile managed by CC Switch
MCP / SkillsClaude Desktop 3P profiles do not use CC Switch MCP / Skills sync

Quick Start

Step 1: Open the Claude Desktop Page

Select Claude Desktop in the app list in the left sidebar.

If the sidebar has no such entry, go to the "Apps" page in the sidebar and check under "Apps shown in the sidebar" that Claude Desktop is not hidden.

The Claude Desktop page has no "Direct / Routing / Aggregation" tabs: the connection is set per provider, and the connection bar at the top of the page shows whether the current provider is "Direct" or "Model mapping", along with the status of the routing service.

Step 2: Import or Add Providers

Many users configure providers in Claude Code first, then want to bring the same provider set into Claude Desktop. On first launch, or when entering the Claude Desktop page for the first time, if no providers exist here, click Import existing providers from Claude Code.

If you already have many providers configured in Claude Code, this one-click import saves you from re-entering endpoint URLs, API keys, and default models one by one.

Import rules:

After importing, review each provider's model mapping against your actual upstream models. Any model that is not a claude-sonnet-* / claude-opus-* / claude-haiku-* role ID—including non-Claude models like Kimi, DeepSeek, GLM, and DouBao, as well as legacy Claude IDs—usually needs model mapping mode.

If you already configured providers in Claude Code, prefer Import existing providers from Claude Code. This is the easiest migration path to Claude Desktop.

If there is nothing to import, or if you want to add a provider only for Claude Desktop, click the "Add Provider" button in the top-right corner of the page.

You can choose:

For native Anthropic Messages API providers that already accept Claude Desktop's three role IDs (claude-sonnet-* / claude-opus-* / claude-haiku-*), you usually only need to:

  1. Choose a preset or custom provider
  2. Fill in API Key
  3. Confirm API Endpoint
  4. Keep Needs model mapping off
  5. Click Add

Step 3: Switch and Restart Claude Desktop

Click "Switch" on a provider card; the current one then shows "In use".

After switching:

Note: Claude Desktop does not hot-reload configuration like Claude Code. After each provider switch, fully quit and reopen Claude Desktop.

Two Connection Modes

In "Connection Mode" on the provider edit page, choose "Direct" or "Model Mapping" (this corresponds to the "Needs model mapping" toggle); the card also marks it with a "Direct" or "Model mapping" badge.

Direct

Direct mode is for providers that already expose the Anthropic Messages API and can be reached by Claude Desktop directly.

In direct mode, CC Switch points the Claude Desktop 3P profile to the provider endpoint:

{
  "inferenceProvider": "gateway",
  "inferenceGatewayBaseUrl": "https://api.example.com",
  "inferenceGatewayAuthScheme": "bearer",
  "inferenceGatewayApiKey": "your API key"
}

Use this when:

The "Manually specify Claude Desktop models" option in direct mode is advanced. Most native Claude model providers do not need it because Claude Desktop can fetch /v1/models automatically.

Only fill it in when the provider's /v1/models is unavailable, or when the returned model names cannot be recognized by Claude Desktop. Manually entered model names must follow the claude-sonnet-*, claude-opus-*, or claude-haiku-* shape (legacy IDs like claude-3-5-sonnet-… are rejected).

Model Mapping

Model mapping is for providers whose models are not claude-sonnet-* / claude-opus-* / claude-haiku-* role IDs (including legacy Claude IDs and non-Claude models such as DeepSeek and Kimi), or when CC Switch needs to convert the API format.

After Needs model mapping is enabled, Claude Desktop connects to the CC Switch local gateway:

http://127.0.0.1:15721/claude-desktop

CC Switch handles:

  1. Exposing safe Claude model routes to Claude Desktop
  2. Mapping the model role selected in Desktop to the real upstream model
  3. Converting Anthropic / OpenAI / Gemini request formats as required by the provider
  4. Using the provider credentials saved in CC Switch to call upstream

Supported API formats:

FormatUsage
Anthropic MessagesNative or compatible Anthropic requests
OpenAI Chat CompletionsOpenAI-compatible /chat/completions
OpenAI Responses APIOpenAI Responses-compatible endpoints
Gemini Native generateContentGemini native API

In model mapping mode, Claude Desktop only sees the three role routes: claude-sonnet-*, claude-opus-*, and claude-haiku-*. Real upstream model names are not written directly into the Claude Desktop profile.

Configure Model Mapping

Field Reference

FieldDescription
Model roleSonnet / Opus / Haiku route recognizable by Claude Desktop
Menu display nameName shown in the Claude Desktop model menu
Requested modelReal upstream model ID sent to the provider
1MDeclares 1M context support to Claude Desktop

For Kimi:

Model roleMenu display nameRequested model1M
SonnetKimi K2kimi-k2Match provider capability

For DeepSeek:

Model roleMenu display nameRequested model1M
SonnetDeepSeek V4 Prodeepseek-v4-proMatch provider capability

The reason is that Claude Desktop now rejects models outside the Sonnet / Opus / Haiku role families, so CC Switch local routing performs a model mapping pass.

Multiple Role Mapping

You can configure Sonnet, Opus, and Haiku at the same time:

Model roleRecommended usage
SonnetDefault main model
OpusHigher quality or complex tasks
HaikuFast, lower-cost model

If the provider only has one model, filling in just one role's requested model is enough; blank roles automatically inherit the first filled model (Sonnet first), so the Haiku that sub-agents call is always available. Model mapping requires at least one requested model.

Routing Service

Model mapping needs CC Switch's routing service to forward requests; the service listens on 127.0.0.1:15721 by default. No manual switch is needed: when the current provider uses model mapping, the routing service starts automatically and keeps running; when the current provider is direct, the top of the page shows "Routing service: not needed by the current provider".

Status on the connection bar:

StatusDescription
Routing service RunningThe local gateway is running
The routing service couldn't startClick "Retry"; if the port is taken, click "Change port", which jumps to "Settings → Local routing" to change it
Routing service: not needed by the current providerThe current provider is direct, or in official mode

If other apps are using Routing or Aggregation, the routing service cannot be stopped. First go to "Settings → Local routing" and use "Switch all back to direct" to return those apps to Direct, then stop the service.

Restore Official Claude Desktop

To return to Claude Desktop official sign-in:

  1. Select Claude Desktop Official
  2. Click "Switch"
  3. Restart Claude Desktop

CC Switch restores Claude Desktop's official 1P mode and removes the 3P profile managed by CC Switch.

Official mode does not need an API key or the routing service.

When importing from Claude Code, CC Switch automatically adds Claude Desktop Official.

Configuration File Locations

CC Switch writes Claude Desktop 3P configuration files.

macOS

~/Library/Application Support/Claude/claude_desktop_config.json
~/Library/Application Support/Claude-3p/claude_desktop_config.json
~/Library/Application Support/Claude-3p/configLibrary/_meta.json
~/Library/Application Support/Claude-3p/configLibrary/00000000-0000-4000-8000-000000157210.json

Windows

%LOCALAPPDATA%\Claude\claude_desktop_config.json
%LOCALAPPDATA%\Claude-3p\claude_desktop_config.json
%LOCALAPPDATA%\Claude-3p\configLibrary\_meta.json
%LOCALAPPDATA%\Claude-3p\configLibrary\00000000-0000-4000-8000-000000157210.json

Linux

For a native Claude Desktop installation, CC Switch uses $XDG_CONFIG_HOME (or ~/.config when it is unset):

~/.config/Claude/claude_desktop_config.json
~/.config/Claude-3p/claude_desktop_config.json
~/.config/Claude-3p/configLibrary/_meta.json
~/.config/Claude-3p/configLibrary/00000000-0000-4000-8000-000000157210.json

When CC Switch itself is installed as a Flatpak, it deliberately uses the host ~/.config paths above rather than Flatpak's private XDG_CONFIG_HOME. This is a deliberate design boundary: CC Switch does not offer a configuration-directory override or attempt to follow a custom host XDG_CONFIG_HOME, because Flatpak replaces that value inside the sandbox and the original value cannot be determined reliably. Use the native CC Switch package if Claude Desktop uses a custom XDG configuration directory. The bundled Flatpak currently grants home-directory access; stricter custom Flatpak builds must grant read/write access to xdg-config/Claude and xdg-config/Claude-3p.

These files are maintained automatically by CC Switch. Manual edits are not recommended. If configuration becomes inconsistent, enabling the current provider again usually repairs it.

Status Messages

The top of the Claude Desktop page may show "Claude Desktop configuration needs attention".

MessageHow to handle
Current platform is not supportedUse CC Switch on macOS, Windows, or Linux
Profile contains model names outside the Sonnet / Opus / Haiku role familiesSwitch to the current provider again, or edit the provider to use model mapping
Model mapping is enabled but no valid route existsEdit the provider and add at least one model mapping
Local routing token has not been generatedSwitch to the provider again; CC Switch will write a new local token
Profile URL does not match the current providerSwitch to the current provider again so the profile points to the expected URL

FAQ

Switched successfully, but Claude Desktop did not change?

Fully quit and restart Claude Desktop. Claude Desktop usually reads the 3P profile on startup and does not hot-reload it after changes.

Model mapping provider request failed?

Check:

Why does my branded model name not appear in the Claude Desktop model menu?

Edit the provider, fill in Menu display name in model mapping, then switch to the provider again and restart Claude Desktop.

Why does direct mode fail?

Direct mode requires the provider to expose native Anthropic Messages API and accept Claude Desktop's three role IDs (claude-sonnet-* / claude-opus-* / claude-haiku-*). If the provider uses OpenAI, Gemini, non-Claude model IDs, or legacy Claude IDs (e.g. claude-3-5-sonnet-…)—any ID outside the three roles—direct mode fails, so enable Needs model mapping.

Can I close CC Switch?

It depends on the mode:

Are real upstream model names written into Claude Desktop?

Not with model mapping. The Claude Desktop profile only stores safe Sonnet / Opus / Haiku role routes and display names. Real upstream model names stay in the CC Switch provider configuration and are mapped when requests pass through the local gateway.

Next Steps