Skip to content

MCP config files edited by hand are overwritten by cc-switch - cc-switch

Quick fix

cc-switch writes wholesale. Sync plugins through general config, and upgrade to v3.13.0 for the MCP cross-app leak fix.

Error output
每次重新打开 cc-switch 或执行任何 MCP 操作时,我的修改都会被覆盖,配置恢复到 cc-switch 数据库中的旧版本。
English translation

Every time I reopen cc-switch or perform any MCP operation, my changes are overwritten and the config reverts to the older version in the cc-switch database.

cc-switch writes local config files (`~/.claude/settings.json`, `~/.claude.json`) one way and wholesale (DB → live). Switching provider or triggering a sync overwrites the local file directly from the database snapshot, losing external hand edits, `enabledPlugins`, and `hooks`. Maintainers confirmed this is a design decision and recommend managing shared plugins through 通用配置 (general config). Separately, before v3.13.0 MCP sync was not strictly bound to app visibility, so config leaked across apps.

  1. For lost plugins and hooks, use 通用配置 (general config) to carry shared config between providers rather than editing local files directly.

    cc-switch UI 操作路径
    编辑供应商 通用配置面板 「从当前供应商提取」
    新建供应商时勾选「写入通用配置」
  2. For the MCP cross-app leak, upgrade cc-switch to v3.13.0 or newer, which improved the per-app sync mechanism.

  3. Avoid editing managed config files such as `~/.claude.json` by hand outside cc-switch — do all MCP additions, changes, and deletions in the cc-switch UI.

Toolcc-switch
Versionv3.13.0 修复了 MCP 泄漏,全量覆盖为当前设计
PlatformsWindowsmacOSLinux
Why do plugins I configured in `~/.claude/settings.json` disappear after switching provider?
cc-switch writes settings.json wholesale and overwrites the local file from the database snapshot on a switch. Extract and sync your plugin config through 通用配置 (general config).
I turned OpenCode display off in cc-switch — why did its MCP still leak into Codex?
A bug before v3.13.0: disabling the UI display did not stop the background import at startup. From v3.13.0, each MCP server has its own per-app enable flag.

This is an unofficial community wiki with no affiliation to the cc-switch authors or the project itself. Its content is compiled from the project's public GitHub issues. This site distributes no software.