Selective MCP Tool Activation for Project-Specific Contexts
Status Closed — not planned
Maintainer reply ✓ Yes — dicksontsai
Activity 8 comments · opened Jul 9, 2025 · closed Jan 24, 2026
💡 Likely answer: A maintainer (dicksontsai, collaborator)
responded on this thread — see the highlighted reply below.
Bug Description
There's no way to enable or disable available MCP tools from within Claude Code, and there should be. The result is that I have iOS projects where CC is attempting to auth my web development MCP servers, and the web MCP servers are eating up valuable context in my iOS project. The same holds in the opposite direction.
Setting a project-scoped list of MCP servers and disallowed servers does not actually seem to override what's made available in CC for a given project, if global MCP servers are set.
Environment Info
- Platform: darwin
- Terminal: ghostty
- Version: 1.0.44
- Feedback ID: 34d2bb2c-a6db-4748-8705-d4dce39c150d
8 Comments
I agree that it would be great to support a settings level overriding another settings level for list settings (vs. the default of merging them together). Ideally users can choose at the higher settings level whether or not to merge. cc @rboyce-ant @bogini
I agree with this. I rarely want MCP enabled for a whole session, since I use most of the tools infrequently. If I want to use MCP I have to accept that I'm wasting tokens and hurting performance because of noise in my context that I may not even use in that session
It would be a huge improvement if we could enable/disable MCP from within a Claude session with a slash command. That way we can easily turn them on or off when needed without needing to quit and restart Claude.
Even better, my ideal scenario would be if we could give Claude the ability to itself run its slash commands. That way, I could create a custom slash command e.g.
\code_reviewwhich instructs Claude to first run\mcp add ...to enable the MCP, then calls a specific code review MCP tool, and disables it again afterwards.This has the added benefit of preventing collisions between tool names from different MCPs, which causes Claude to occasionally confuse the arguments between the two.
There is a similar comment here regarding the consumption of context by unneeded tool descriptions. This is an interesting problem. Allowing human operators to toggle servers and server components (tools, resources, etc.) easily is probably a useful quick solution. On the other hand, it somewhat works against the discovery and automaton provided by Claude. This could merit discussion at the protocol level, perhaps enriching the server
instructionfield, so that a minimum of context is sacrificed to tooling, but leaves the LLM able to interrogate further if desired. 🤔This issue has been inactive for 30 days. If the issue is still occurring, please comment to let us know. Otherwise, this issue will be automatically closed in 30 days for housekeeping purposes.
Additional Case: Server-Side Tool Exclusion Ignored
I'm experiencing this issue with Serena MCP using server-side
excluded_toolsconfiguration.Configuration
In
.serena/project.yml, I have explicitly excluded 16 tools:This issue has been automatically closed due to 60 days of inactivity. If you're still experiencing this issue, please open a new issue with updated information.
This issue was closed incorrectly despite recent human comments. This behavior of the bot is reported at https://github.com/anthropics/claude-code/issues/16497. Please upvote that issue, so maybe it gets noticed.
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.