🤖 GLM 4.6 | Cerebras AI
根据搜索结果,我现在可以准确解释你遇到的情况:
你遇到的情况分析
你使用的是 Claude Code 2.0.73 版本,这个版本正处于配置文件迁移期,这就是为什么会出现这种"混乱"情况的原因。
具体解释
1. 版本 2.0.73 的特殊状态
你的版本
2.0.73正处于从.claude.json向settings.json迁移的过渡阶段在这个版本中,** MCP 服务器配置仍然使用
.claude.json**但其他配置已经开始迁移到
settings.json
2. MCP 配置的特殊性
从搜索结果可以看出:
// List of possible configuration file paths in order of priority
const possibleConfigPaths = [
// Global user settings
path.join(homeDir, ".claude", "settings.json"),
// Local user settings
path.join(homeDir, ".claude", "settings.local.json"),
// Project-specific settings
path.join(currentDir, ".claude", "settings.json"),
// Project-specific local settings
path.join(currentDir, ".claude", "settings.local.json"),
// Main global config - 这里是 .claude.json
path.join(homeDir, ".claude.json"),
]MCP 服务器配置在 2.0.73 版本中仍然优先读取 .claude.json
3. 官方的迁移计划
根据搜索结果显示:
"We are in the process of migrating global configuration to settings.json"
"claude config will be deprecated in place of settings.json"
但是 MCP 配置的迁移还没有完成
4. 为什么你的命令修改了 .claude.json
当你运行:
claude mcp add context7 -s user -- cmd /c npx -y @upstash/context7-mcp@latest在 2.0.73 版本中,MCP 相关的命令仍然会:
读取
~/.claude.json中的 MCP 配置将新的 MCP 服务器写入
~/.claude.json
解决方案
短期解决方案(当前版本)
继续使用 .claude.json 来管理 MCP 服务器,这是 2.0.73 版本的正确做法。
长期解决方案
升级到最新版本:新版本可能已经完成了 MCP 配置的迁移
监控迁移进度:关注 Anthropic 的官方文档,了解何时 MCP 配置完全迁移到
settings.json
总结
你遇到的情况是正常的,不是 bug,而是版本迁移过程中的暂时状态:
Claude Code 2.0.73:MCP 配置仍在
.claude.json,其他配置开始迁移到settings.json最新版本:可能已经完全迁移到
settings.json
建议升级到最新版本以获得更一致的配置体验。