Tool Filter MCP

v1.0.0Developer Toolsstable

Filters and blocks specific tools from upstream MCP servers using regex patterns to reduce context pollution and remove unwanted tools from AI agent interactions.

tool-filter-mcpmcpai-integration
Share:
35
Stars
0
Downloads
0
Weekly
0/5

What is Tool Filter MCP?

Tool Filter MCP is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to filters and blocks specific tools from upstream mcp servers using regex patterns to reduce context pollution and remove unwanted tools from ai agent interactions.

Filters and blocks specific tools from upstream MCP servers using regex patterns to reduce context pollution and remove unwanted tools from AI agent interactions.

This server falls under the Developer Tools and APIs categories on MCPgee, the world's largest MCP server directory with 33,000+ servers.

Features

  • Filters and blocks specific tools from upstream MCP servers

Use Cases

Filter and block specific tools from MCP servers.
Reduce context pollution by excluding unwanted tools.
Customize tool availability for AI agents.
respawn-app

Maintainer

LicenseMIT License
Languagetypescript
Versionv1.0.0
UpdatedMay 15, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx tool-filter-mcp

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

How to Set Up and Use Tool Filter MCP

Tool Filter MCP is a proxy MCP server that sits between your AI client and one or more upstream MCP servers, filtering out tools you do not want exposed using regex-based deny patterns. By blocking unused or sensitive tools before they reach the model's context, it reduces context pollution, lowers token usage, and prevents AI agents from accidentally calling tools that should be off-limits. Developers managing multiple MCP servers with large tool sets — or those who need to restrict tool access in agent pipelines — will find this a lightweight but effective control layer.

Prerequisites

  • Node.js 20 or higher installed on your system
  • One or more upstream MCP servers (HTTP/SSE or stdio) to proxy and filter
  • An MCP-compatible client such as Claude Desktop or Claude Code
  • Basic familiarity with regex patterns for defining deny rules
1

Verify Node.js version

Tool Filter MCP requires Node.js 20 or higher. Check your current version before proceeding.

node --version
2

Discover available tools from your upstream server

Before writing deny patterns, use the --list-tools flag to see all tools exposed by your upstream MCP server. This helps you identify which tools to block.

npx @respawn-app/tool-filter-mcp --upstream http://localhost:3000/sse --list-tools --format table
3

Test your deny patterns from the command line

Run the proxy with your desired deny patterns and verify the tool list looks correct before adding it to your MCP client config.

npx @respawn-app/tool-filter-mcp --upstream http://localhost:3000/sse --deny "create_file,delete_.*,sensitive_.*" --list-tools
4

Configure Tool Filter MCP as a server in your MCP client

Add the tool-filter proxy as an MCP server in your claude_desktop_config.json. The proxy will connect to the upstream server and expose only the non-denied tools to Claude.

5

For stdio upstream servers, use the stdio proxy mode

If your upstream MCP server uses stdio transport (rather than HTTP/SSE), use the --upstream-stdio flag followed by -- and the upstream server's command.

npx @respawn-app/tool-filter-mcp --upstream-stdio --deny "tool_to_block" -- node /path/to/upstream-server.js

Tool Filter MCP Examples

Client configuration

Two configuration examples: one for filtering an HTTP/SSE upstream server, and one for filtering a stdio-based upstream server. Replace the upstream URL or command with your actual server details.

{
  "mcpServers": {
    "filtered-upstream": {
      "command": "npx",
      "args": [
        "@respawn-app/tool-filter-mcp",
        "--upstream", "http://localhost:3000/sse",
        "--deny", "create_file,delete_.*,write_.*"
      ]
    },
    "filtered-stdio-upstream": {
      "command": "npx",
      "args": [
        "@respawn-app/tool-filter-mcp",
        "--upstream-stdio",
        "--deny", "sensitive_tool,admin_.*",
        "--", "node", "/path/to/upstream-server.js"
      ]
    }
  }
}

Prompts to try

Tool Filter MCP is transparent to Claude — you interact with the underlying tools normally, but blocked tools simply will not appear.

- "List all the tools you have available from the upstream server."
- "[Use any tool from the upstream server that is NOT in your deny list]"
- "Run the upstream server's read_file tool on /tmp/example.txt."
- Note: Tools matching your deny patterns will not appear in Claude's tool list at all.

Troubleshooting Tool Filter MCP

All tools are filtered out and Claude has no tools available

Your deny pattern may be too broad. Use --list-tools to see what tools exist and test your regex patterns carefully. Remember that --deny patterns are matched against the full tool name, so 'get_.*' will block all tools starting with 'get_'. Use anchors like '^get_file$' for exact matches.

Cannot connect to upstream HTTP/SSE server

Verify the upstream server URL is correct and the server is running. Test it independently with 'npx @respawn-app/tool-filter-mcp --upstream <url> --list-tools'. If the upstream requires authentication, pass credentials via --header 'Authorization: Bearer $TOKEN'.

stdio upstream server fails to start through the proxy

Ensure the command after -- is the complete command to start your stdio MCP server, including all required arguments. Test the upstream command by running it directly first. For environment variables needed by the upstream, pass them with --env KEY=value flags.

Frequently Asked Questions about Tool Filter MCP

What is Tool Filter MCP?

Tool Filter MCP is a Model Context Protocol (MCP) server that filters and blocks specific tools from upstream mcp servers using regex patterns to reduce context pollution and remove unwanted tools from ai agent interactions. It connects AI assistants to external tools and data sources through a standardized interface.

How do I install Tool Filter MCP?

Follow the installation instructions on the Tool Filter MCP GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.

Which AI clients work with Tool Filter MCP?

Tool Filter MCP works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.

Is Tool Filter MCP free to use?

Yes, Tool Filter MCP is open source and available under the MIT License license. You can use it freely in both personal and commercial projects.

Browse More Developer Tools MCP Servers

Explore all developer tools servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.

Quick Config Preview

{ "mcpServers": { "tool-filter-mcp": { "command": "npx", "args": ["-y", "tool-filter-mcp"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

Ready to use Tool Filter MCP?

Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.

33,000+ ServersFree & Open SourceStep-by-Step Guides