[FEATURE REQUEST] Claude Code - Disable specific functions in MCP to save Context Tokens

Status Closed — not planned
Maintainer reply None cached
Activity 10 comments · opened Aug 28, 2025 · closed Jan 8, 2026

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!

View original on GitHub ↗

10 Comments

github-actions[bot] · 1 year ago

Found 3 possible duplicate issues:

  1. https://github.com/anthropics/claude-code/issues/4906
  2. https://github.com/anthropics/claude-code/issues/4380
  3. 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

hyper-lode · 12 months ago

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

freezscholte · 11 months ago

Yes we really need to have this feature asap

clafollett · 11 months ago

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:

<img width="481" height="524" alt="Image" src="https://github.com/user-attachments/assets/b8fbc19f-7c84-4c66-a446-319f86eac922" />

Nek-12 · 11 months ago

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.

hyper-lode · 11 months ago

Can someone from @ah-anthropic comment if this is on the roadmap or not?

github-actions[bot] · 8 months ago

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.

mrclrchtr · 8 months ago

That would still be very useful.

github-actions[bot] · 7 months ago

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.

github-actions[bot] · 7 months ago

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.