Add 'claude mcp disable/enable' for persistent server toggling
Problem
There's no way to persistently disable an MCP server without removing it entirely. The current options are:
/mcpdisconnect — works mid-session but resets on next session startclaude mcp remove/add— persistent but destructive; loses config (env vars, args, transport settings)disabledMcpServersin.claude.json— exists internally but has no CLI surface and is overridden by cloud-synced integrations
For users with several MCP servers that are useful across many repos (registered at user scope), there's no way to keep them installed but dormant until needed.
Proposed Solution
claude mcp disable <name> # persists across sessions
claude mcp enable <name> # re-enables without re-adding
This would write to the existing disabledMcpServers array in .claude.json — the mechanism already exists, it just lacks a CLI interface.
Ideally, the agent should also be able to invoke this programmatically (not just the interactive /mcp menu), so it can manage context budget autonomously.
Why This Matters
- MCP tool definitions consume context tokens even when idle
ENABLE_TOOL_SEARCHhelps with context cost but doesn't eliminate the server startup/connection overhead- Users who work across many repos can't scope servers to projects without duplicating config everywhere
- Cloud-synced integrations (e.g.,
claude.ai Google Calendar) re-enable themselves even after being disabled in.claude.json
Current Workaround
ENABLE_TOOL_SEARCH=auto:5 defers tool schema loading, which mitigates the context cost but doesn't address the underlying control gap.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗