Tool FilterSAFE
MCP proxy server that filters tools from upstream MCP servers via regex-based deny list
Overview
From the repository's own README, as read at the audited commit. Badges and raw HTML are left out.
[](https://www.npmjs.com/package/@respawn-app/tool-filter-mcp)
MCP proxy server that filters tools from upstream MCP servers via regex-based deny list.
Maintained: ✅ Yes (Spring/summer 26)
Why use this?
For effective context engineering, we want to minimize useless tokens. Most major agents right now (e.g. Claude Code) do NOT remove tool descriptions from the context. Even though the tool is completely denied and unused, the model will still get its entire description and still try to call the tool (and get error messages). For big MCPs, such as github, supabase, jetbrains IDE, atlassian, this is catastrophic to the context and leads to context pollution by 40-60k of useless tokens. You wanted your agent to be able to see jira ticket descriptions? Please also have these 44 useless tools to edit assignees on confluence pages.
This MCP completely solves the issue without introducing any overhead. Contributions welcome!
Installation
# For HTTP/SSE MCP servers npx @respawn-app/tool-filter-mcp --upstream --deny # For stdio MCP servers npx @respawn-app/tool-filter-mcp --upstream-stdio --deny -- [args...]
Usage
Basic Example (HTTP/SSE)
Filter tools matching .*_file$ pattern from an HTTP MCP server:
npx @respawn-app/tool-filter-mcp \ --upstream http://localhost:3000/sse \ --deny ".*_file$"
Basic Example (stdio)
Filter tools from a local stdio MCP server:
npx @respawn-app/tool-filter-mcp \ --upstream-stdio \ --deny "dangerous_.*" \ -- npx my-mcp-server
With Environment Variables (stdio)
Pass environment variables to the upstream stdio server:
npx @respawn-app/tool-filter-mcp \ --upstream-stdio \ --env "API_KEY=secret123" \ --env "DEBUG=true" \ --deny "admin_.*" \ -- npx m
6d6c4b552f5bOBSERVED · 2026-10-08Connect
Built from this server's own package name, version and transport as found in its source — not copied from anyone's documentation, so it cannot drift against a page we do not control. Replace the environment placeholders with a token scoped to the least it needs.
claude mcp add tool-filter-mcp -- npx -y @respawn-app/[email protected]
Exposed tools (23)
19 read · 3 write · 1 destructive. Blast radius: 1 tool can delete or overwrite — an agent that can be talked into calling a tool can be talked into calling this one.
| Tool | Risk | Description |
|---|---|---|
another_long_name | read | Test |
delete_file | destructive | Delete file |
get_env | read | Get environment variable value |
list_dir | read | List contents of a directory |
list_directory | read | List directory |
long_desc | read | A |
multiline | read | First line\nSecond line\nThird line |
query_database | write | Execute a database query |
read_file | read | Read contents of a file |
short | read | Short name |
test_tool | read | Test tool |
tool | read | This is a very long description that goes on and on and on and contains a lot of text that might wrap in a terminal window |
tool-with-dashes | read | Test |
tool.with.dots | read | Test |
tool1 | read | |
tool_a | read | Tool A |
tool_b | read | Tool B |
tool_c | read | Tool C |
tool_with_underscores | read | Test |
update_database | write | Update database records |
very_long_tool_name | read | Long name |
very_long_tool_name_here | read | Test |
write_file | write | Write contents to a file |
Trust audit
SAFEgrade B · trust 89/100 Nothing in the source contradicts what it says it does. Grade A is reserved for packages that have also passed the behavioural sandbox.
| Layer | What it checks | Result |
|---|---|---|
| L0 | Provenance & inventory | PASS |
| L1 | Static analysis of the code | PASS |
| L2 | Instruction surface (what it tells the agent) | PASS |
| L3 | Class-specific surface | WARN |
| L4 | Behavioural (sandbox) | SKIPPED |
What the source does
- Filesystem
- declared (2 observation(s))
- Network
- none-observed
- Shell
- none-observed
- Dependencies
- not all pinned
- Secrets in source
- none-found
Findings (7)
delete_file
(cd "$script_dir/../../.." && pwd)
import { FilteredTool } from '../../src/types.js';import { FilteredTool } from '../../src/types.js';const { parseCLIArgs } = await import('../../src/cli-args.js');const { parseCLIArgs } = await import('../../src/cli-args.js');@modelcontextprotocol/sdk, safe-regex2, @types/express, @types/node, @typescript-eslint/eslint-plugin, @typescript-eslint/parser, eslint, prettier
Gates applied: no_behavioural_pass.
6d6c4b552f5bfull audit observations/trust-audit/mcp-server/respawn-app__tool-filter.json · Report an issue / request a re-scanAudit history
Every audit this server has had. A grade with a past is a grade somebody is still checking.
| Date | Source | Verdict | Grade | Score | Change |
|---|---|---|---|---|---|
| 2026-10-08 | 6d6c4b552f5b | SAFE | B | 89 | first audit |
Questions
What is the Tool Filter MCP server?
MCP proxy server that filters tools from upstream MCP servers via regex-based deny list
What tools does Tool Filter expose?
23 in total: 19 read-only, 3 that write, and 1 that can delete or overwrite (delete_file). Every one is listed on this page with its risk.
Is Tool Filter safe to connect to an agent?
The audit found nothing in the source that contradicts what it says it does, and graded it B (89/100). Grade A is held back for packages that have also passed a sandboxed behavioural run, which is why a clean server reads B. Separately from the audit: 1 of its tools can destroy data, so scope the token you give it to what you actually need.
What credentials does Tool Filter need?
It reads API_TOKEN, TEST_TOKEN and TOKEN from the environment. Give it a token scoped to the least it needs — an agent that can be talked into calling a tool can be talked into calling it with your credentials.
How does Tool Filter run?
It speaks sse, stdio and streamable-http, so it runs as a local process your client starts. It is published on npm as @respawn-app/tool-filter-mcp at 0.4.3.
How current is this page?
The grade is for one exact copy of the source (6d6c4b552f5b), read on 2026-10-08. The repository is watched and re-audited when it changes.