[Feature Request] Enable quick-toggle for MCP servers
Resolved 💬 23 comments Opened Jun 8, 2025 by kylesnowschwartz Closed Oct 12, 2025
As a user of Claude Code who is often experimenting with my usage of the tool, I would like a way to quickly 'toggle' MCP servers on and off, so that I don't have to go through the claude mcp add and claude mcp remove everytime I want to make an adjustment to what's available to my user settings.
23 Comments
perhaps with a per-tool toggles as well? I often only need a tool or two from an server, filtering out the rest would be nice
It would be good to be able to assign mcp servers to subagents only and not need to pollute the main mode with all these tools that may only be required for special agents.
I can see
enabledMcpjsonServersanddisabledMcpjsonServersconfig in~/.claude.json. Perhaps use that for now?I think that is only per project setting. I don't see it in the global section.
any update on this?
I just discovered that certain MCP servers consume large amounts of context in sessions where I don't plan to use them, it would be great if those could be left in a disabled state and then enabled "on-demand" when I actually need them.
Also discovered MCP tools eat 30% of my context window. I use e.g. MCPs for bitbucket, Jira etc which I can have 90% of time disabled and enable onlyl when I specifically need.
Would be awesome to not take the hassle of editing .json file or doing other workaround stuff but had option e.g. inside
/mcpcommand to enable/disable the MCP.I made myself a small CLI tool with Claude here for this feature https://www.npmjs.com/package/claude-ext
For the record, I've been using https://github.com/ravitemer/mcphub.nvim which has been a really pleasant way to toggle on and off MCPs and individual tools. Neovim specific, obviously, ideally this feature is native to Claude Code.
Good on you for using ✗ and ✓. I'm so tired of LLMs churning out emojis!
It would be very useful to have MCP toggles that are independent from the general-purpose agent and other subagents. For example, I'd like to use the Supabase and Sentry MCPs with specific agents, without having them take up context or resources for my general agent. This way, the context window of my main agent remains clean, while I can selectively enable MCPs only where they're needed.
Agree with @zoeytabmedia!
Current situation makes using a bunch of mcp servers not worth it. Eg. the Azure devops mcp server is huge context wise.
You're absolutely right! lol
Although there's no command to do so, I just tested using
disabledMcpjsonServersin mysettings.local.json, and it worked perfectly. It works without regard toenableAllProjectMcpServersThis is a very important feature for me. I have a number of MCPs which accelerate my work, but I have to avoid using them because combined they consume too much context. I agree with @zoeytabmedia - per-agent MCPs make a lot of sense in this case.
Well done! Thanks for this! Will use until Claude gets their crap together and adds this simple feature built in... 🤦
Community Solution: claude-ext with Project Server Support
I've implemented a solution for this MCP server management need via a community tool enhancement.
What I Built
Enhanced claude-ext (https://github.com/jacobycwang/claude-ext) to support both global and project-specific MCP servers:
Pull Request: https://github.com/jacobycwang/claude-ext/pull/2
Features Added
✅ Unified MCP Server View: See all servers (global + project) in one interface
✅ Project Server Detection: Automatically finds
.mcp.jsonfiles in current directory✅ Full Toggle Control: Enable/disable both global and project servers
✅ Smart Management:
.mcp.jsonfiles are never modified (read-only source)Usage
Example Output:
Benefits
.mcp.json, global config manages activationThis addresses the core need for MCP server management while respecting Claude Code's architecture. Users get full control over which servers are active without breaking project-specific setups.
Technical Implementation
.mcp.jsonfrom current working directoryWould love feedback from the Claude Code team on this approach! It bridges the gap between Claude Code's MCP architecture and user management needs.
I have a slightly different approach than https://github.com/anthropics/claude-code/issues/1774#issuecomment-3273455792. Rather than global toggle, I use a per-session MCP server selection approach:
https://github.com/gsong/ccmcp
Hope this is added soon! I feel MCPs aren't worth using otherwise since I only need them occasionally, so don't want them bloating my context window
I just discovered the
/doctorcommand and saw:I only installed the github MCP to give myself an easy way to post claude plans to github issues, but it's using 71K tokens!? In addition to giving a way to toggle MCPs on/off (and their individual tools), it would be great if there was a warning for MCPs that by themselves trigger the context usage warning (> 25,000).
I tried using
disabledMcpjsonServersanddisabledMcpServersat the root setting level, and it didn't work.On the other hand, when I use
disabledMcpServersinside of aprojects: { "some_folder" : { "disabledMcpServers": [...] ....it does work.Is it _supposed_ to work at a root level? Because that would be much nice
It'd also be nice to be able to allow tools for subagents, but restrict for the main agent. Large context tools (like github) could then allowed only for a specific subagent, so it doesn't consume so much of the main agent's context.
This issue should be closed, as it has been resolved with the release of Claude Code 2.0.10:
This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.