Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save jason-riddle/faa499de4a061a06fa24601482f78ab2 to your computer and use it in GitHub Desktop.
Save jason-riddle/faa499de4a061a06fa24601482f78ab2 to your computer and use it in GitHub Desktop.
Feature Request: MCP Server Enable/Disable Toggle for Claude Code

Feature Request: MCP Server Enable/Disable Toggle

Problem Statement

Currently, when adding an MCP server to Claude Code, the server is automatically enabled and cannot be disabled without removing it entirely. This creates challenges when:

  • Testing new MCP servers that may be unstable or broken
  • Temporarily disabling servers for debugging purposes
  • Managing multiple MCP servers where some should remain configured but not active
  • Developing MCP servers that need to be toggled on/off during development

Proposed Solution

Add an enable/disable toggle functionality for MCP servers that allows users to:

  1. Add servers in disabled state: Option to add an MCP server without immediately enabling it
  2. Toggle existing servers: Enable/disable servers that are already configured
  3. Persistent state: Remember the enabled/disabled state across Claude Code sessions

Suggested Implementation

Option 1: Configuration File Enhancement

Extend the MCP configuration to include an enabled field:

{
  "mcpServers": {
    "server-name": {
      "command": "node",
      "args": ["path/to/server.js"],
      "enabled": false
    }
  }
}

Option 2: CLI Commands

Add CLI commands for managing server state:

  • claude-code mcp disable <server-name>
  • claude-code mcp enable <server-name>
  • claude-code mcp list (show enabled/disabled status)

Option 3: Interactive Menu

Add an interactive menu when managing MCP servers that shows current status and allows toggling.

Benefits

  • Safer testing: Test new MCP servers without affecting stable workflows
  • Better debugging: Isolate issues by disabling specific servers
  • Flexible development: Easily toggle servers during development cycles
  • Improved user experience: Manage servers without losing configuration

Use Cases

  1. Developer testing a new MCP server: Add server in disabled state, enable when ready
  2. Troubleshooting: Disable potentially problematic servers to isolate issues
  3. Selective usage: Keep multiple servers configured but only enable needed ones
  4. CI/CD environments: Different enabled states for different environments

Current Workaround

Currently, users must completely remove and re-add MCP servers to "disable" them, which:

  • Loses configuration settings
  • Requires remembering server setup details
  • Creates friction in development workflows
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment