claude-code icon indicating copy to clipboard operation
claude-code copied to clipboard

[FEATURE] MCP Tool Filtering: Allow Selective Enable/Disable of Individual Tools from Servers

Open BrianInAz opened this issue 5 months ago • 67 comments

Preflight Checklist

  • [x] I have searched existing requests and this feature hasn't been requested yet
  • [x] This is a single feature request (not multiple features)

Problem Statement

MCP servers expose all available tools through the tools/list endpoint, and Claude Code currently loads all tools from configured servers without any client-side filtering mechanism. This creates several issues:

  1. Performance degradation: Large MCP servers (like the filesystem server with 20+ tools) can overwhelm the interface and potentially impact performance
  2. Unnecessary complexity: Users often only need a subset of tools but must work with all exposed tools
  3. Security/control concerns: No way to restrict access to potentially sensitive tools on a per-project basis

For example, I'm using the @modelcontextprotocol/server-filesystem which exposes many tools, but I only need 3 specific ones: read_multiple_files, search_files, and create_directory. Currently, I have to work with all 20+ tools, which clutters the interface and may impact performance.

Proposed Solution

Implement a client-side tool filtering system similar to GitHub Copilot's "Configure Tools" interface. This would allow users to:

  1. View all available tools from each configured MCP server
  2. Selectively enable/disable individual tools via checkboxes or similar UI
  3. Create tool groups/sets for easier management of related tools
  4. Set per-project configurations that can be shared via repository settings
  5. Apply performance warnings when too many tools are selected (similar to GitHub's 128-tool limit)

The interface should display:

  • Server name and status
  • Individual tools with descriptions
  • Enable/disable toggles for each tool
  • Performance warnings when approaching limits

Alternative Solutions

Workarounds I've considered:

  1. Creating custom minimal MCP servers: Would work but requires significant development effort for each use case
  2. Using different MCP servers: Limited options, and most comprehensive servers (like filesystem) have the same issue
  3. Modifying server configurations: Not always possible, especially with packaged servers like @modelcontextprotocol/server-filesystem

Other tools' approaches:

  • GitHub Copilot has solved this with their Configure Tools interface (see evidence below)
  • VS Code extensions often provide granular feature selection
  • IDE plugin systems typically allow selective activation of features

Priority

Medium - Significant impact on productivity

This directly affects daily workflow efficiency and tool usability, especially for users working with multiple or comprehensive MCP servers.

Feature Category

MCP server integration

Use Case Example

Scenario: Frontend Developer using Filesystem MCP Server

  1. I configure the @modelcontextprotocol/server-filesystem in my ~/.claude.json
  2. Currently: Claude Code loads all 20+ filesystem tools (read_file, write_file, list_directory, etc.)
  3. With this feature: I could access "Configure Tools" and:
    • Keep only: read_multiple_files, search_files, create_directory
    • Disable: write operations, file management, metadata tools I don't need
  4. Result: Cleaner interface, focused toolset, potentially better performance

Step-by-step workflow:

  1. Open Claude Code with MCP servers configured
  2. Navigate to "Configure Tools" (similar to agent mode tools)
  3. See "MCP Server: filesystem" section with all available tools listed
  4. Uncheck unwanted tools, keeping only essential ones
  5. Save configuration (optionally per-project)
  6. Claude Code now only shows/uses selected tools

Additional Context

Evidence from GitHub Copilot: GitHub Copilot has successfully implemented this exact feature. Their documentation states:

"Toolsets make it easier to group related MCP tools together and quickly enable or disable them"

"If you have more than 128 tools selected, you need to reduce the number of tools by deselecting some tools in the tools picker"

GitHub's official documentation (https://docs.github.com/en/copilot/how-tos/context/model-context-protocol/extending-copilot-chat-with-mcp) demonstrates this capability working in production.

Technical considerations:

  • This is a client-side feature - no changes needed to MCP protocol or servers
  • Can be implemented as UI layer filtering on top of existing tools/list responses
  • Should support both global and per-project configurations
  • Could integrate with existing Claude Code settings system

Performance benefits:

  • Reduced cognitive load in tool selection interfaces
  • Potentially faster tool loading with fewer active tools
  • Better organization for power users with multiple MCP servers

Enterprise/security benefits:

  • Project-specific tool restrictions
  • Ability to disable potentially sensitive tools in shared repositories
  • Better control over which capabilities are available in different contexts

This feature would bring Claude Code's MCP integration to parity with GitHub Copilot while addressing real user needs for better tool management and performance.

BrianInAz avatar Sep 09 '25 04:09 BrianInAz