claude-code - 💡(How to fix) Fix Add disabled/enabled toggle for MCP servers [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#50826Fetched 2026-04-20 12:11:59
View on GitHub
Comments
1
Participants
2
Timeline
4
Reactions
0
Timeline (top)
labeled ×3commented ×1

Root Cause

  • Users with many MCP servers (10+) experience context bloat — each server adds deferred tools to every conversation
  • Removing and re-adding servers is friction-heavy, especially for cloud/OAuth MCPs that require re-authentication
  • Most users only need a subset of their servers in any given session
  • This is a common pattern in other tools (VS Code extensions, browser extensions, etc.)

Code Example

{
  "mcpServers": {
    "canva": {
      "command": "...",
      "enabled": false
    }
  }
}
RAW_BUFFERClick to expand / collapse

Feature Request

Add an enabled: false (or disabled: true) flag for MCP server configuration, so servers can remain in the config but not auto-load on startup.

Current Behavior

MCP servers are either configured (and auto-load every session) or not configured at all. There's no middle ground — if you want to stop a server from loading, you must claude mcp remove it entirely and re-add it later with all its configuration.

Desired Behavior

Allow something like:

{
  "mcpServers": {
    "canva": {
      "command": "...",
      "enabled": false
    }
  }
}
  • Servers with enabled: false stay in the config but don't auto-connect on startup
  • Users can toggle them on/off via /mcp dialog or claude mcp enable <name> / claude mcp disable <name>
  • This preserves all server configuration (command, args, env vars, auth tokens) between enable/disable cycles

Why This Matters

  • Users with many MCP servers (10+) experience context bloat — each server adds deferred tools to every conversation
  • Removing and re-adding servers is friction-heavy, especially for cloud/OAuth MCPs that require re-authentication
  • Most users only need a subset of their servers in any given session
  • This is a common pattern in other tools (VS Code extensions, browser extensions, etc.)

Suggested UX

  • claude mcp disable <name> — keeps config, stops auto-loading
  • claude mcp enable <name> — resumes auto-loading
  • /mcp dialog shows disabled servers with a toggle to re-enable

extent analysis

TL;DR

Add an enabled flag to the MCP server configuration to allow servers to remain configured but not auto-load on startup.

Guidance

  • Introduce a new configuration option enabled with a default value of true to the existing MCP server configuration.
  • Update the auto-load logic to check the enabled flag before loading a server.
  • Implement the suggested UX changes, including the /mcp dialog toggle and claude mcp enable/disable commands.
  • Consider adding validation to ensure that the enabled flag is properly handled when a server is added, removed, or updated.

Example

{
  "mcpServers": {
    "canva": {
      "command": "...",
      "enabled": false
    }
  }
}

This example shows how the enabled flag can be added to the existing configuration format.

Notes

The implementation details of the enabled flag and the auto-load logic may vary depending on the underlying architecture and technology stack.

Recommendation

Apply a workaround by introducing the enabled flag and updating the auto-load logic, as this will provide the desired functionality without requiring a full overhaul of the existing system.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING