[FEATURE REQUEST] Claude Code - Disable specific functions in MCP to save Context Tokens
Currently in Claude Desktop, I can disable and enable specific functions within a MCP.
I searched the Documentation, asked Claude Code and have searched, but everything I've found said I could not disable specific MCP functions running in Claude Code.
My goal is to decrease the Context usage for MCP functions that I do not need.
Thanks!
Found 3 possible duplicate issues:
- https://github.com/anthropics/claude-code/issues/4906
- https://github.com/anthropics/claude-code/issues/4380
- https://github.com/anthropics/claude-code/issues/3206
This issue will be automatically closed as a duplicate in 3 days.
- If your issue is a duplicate, please close it and 👍 the existing issue instead
- To prevent auto-closure, add a comment or 👎 this comment
🤖 Generated with Claude Code
We absolutely need this. When I start a Claude code chat, right off the bat 33% of my context window is taken up by MCP tools I never use.
to illustrate
when running /context I see just for the Supabase MCP:
└ mcp__supabase__search_docs (supabase): 2.7k tokens
└ mcp__supabase__list_tables (supabase): 437 tokens
└ mcp__supabase__list_extensions (supabase): 395 tokens
└ mcp__supabase__list_migrations (supabase): 395 tokens
└ mcp__supabase__apply_migration (supabase): 468 tokens
└ mcp__supabase__execute_sql (supabase): 457 tokens
└ mcp__supabase__get_logs (supabase): 499 tokens
└ mcp__supabase__get_advisors (supabase): 499 tokens
└ mcp__supabase__get_project_url (supabase): 398 tokens
└ mcp__supabase__get_anon_key (supabase): 400 tokens
└ mcp__supabase__generate_typescript_types (supabase): 399 tokens
└ mcp__supabase__list_edge_functions (supabase): 402 tokens
└ mcp__supabase__deploy_edge_function (supabase): 707 tokens
└ mcp__supabase__create_branch (supabase): 518 tokens
└ mcp__supabase__list_branches (supabase): 424 tokens
└ mcp__supabase__delete_branch (supabase): 413 tokens
└ mcp__supabase__merge_branch (supabase): 420 tokens
└ mcp__supabase__reset_branch (supabase): 453 tokens
└ mcp__supabase__rebase_branch (supabase): 434 tokens
and yet I only ever use ONE of those, the mcp__supabase__execute_sql
Yes we really need to have this feature asap
I've tried global deny permissions but that does not limit the context usage of the tool definition. This is my root ~/.claude/settings.json definition:
{
"permissions": {
"deny": [
"mcp__atlassian__atlassianUserInfo",
"mcp__atlassian__getAccessibleAtlassianResources",
"mcp__atlassian__getConfluenceSpaces",
"mcp__atlassian__getConfluencePage",
"mcp__atlassian__getPagesInConfluenceSpace",
"mcp__atlassian__getConfluencePageFooterComments",
"mcp__atlassian__getConfluencePageInlineComments",
"mcp__atlassian__getConfluencePageDescendants",
"mcp__atlassian__createConfluencePage",
"mcp__atlassian__updateConfluencePage",
"mcp__atlassian__createConfluenceFooterComment",
"mcp__atlassian__createConfluenceInlineComment",
"mcp__atlassian__searchConfluenceUsingCql"
]
}
}
After closing and reopening my claude session these tool calls are still consuming precious context:
Hey guys! Since there was no response and there was no tool to accomplish this task, I vibe-coded a proxy mcp with one purpose - to solve this problem.
https://github.com/respawn-app/tool-filter-mcp
Let me know if it works for you! So far I was able to remove 25+ tools at work and am not having any issues.
Can someone from @ah-anthropic comment if this is on the roadmap or not?
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.
That would still be very useful.