Local MCP proxy collapsing many downstream tools into 4 meta-tools with output compression and progressive tool discovery.
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β or use 1-click editor setup below.
We ran the install command below but it didn't respond within our test window β this can mean a slow first-time install rather than a real problem.
npx -y context-firewallNo response to initialize.
This is an experimental automated check and can have false negatives β missing environment variables, a slow cold install, etc. It doesnβt necessarily mean somethingβs wrong. Last checked 1mo ago.
π‘ Paste the JSON block into your client's configuration file under mcpServers, then restart the application.
Inspect callable tools, capabilities, and parameters exposed to AI agents by Context Firewall.
Shrink large MCP tool outputs by 60β95% before they reach your model's context window β and collapse 50+ tool definitions into 4. Real HTML/JSON, measured β see benchmarks. Works with any MCP client, any model. Anything still over your configured token budget after compression is hard-truncated to that budget, with the full original always retrievable via read_more.
The session report printed on shutdown β this one from a real 3-call session (two large file reads, one echo). Every number measured, none simulated.
Context Firewall is a local MCP proxy that sits between your AI agent (Claude Code, Claude Desktop, Cursor, Cline, ...) and every downstream MCP server you've configured. Large tool outputs (raw HTML, base64 blobs, giant JSON) are compressed before they ever reach the model's context window, and the client sees exactly 4 tools no matter how many the downstream servers actually have.
| Metric | Result |
|---|---|
| Output compression | 70β94% on real HTML pages, ~97% on large structured JSON (smart stages alone, before budget truncation) β e.g. a live Wikipedia page via the fetch tool: 232,391 β 6,907 chars (97.0%, measured); a GitHub issues JSON payload via the jsonSummary stage: 186,810 β 3,480 chars (98.1%, measured) |
| Tool collapse | 122 β 4 exposed meta-tools (5 real downstream servers incl. official GitHub github-mcp-server, 85 tools) |
| Tool-definition savings | ~28,600 tokens (estimated, chars Γ· 3.5) β 102,158 raw definition chars vs. 2,146 exposed |
All figures measured against real downstream MCP servers, not synthetic data β full methodology and tables in docs/BENCHMARKS.md.
list_tool_categories, search_tools, invoke_tool, read_more) and only pays the token cost of a tool's full schema when it actually searches for it.read_more β nothing is silently thrown away. Every compressed output is stored in full (in memory, opaque handle) and can be paged back with read_more(handle, offset, length).Minimal context-firewall.json (the downstreams block mirrors the mcpServers format you already know):
(${GITHUB_TOKEN} above is just this example's environment variable name β pick whatever's already set in your shell; it gets expanded into GITHUB_PERSONAL_ACCESS_TOKEN, the env var name the downstream server itself actually reads.)
Which GitHub server? Two options, different tool counts:
@modelcontextprotocol/server-github (used above) β the original npm package, 26 tools, one npx -y line, zero extra setup. Archived/no longer maintained upstream, but still functional.
github/github-mcp-server β the actively-maintained official server, 44 tools (default toolset) to 85 (GITHUB_TOOLSETS=all). Ships as a Go binary or Docker image, not an npm package:
or, running a locally-built/downloaded binary directly: "command": "/path/to/github-mcp-server", "args": ["stdio"] (same env block; add GITHUB_TOOLSETS to scope which of the 85 tools are exposed).
Per-tool allow/deny policy. Add allowTools/denyTools (array of exact names or * globs) to any downstream entry to restrict which of its tools can be invoked:
Deny always wins over allow. When allowTools is set, only matching tools are permitted; everything else on that server is blocked. An empty allowTools: [] is treated the same as omitting it (allow everything), not "deny everything". Blocked tools are hidden from search_tools results, and invoke_tool rejects them before dispatching to the downstream server. Tool counts in list_tool_categories and in the meta-tool descriptions are unfiltered totals β the policy is only enforced at search_tools/invoke_tool time.
Set Context Firewall as your only MCP server β move every downstream server you currently configure directly (filesystem, github, everything, ...) into context-firewall.json's downstreams block instead. Your agent then sees 4 tools instead of the sum of every downstream server's tool count; pointing the client at Context Firewall alongside your existing servers doesn't give you the tool-collapse or compression benefit.
Each client below takes the same server entry:
Project-scoped .mcp.json in your repo root (shown above), or via the CLI:
claude_desktop_config.json (macOS: ~/Library/Application Support/Claude/claude_desktop_config.json; Windows: %APPDATA%\Claude\claude_desktop_config.json) β same mcpServers block as above.
.cursor/mcp.json (project-scoped) or ~/.cursor/mcp.json (global) β same mcpServers block as above.
cline_mcp_settings.json (VS Code extension storage; macOS: ~/Library/Application Support/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json) β same mcpServers block as above.
| Client | Status |
|---|---|
| Claude Code | tested in real agent sessions β autonomous list β search β invoke β read_more workflow verified end-to-end |
| Claude Desktop | protocol-verified* |
| Cursor | config format documented, community testing welcome |
| Cline | config format documented, community testing welcome |
* Verified via MCP protocol integration tests (236 automated tests, including full stdio protocol round-trips against real downstream servers, run in CI on every push). Real-client reports welcome.
downstreamsEach entry is either a stdio server (same shape as mcpServers) or a Streamable HTTP server:
${VAR_NAME} in any string value is expanded from the environment; a missing variable fails config load with a readable error.
compressionPolicy resolution order is default < perServer < perTool (later overrides earlier, field by field):
Factual signals from GitHub, npm, and our automated checks β not a rating.
No reviews yet β be the first to share how this listing worked for you.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/alepha188838884-context-firewall)<a href="https://allmcps.com/mcp/alepha188838884-context-firewall"><img src="https://allmcps.com/api/badge/alepha188838884-context-firewall?style=directory" alt="Context Firewall on AllMCPs" /></a>