Plugin install/update/marketplace-add silently erases mcpServers and other user keys from settings.json

Resolved 💬 4 comments Opened Mar 30, 2026 by gmaldonado-qinetix Closed Mar 30, 2026

Summary

Plugin management operations (claude plugin install, claude plugin update, claude plugin marketplace add, claude plugin enable/disable) perform a full-file rewrite of settings.json. During the rewrite, any key that isn't part of the plugin system's expected schema — including user-configured mcpServers, permissions, and other top-level keys — is silently dropped without warning.

This is a regression that has affected multiple users across multiple Claude Code versions. We are filing this as an additional data point and to request the specific fixes described below.

Reference

This issue is directly related to:

  • #30109 (2026-03-02, OPEN): plugin install / marketplace add silently clears sandbox.filesystem configuration. Anthropic collaborator @dicksontsai acknowledged: "unrecognized nested keys get silently stripped on any settings write cycle is a bug." That acknowledgment is on record but no fix has shipped.
  • #15339 (2025-12-25, CLOSED as dup of #2688): Plugin system overwrites user settings including deny permissions.
  • #2688 (2025-06-28, CLOSED as NOT PLANNED): Original filing — "Adding new user-level permission erases existing content in settings.json" (v1.0.35).
  • #40714 (2026-03-29, OPEN): Auto-update to v2.1.87 wiped settings.json, settings.local.json, and plugin activation state entirely.

Our Specific Failure Mode (MCP Servers Erased)

A consumer using our plugin marketplace reported that their Linear MCP server configuration was silently erased from ~/.claude/settings.json after a routine claude plugin update operation. After the operation, only enabledPlugins and extraKnownMarketplaces remained in the file — all mcpServers configuration was gone.

The file went from:

{
  "enabledPlugins": [...],
  "extraKnownMarketplaces": [...],
  "mcpServers": {
    "linear": {
      "command": "...",
      "args": [...]
    }
  }
}

to:

{
  "enabledPlugins": [...],
  "extraKnownMarketplaces": [...]
}

No error. No warning. No backup. The user's MCP server configuration was unrecoverably lost (unless they happened to have it backed up elsewhere).

We confirmed our own plugin hook scripts do NOT touch settings.json at all — the destructive write is inside Claude Code's plugin management core.

Consumer Impact

  • Any user-configured mcpServers block in settings.json is at risk of silent erasure whenever a plugin operation is performed.
  • The loss is unrecoverable without a pre-existing backup.
  • The failure is silent — no log message, no warning, no error is surfaced to the user.
  • Users following the official documentation (which describes settings.json as the appropriate place for user-scope configuration) are not warned that plugin operations can destroy this configuration.
  • This affects all users who both: (a) install/manage Claude Code plugins, and (b) configure MCP servers at the user scope.

Requested Fixes

  1. Non-destructive merge write: When plugin operations update settings.json, merge the plugin-managed keys into the existing file rather than serializing a fresh object. Unrecognized keys must be preserved.
  1. Pre-write backup: Before any plugin operation that writes settings.json, write a backup copy (e.g., settings.json.bak) so users can recover if the write drops unexpected keys.
  1. Warning when schema drops keys: If the settings writer detects keys present in the existing file that will not be written to the new file, emit an explicit warning to the user before writing. Do not silently drop keys.

Any of these three approaches would prevent silent data loss.

Workaround (for affected users)

The official documentation indicates that MCP servers for user scope can be configured in ~/.claude.json instead of ~/.claude/settings.json. Moving mcpServers configuration to ~/.claude.json sidesteps the destructive write entirely, since plugin operations do not touch that file.

Project-scope MCP configuration in .mcp.json is also not touched by plugin operations.

---

Filed 2026-03-30 by Qinetix Group Management, LLC (plugin marketplace operator). We operate a Claude Code plugin marketplace and have multiple consumers affected by this class of bug.

View original on GitHub ↗

This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗