Configuring Claude Desktop in CC Switch
When you use Claude Desktop for local coding workflows (such as its integrated Claude Code sessions or local desktop agent runs), CC Switch lets you manage the underlying RKAPI provider profile cleanly—without juggling environment scripts or manually editing configuration JSON files.
Scope of Desktop Configuration
Claude Desktop's hosted web-chat tab uses your consumer account directly, whereas local Claude Code / desktop coding sessions rely on local Anthropic environment configuration (~/.claude/settings.json). CC Switch manages that local provider layer so every Claude Code session launched from your terminal or desktop environment routes cleanly through https://api.zwwbai.com. For standalone desktop integration patterns (including MCP and proxy notes), also see Claude Desktop.
Prerequisites
- Claude Desktop and CC Switch installed on macOS or Windows.
- An RKAPI API key (
sk-...) from https://s2pbxm0xv5y.adtyai-fz.top with Claude models enabled. - Conflicting system environment variables cleared (see Common Configuration).
Step 1: Create the RKAPI Profile in CC Switch
- Open CC Switch and select the Claude Code provider view.
- Add or edit your RKAPI profile with the exact Anthropic-compatible parameters:
| Field | Value | Notes |
|---|---|---|
| Provider Name | RKAPI | E.g., RKAPI - Desktop |
| API Base URL | https://api.zwwbai.com | No /v1 suffix; never use https://s2pbxm0xv5y.adtyai-fz.top |
API Key (ANTHROPIC_AUTH_TOKEN) | sk-your-api-key | Paste your API key from RKAPI |
| Default Model | claude-sonnet-4-6 | Check active IDs on https://s2pbxm0xv5y.adtyai-fz.top/pricing |
- Review the JSON configuration preview:
{
"env": {
"ANTHROPIC_BASE_URL": "https://api.zwwbai.com",
"ANTHROPIC_AUTH_TOKEN": "sk-your-api-key",
"ANTHROPIC_MODEL": "claude-sonnet-4-6",
"CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC": "1"
}
}- Save and click Enable / Switch so CC Switch writes the active settings to
~/.claude/settings.json(or%USERPROFILE%\.claude\settings.jsonon Windows).
Step 2: Fully Restart Claude Desktop
Desktop Electron apps read local environment and settings files when spawning new worker processes. After activating or switching a profile in CC Switch, perform a complete restart of Claude Desktop:
macOS
- Focus Claude Desktop and press
Cmd + Q(clicking the red close button only hides the window). - Check the macOS menu bar at the top right; if the Claude icon is still running, click it and choose Quit.
- Reopen Claude Desktop from Applications or Spotlight.
Windows
- Close the Claude Desktop window.
- Look in the Windows System Tray (bottom-right taskbar overflow area), right-click the Claude icon, and choose Quit.
- If needed, open Task Manager and verify no
Claude.exeprocesses remain before launching Claude Desktop again.
Step 3: Verify Clean Routing
- Start a new local coding session in Claude Desktop (or open a fresh session after restart).
- Send a lightweight prompt to confirm a normal reply.
- Open https://s2pbxm0xv5y.adtyai-fz.top/usage-logs and verify the request appears with your expected API key and model name.
Switching Profiles Cleanly
If you alternate between multiple RKAPI profiles (for example, a personal workspace key and a team shared-wallet key):
- Switch the active profile in CC Switch first.
- Start a new session (or fully restart Claude Desktop if an existing long-lived session stays bound to the prior key).
- Avoid editing
~/.claude/settings.jsonby hand while CC Switch is open so CC Switch remains the single source of truth.
Resolving Environment & Certificate Issues
Conflicting System Environment Variables
GUI desktop apps inherit OS-level environment variables that can override ~/.claude/settings.json:
- Windows: Open Environment Variables from Windows Search and remove old
ANTHROPIC_BASE_URL,ANTHROPIC_API_KEY, orANTHROPIC_AUTH_TOKENentries from both User and System scopes, then fully restart Claude Desktop. - macOS: Verify that
launchctl getenv ANTHROPIC_BASE_URLandlaunchctl getenv ANTHROPIC_AUTH_TOKENreturn empty results. Clear any old entry withlaunchctl unsetenv <VAR_NAME>.
TLS / Certificate Errors Behind Corporate Proxies
If requests fail with UNABLE_TO_VERIFY_LEAF_SIGNATURE, SELF_SIGNED_CERT_IN_CHAIN, or TLS handshake errors:
Confirm your system clock and time zone are accurate.
If you are behind a corporate SSL-inspecting proxy, export your company's root CA bundle in PEM format and set
NODE_EXTRA_CA_CERTSto its file path in your OS environment, then restart Claude Desktop.Avoid setting
NODE_TLS_REJECT_UNAUTHORIZED=0globally—disabling certificate verification weakens security across all Node-based desktop apps.Test TLS reachability outside the app with:
bashcurl -v https://api.zwwbai.com
Still Running Into Issues?
- For Anthropic protocol errors, login loops, or model selection errors, check the Claude Code FAQ.
- For standalone desktop configuration details and MCP workflow notes, see Claude Desktop.