What it does
Context Firewall sits between an AI agent client and the MCP servers configured behind it. Instead of loading every downstream tool's full schema at startup, the client sees four meta-tools (list_tool_categories, search_tools, invoke_tool and read_more) and pays for a tool's full schema only when it searches for that tool. Large tool results such as raw HTML, base64 blobs and big JSON payloads go through a compression pipeline before being returned, and the complete original stays retrievable through read_more.
It is relevant when several MCP servers together expose many tools, or when tool outputs are large enough to crowd a model's context window. The publisher reports measured figures from real downstream servers: a Wikipedia page fetched through a fetch tool went from 232,391 to 6,907 characters, and a GitHub issues JSON payload from 186,810 to 3,480 characters. In one benchmark, 122 exposed tools were collapsed into four meta-tools.
Setup means listing each downstream server in a context-firewall.json file under a downstreams block, using the same format as mcpServers. The client should then be configured with Context Firewall as its only MCP server. Optional allowTools and denyTools lists, using exact names or * globs, restrict which downstream tools can be invoked. A session report is printed on shutdown.
Limitations and requirements
Downstream MCP servers must be configured separately, and servers that need credentials, such as the GitHub server, require their environment variables (for example a personal access token) to be set. Pointing the client at Context Firewall alongside existing servers does not provide the tool-collapse or compression benefit. Tool counts shown by list_tool_categories and in meta-tool descriptions are unfiltered; allow and deny policies apply only at search_tools and invoke_tool. Client support is uneven: Claude Code was tested in real sessions, Claude Desktop is protocol-verified only, and Cursor support is documented with community testing. Token savings for tool definitions are estimates based on character counts.
Safety
Our team has not reviewed this resource. Only automated rules checked it; resources with high-risk signals are not published. These are signals, not a guarantee that installing it is safe. Try it in a sandbox project first.
- Runs code or changes an assistant's behaviour
Sources
- Official MCP Registry first seen 13 Nov 2026 · last seen 13 Nov 2026 · its page on the source
io.github.Alepha188838884/context-firewall
Local MCP proxy: collapses N servers' tools into 4 meta-tools and compresses large tool outputs.
v0.1.1As shown on registry.modelcontextprotocol.io when we last read it