Bug Description
Title: Stale claudeAiMcpEverConnected cache in ~/.claude.json injects full tool definitions for disconnected MCP connectors into every session
Summary: Every Claude Code CLI session is receiving full MCP tool/instruction payloads for 16 claude.ai connectors (bioRxiv, ChEMBL, Clinical Trials, CMS Coverage, ICD-10 Codes, Microsoft Learn, Microsoft 365, NPI Registry, Claude Docs, Gmail, Google Calendar, Google Drive, Open Targets, PubMed, Constant Contact, JAMF Doc MCP), none of which are relevant to the project (a local Python structural-biology codebase) and none of which are currently connected.
Evidence:
claude.ai → Settings → Connectors → filtered to "Connected" shows zero connectors.
Yet every message in the CLI session carries the full instruction block + tool schemas for all 16 of the above servers, confirmed across multiple turns, including mid-session disconnect/reconnect churn where the same servers dropped and re-attached.
~/.claude.json contains a top-level key claudeAiMcpEverConnected listing exactly these 16 connector names — a historical "ever connected" cache that does not appear to be invalidated when connectors are removed from the account, and appears to drive which tool defs get attached to CLI sessions.
Impact: Large, unnecessary token overhead on every message in every session, regardless of project or relevance, with no user-facing control to disable it (Connectors UI shows nothing connected, so nothing to turn off there).
Expected behavior: Tool/instruction payloads should only be attached for connectors currently connected, not historically-ever-connected. The claudeAiMcpEverConnected cache (or whatever consumes it) should sync with actual connector state.
Environment: Claude Code CLI, macOS (Darwin 24.6.0), native install.
Environment Info
- Platform: darwin
- Terminal: pycharm
- Version: 2.1.288
- Feedback ID: d17b13d0-3fce-4556-aa11-a58de3cc676e
Bug Description
Title: Stale claudeAiMcpEverConnected cache in ~/.claude.json injects full tool definitions for disconnected MCP connectors into every session
Summary: Every Claude Code CLI session is receiving full MCP tool/instruction payloads for 16 claude.ai connectors (bioRxiv, ChEMBL, Clinical Trials, CMS Coverage, ICD-10 Codes, Microsoft Learn, Microsoft 365, NPI Registry, Claude Docs, Gmail, Google Calendar, Google Drive, Open Targets, PubMed, Constant Contact, JAMF Doc MCP), none of which are relevant to the project (a local Python structural-biology codebase) and none of which are currently connected.
Evidence:
claude.ai → Settings → Connectors → filtered to "Connected" shows zero connectors.
Yet every message in the CLI session carries the full instruction block + tool schemas for all 16 of the above servers, confirmed across multiple turns, including mid-session disconnect/reconnect churn where the same servers dropped and re-attached.
~/.claude.json contains a top-level key claudeAiMcpEverConnected listing exactly these 16 connector names — a historical "ever connected" cache that does not appear to be invalidated when connectors are removed from the account, and appears to drive which tool defs get attached to CLI sessions.
Impact: Large, unnecessary token overhead on every message in every session, regardless of project or relevance, with no user-facing control to disable it (Connectors UI shows nothing connected, so nothing to turn off there).
Expected behavior: Tool/instruction payloads should only be attached for connectors currently connected, not historically-ever-connected. The claudeAiMcpEverConnected cache (or whatever consumes it) should sync with actual connector state.
Environment: Claude Code CLI, macOS (Darwin 24.6.0), native install.
Environment Info