[BUG] claude_desktop_config.json mcpServers block silently wiped shortly after every app start (Free plan, Windows)

Status Closed — not planned
Maintainer reply None cached
Activity 1 comment · opened Aug 27, 2026 · closed Aug 30, 2026

Preflight Checklist

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

What's Wrong?

Environment

  • Claude Desktop version: 1.37937.3.0
  • Platform: Windows
  • Claude Desktop install: config file located at %LOCALAPPDATA%\Packages\Claude_pzs8sxrjxfjjc\LocalCache\Roaming\Claude\claude_desktop_config.json
  • Account: Free plan, signed in via Google account
  • Config file: manually edited to add an mcpServers entry (Alpaca MCP server)

What's wrong
claude_desktop_config.json gets silently overwritten shortly after the app starts, removing the manually-added mcpServers block while keeping preferences intact. This is NOT limited to fresh login — it also happens on a normal app relaunch while already signed in.

Steps to reproduce (case A — fresh login)

  1. Fully quit Claude Desktop (verified no background process remains via Task Manager).
  2. Edit claude_desktop_config.json, adding an mcpServers entry alongside the existing preferences block.
  3. Reopen Claude Desktop. Before logging in, the file is unchanged — mcpServers is still present.
  4. Log in via Google account.
  5. Immediately after login, the mcpServers block is gone from the file.

Steps to reproduce (case B — already logged in, no explicit logout)

  1. Edit claude_desktop_config.json to add the mcpServers entry, while already signed in.
  2. Turn the PC off without quitting Claude Desktop via "Exit" (i.e. app left running/suspended).
  3. Turn the PC back on and reopen Claude Desktop (already authenticated, no login prompt).
  4. For a few seconds, the Alpaca MCP connection comes up successfully and is usable.
  5. Shortly after, the app shows a "connection interrupted" error for the MCP server, and re-checking the file shows mcpServers has been removed again.

Analysis
Case B suggests the overwrite is not specifically tied to the login flow, but to some background process that runs a few seconds after app start (most likely an automatic sync/rewrite of settings from the account) which replaces the whole config file instead of merging with it. This would explain why the MCP connection is briefly functional — it's initialized from the correct on-disk config — before failing once the background process overwrites the file out from under it.

Expected behavior
Any background settings sync on startup should merge with the existing config file (or at minimum leave the mcpServers key untouched), not silently replace the whole file.

Actual behavior
The mcpServers block is silently deleted a few seconds after every app start, with no warning, no error dialog explaining why, and no backup — only a generic "connection interrupted" message for the now-orphaned MCP server.

Example — file before overwrite:

{
  "preferences": { ... unchanged from before ... },
  "coworkUserFilesPath": "C:\\Users\\marco\\Claude",
  "mcpServers": {
    "alpaca": {
      "command": "C:\\Users\\marco\\.local\\bin\\uvx.exe",
      "args": ["alpaca-mcp-server"],
      "env": {
        "ALPACA_API_KEY": "...",
        "ALPACA_SECRET_KEY": "..."
      }
    }
  }
}

File after overwrite (mcpServers gone):

{
  "preferences": { ... same preferences block ... },
  "coworkUserFilesPath": "C:\\Users\\marco\\Claude"
}

Additional notes

  • Occurs on a Free plan account, not Team/Enterprise, so it doesn't appear to be Team cloud-sync specific.
  • Related issues describing similar (but not identical) overwrite behavior: #32345, #56296, #59368, #37286.
  • Currently working around the issue with a local script that watches the config file and re-injects the mcpServers block whenever it's stripped.

What Should Happen?

Claude should establish and mantain the mcp connection with alpaca and shoul not reset the claude_desktop_config file

Error Messages/Logs

2026-08-27T12:30:35.651Z [alpaca] [info] Server started and connected successfully { metadata: undefined }
error: Missing expected target directory for Python minor version link at C:\Users\marco\AppData\Roaming\uv\python\cpython-3.14.7-windows-x86_64-none
2026-08-27T12:30:36.601Z [alpaca] [info] Server transport closed { metadata: undefined }
2026-08-27T12:30:36.602Z [alpaca] [info] Server transport closed unexpectedly, this is likely due to the process exiting early. If you are developing this MCP server you can add output to stderr (i.e. `console.error('...')` in JavaScript, `print('...', file=sys.stderr)` in python) and it will appear in this log. { metadata: undefined }
2026-08-27T12:30:36.602Z [alpaca] [error] Server disconnected. For troubleshooting guidance, please visit our [debugging documentation](https://modelcontextprotocol.io/docs/tools/debugging) { metadata: { context: 'connection', stack: undefined } }
2026-08-27T12:30:36.603Z [alpaca] [info] Client transport closed { metadata: undefined }
2026-08-27T12:30:36.603Z [alpaca] [info] Client transport closed { metadata: undefined }
2026-08-27T12:39:20.102Z [alpaca] [info] Shutting down server... { metadata: undefined }
2026-08-27T12:39:20.102Z [alpaca] [info] Client transport closed { metadata: undefined }
2026-08-27T12:39:20.103Z [alpaca] [info] Initializing server... { metadata: undefined }
2026-08-27T12:39:20.103Z [alpaca] [info] Era probe verdict: legacy (exec lane pinned — no sibling probe) { metadata: undefined }
2026-08-27T12:39:20.107Z [alpaca] [info] Using MCP server command: C:\Users\marco\.local\bin\uvx.exe with path: {
  metadata: {
    paths: [
      'C:\\WINDOWS\\system32',
      'C:\\WINDOWS',
      'C:\\WINDOWS\\System32\\Wbem',
      'C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\',
      'C:\\WINDOWS\\System32\\OpenSSH\\',
      'C:\\Users\\marco\\.local\\bin',
      'C:\\Users\\marco\\AppData\\Local\\Microsoft\\WindowsApps',
      [length]: 7
    ]
  }
} %o
2026-08-27T12:39:20.136Z [alpaca] [info] Server started and connected successfully { metadata: undefined }
error: Missing expected target directory for Python minor version link at C:\Users\marco\AppData\Roaming\uv\python\cpython-3.14.7-windows-x86_64-none
2026-08-27T12:39:20.777Z [alpaca] [info] Server transport closed { metadata: undefined }
2026-08-27T12:39:20.778Z [alpaca] [info] Server transport closed unexpectedly, this is likely due to the process exiting early. If you are developing this MCP server you can add output to stderr (i.e. `console.error('...')` in JavaScript, `print('...', file=sys.stderr)` in python) and it will appear in this log. { metadata: undefined }
2026-08-27T12:39:20.778Z [alpaca] [error] Server disconnected. For troubleshooting guidance, please visit our [debugging documentation](https://modelcontextprotocol.io/docs/tools/debugging) { metadata: { context: 'connection', stack: undefined } }
2026-08-27T12:39:20.779Z [alpaca] [info] Client transport closed { metadata: undefined }
2026-08-27T12:39:20.779Z [alpaca] [info] Client transport closed { metadata: undefined }

Steps to Reproduce

1) exit from Claude desktop
2) cutomize the claude_desktop_config file indicated (with connection detail for Alpaca
3) enter Claude desktop
4) No error occurs and in Settings/Developer you can see the Alpaca connection up and running

Claude Model

None

Is this a regression?

Yes, this worked in a previous version

Last Working Version

_No response_

Claude Code Version

Desktop version: 1.37937.3.0

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

Terminal.app (macOS)

Additional Information

_No response_

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗