claude-code - 💡(How to fix) Fix [BUG] MCP server configurations in mcpServers (stored per-project in ~/.claude.json) were wiped to {} after a Claude Code update [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#53000Fetched 2026-04-25 06:15:06
View on GitHub
Comments
1
Participants
2
Timeline
5
Reactions
1
Timeline (top)
labeled ×4commented ×1

Error Message

#1: Claude should warn before updating itself

Error Messages/Logs

RAW_BUFFERClick to expand / collapse

Preflight Checklist

  • I have searched existing issues and this hasn't been reported yet
  • This is a single bug report (please file separate reports for different bugs)
  • I am using the latest version of Claude Code

What's Wrong?

MCP server configurations in mcpServers (stored per-project in ~/.claude.json) were wiped to {} after a Claude Code update What happened: MCP server configurations in mcpServers (stored per-project in ~/.claude.json) were wiped to {} after a Claude Code update When: Around 2026-04-24 Impact: All custom MCP server definitions lost with no backup mechanism and no warning Feature request angle: Either (a) don't wipe mcpServers on update, or (b) back up ~/.claude.json before any migration

What Should Happen?

#1: Claude should warn before updating itself #2: It should not wipe out local settings #3: it should backup local settings.

Error Messages/Logs

Steps to Reproduce

I can't reproduce see description above

Claude Model

Sonnet (default)

Is this a regression?

Yes, this worked in a previous version

Last Working Version

No response

Claude Code Version

2.1.77 (Claude Code)

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

No response

extent analysis

TL;DR

The issue can be mitigated by manually backing up the ~/.claude.json file before updating Claude Code to prevent loss of custom MCP server definitions.

Guidance

  • Verify that the ~/.claude.json file is being overwritten during the update process by monitoring the file's contents before and after the update.
  • Consider creating a backup mechanism for the ~/.claude.json file to prevent data loss in the future.
  • Check if there are any configuration options or flags that can be used to prevent Claude Code from wiping the mcpServers settings during an update.
  • Reach out to the development team to request a feature to backup local settings before any migration or update.

Example

No code example is provided as it is not explicitly supported by the issue.

Notes

The issue lacks information on the exact update process and the changes made to the ~/.claude.json file. Therefore, the guidance provided is limited to mitigating the issue rather than providing a definitive fix.

Recommendation

Apply workaround: Manually back up the ~/.claude.json file before updating Claude Code to prevent loss of custom MCP server definitions. This is recommended because it provides a safe and reliable way to prevent data loss until a more permanent fix is implemented.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

claude-code - 💡(How to fix) Fix [BUG] MCP server configurations in mcpServers (stored per-project in ~/.claude.json) were wiped to {} after a Claude Code update [1 comments, 2 participants]