[Bug] /mcp command with no args resets .claude.json to minimal state, wiping all MCP server configs

Status Open
Reported on v2.1.222
Maintainer reply None cached
Activity 0 comments · opened Aug 5, 2026

Description

Running /mcp (with no arguments) resets the entire .claude.json configuration file to a minimal initial state, wiping out all mcpServers configurations and other user settings.

Steps to Reproduce

  1. Have multiple MCP servers configured in mcpServers section of ~/.claude.json
  2. In Claude Code, type /mcp and press Enter (no arguments)
  3. Observe .claude.json is replaced with a minimal config

Expected Behavior

/mcp with no arguments should display the current MCP server status. It should never modify the config file.

Actual Behavior

The entire .claude.json is overwritten — all mcpServers, projects, customApiKeyResponses, env settings, editorMode, etc. are lost.

Environment

  • Platform: macOS (darwin)
  • Claude Code version: 2.1.222
  • VSCode extension

Impact

This is data loss — user configuration is silently destroyed. Recovery is only possible if the user has manually created a backup.

View original on GitHub ↗