Phantom Servers Persisting in MCP Status After Removal
Bug Description
Title: "MCP status command shows phantom servers after removal"
Description:
## Bug Description
The /mcp command shows persistent failed servers that don't exist in any MCP configuration.
## Steps to Reproduce
- Configure MCP servers with
claude mcp add - Remove all servers with
claude mcp remove - Verify with
claude mcp list(shows "No MCP servers configured") - Run
/mcpcommand
## Expected Behavior
/mcp should show no servers or indicate no servers are configured
## Actual Behavior
/mcp shows 8 phantom failed servers: analytics, customer, database, department, filesystem,
llm, payment, registry
## Environment
- Platform: macOS (Darwin 24.5.0)
- Claude CLI version: 1.0.6 (Claude Code)
- These phantom servers persist after:
claude mcp remove(all servers)- Cache clearing (
rm -rf ~/Library/Caches/claude-cli-nodejs) claude mcp reset-project-choices
## Evidence
claude mcp list→ "No MCP servers configured" ✓/mcp→ Shows 8 failed servers ✗- No .mcp.json file exists
- Servers not in Claude Desktop config
This makes MCP status unreliable and prevents proper MCP troubleshooting.
This clearly documents the inconsistency between the CLI commands and the interactive /mcp
status, which is definitely a bug that needs fixing.
Environment Info
- Platform: macos
- Terminal: vscode
- Version: 1.0.6
- Feedback ID: 233baee9-4e54-4a79-a16c-e1d830723946
Errors
[{"error":"Error: Command failed: security find-generic-password -a $USER -w -s \"Claude Code\"\nsecurity: SecKeychainSearchCopyNext: The specified item could not be found in the keychain.\n\n at genericNodeError (node:internal/errors:983:15)\n at wrappedFn (node:internal/errors:537:14)\n at checkExecSyncError (node:child_process:888:11)\n at execSync (node:child_process:960:15)\n at tG (file:///Users/cosburn/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:644:3921)\n at file:///Users/cosburn/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:572:6758\n at Q (file:///Users/cosburn/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:532:16886)\n at oR1 (file:///Users/cosburn/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:572:5777)\n at GG (file:///Users/cosburn/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:572:5406)\n at PU2 (file:///Users/cosburn/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:1976:21167)","timestamp":"2025-05-31T21:46:31.343Z"},{"error":"Error: EISDIR: illegal operation on a directory, read\n at Module.readSync (node:fs:740:18)\n at Object.readSync (file:///Users/cosburn/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:542:901)\n at QG (file:///Users/cosburn/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:545:260)\n at BI (file:///Users/cosburn/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:547:357)\n at file:///Users/cosburn/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:1827:1455\n at process.processTicksAndRejections (node:internal/process/task_queues:105:5)","timestamp":"2025-05-31T21:47:49.728Z"},{"error":"Error: EISDIR: illegal operation on a directory, read\n at Module.readFileSync (node:fs:441:20)\n at Object.readFileSync (file:///Users/cosburn/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:542:728)\n at BI (file:///Users/cosburn/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:547:375)\n at file:///Users/cosburn/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:1827:1455\n at process.processTicksAndRejections (node:internal/process/task_queues:105:5)","timestamp":"2025-05-31T21:47:49.729Z"},{"error":"Error: Language not supported while highlighting code, falling back to markdown: \n at file:///Users/cosburn/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:1368:418\n at Object.useMemo (file:///Users/cosburn/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:148:26271)\n at cQ9.useMemo (file:///Users/cosburn/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:52:15576)\n at PC (file:///Users/cosburn/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:1368:312)\n at nw (file:///Users/cosburn/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:148:19798)\n at kO (file:///Users/cosburn/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:150:42555)\n at jO (file:///Users/cosburn/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:150:38104)\n at R$ (file:///Users/cosburn/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:150:38032)\n at XE (file:///Users/cosburn/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:150:37886)\n at $W (file:///Users/cosburn/.npm-g
Note: Error logs were truncated.
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗