Tool Filter MCP
Filters and blocks specific tools from upstream MCP servers using regex patterns to reduce context pollution and remove unwanted tools from AI agent interactions.
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
Maintainer
Works with
Installation
Manual Installation
npx tool-filter-mcpConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
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
Verify Node.js version
Tool Filter MCP requires Node.js 20 or higher. Check your current version before proceeding.
node --versionDiscover 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 tableTest 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-toolsConfigure 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.
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.jsTool 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.
Tool Filter MCP Alternatives — Similar Developer Tools Servers
Looking for alternatives to Tool Filter MCP? Here are other popular developer tools servers you can use with Claude, Cursor, and VS Code.
Ecc
★ 188.2kThe agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.
Javaguide
★ 155.8kJava 面试 & 后端通用面试指南,覆盖计算机基础、数据库、分布式、高并发、系统设计与 AI 应用开发
Gemini CLI
★ 104.5kA secure MCP server that wraps the Google Gemini CLI, allowing clients to query Gemini models using local OAuth sessions without requiring an API key. It provides tools for model interaction and diagnostics with built-in protection against command in
Awesome MCP Servers
★ 87.3k⭐ Curated list of Model Context Protocol (MCP) servers - tools that extend Claude Desktop, Cursor, Windsurf, and other MCP clients with custom capabilities.
MCP Servers
★ 86.0kModel Context Protocol Servers
CC Switch
★ 77.5kA cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Gemini CLI & Hermes Agent. Only official website: ccswitch.io
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.
Set Up Tool Filter MCP in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
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.