[BUG] Global MCP config in ~./claude.json empties routinely
Environment
- Claude CLI version: 1.0.21 (Claude Code)
- Operating System: Ubuntu 24.04.2 LTS (Noble Numbat)
- Terminal: Gnome Terminal
Bug Description
MCP server config prop in ~/.claude.json resetting routinely today, once was after update but it's happening frequently since.
Steps to Reproduce
reopen claude code
Expected Behavior
Claude code launches with normal config.
Actual Behavior
be prompted for spending mode and warned about prompt injection again (?).
mcpServers: {} in ~/.claude.json
note: There is no documentation about .claude.json vs .claude/settings.json that I can find however it will never read an mcp config from settings.json currently.
Take a look here, if your config file doesn’t parse (even due to a comment), it gets wiped
https://github.com/anthropics/claude-code/issues/1788#issuecomment-2986123456
I don't get any configuration errors / if my claude config changes beyond me constantly re-adding my mcp server object it's claude itself doing it. Am still encountering this issue fwiw (albeit less often). It's also not wiping my projects just my global mcp config.
This issue has been inactive for 30 days. If the issue is still occurring, please comment to let us know. Otherwise, this issue will be automatically closed in 30 days for housekeeping purposes.