原型 · 预览版:收录官方注册中心里的全部服务器,每 30 分钟同步一次。评价和账户功能将在后续阶段推出。
PopNx MCP为使用 AI 的人准备的 MCP 服务器 · 用大白话讲清楚

Context Firewall

作者:Alepha188838884版本 0.1.1i★ –i在你的电脑上运行
注册名称io.github.Alepha188838884/context-firewall

安装

概览

作者提供的说明(英文原文)

Local MCP proxy: collapses N servers' tools into 4 meta-tools and compresses large tool outputs.

PopNx MCP 的三大支柱

这三项永远不会合并成一个分数:意见、测量和人气是不同的东西。

它能帮你做什么

我们还没有为它写通俗的介绍。下面是我们从注册中心读取到的事实。

  • 连接方式: 在你的电脑上运行
  • 传输方式: stdio
  • 分类: 网络安全

安装

选择你使用的 AI 应用,然后复制设置。

安装之前

  • 基础检查:1 项中通过 1 项
  • 在你的电脑上运行,拥有你的用户账户的权限(文件、网络、应用)。
  • 注册中心没有列出需要填写的密钥。

你需要

  • npm已安装 Node.js(用于 npx 命令)

你用的是哪个应用?

在上方选择你的应用。我们会记住它,下次按钮会显示“安装到 …”。

打开 Claude Desktop → Settings → Developer → Edit Config,把下面的内容粘贴到 claude_desktop_config.json

{
  "mcpServers": {
    "context-firewall": {
      "command": "npx",
      "args": [
        "-y",
        "context-firewall",
        "--config",
        "your-value"
      ]
    }
  }
}

在终端中运行这条命令

claude mcp add context-firewall -- npx -y context-firewall --config your-value

这个服务器需要在启动命令中填入值,请复制设置后自行填写。

或者自己复制设置

粘贴到项目中的 .cursor/mcp.json,或 ~/.cursor/mcp.json

{
  "mcpServers": {
    "context-firewall": {
      "command": "npx",
      "args": [
        "-y",
        "context-firewall",
        "--config",
        "your-value"
      ]
    }
  }
}

浏览器会先询问是否打开应用,然后应用会显示设置并请你确认。密钥的值会留空,由你自己填写。

这个服务器需要在启动命令中填入值,请复制设置后自行填写。

或者自己复制设置

粘贴到项目中的 .vscode/mcp.json

{
  "servers": {
    "context-firewall": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "context-firewall",
        "--config",
        "your-value"
      ]
    }
  }
}

浏览器会先询问是否打开应用,然后应用会显示设置并请你确认。密钥的值会留空,由你自己填写。

这个服务器在你的电脑上运行,而 ChatGPT 只能连接互联网上的服务器。请选择其他应用。

你的选择通过 Cookie 保存在这台设备上,无需账户。

这些设置是根据作者在注册中心的条目生成的。如果 README 的写法不同,请以 README 为准。

它能做什么

它在你的电脑上运行;安装后,工具列表会显示在你的 AI 应用中。

基础检查i

我们检查的是任何人都能看到的信息;我们没有阅读代码。不适用的检查项不计入总数。 · 检查于 2026年11月8日

  • ✓ 通过

    作者与仓库一致

    注册名称已通过 GitHub 账户 Alepha188838884 验证,该账户拥有此仓库

  • … 尚未检查

    仍在维护

    我们还没有从 GitHub 读取这个仓库

  • … 尚未检查

    有许可证

    我们还没有从 GitHub 读取这个仓库

  • – 不适用

    端点有响应

    它在你的电脑上运行,没有互联网端点

  • – 不适用

    使用 OAuth 登录

    在你的电脑上运行,改用本地设置

  • … 尚未检查

    工具描述中没有隐藏指令

    它在你的电脑上运行;我们只能读取互联网端点的工具列表

与“网络安全”中的其他服务器比较i

  • 星标数多于此分类中其他 995 个服务器的 0%
  • 发布到注册中心的时间比此分类中其他 995 个服务器的 31% 更新
  • 基础检查结果等于或优于此分类中其他 995 个服务器的 100%

与注册中心里这个分类中所有活跃的服务器比较。只有当发布者拥有该仓库时,星标数才计入。

常见问题

Context Firewall 安全吗?

它在 1 项适用的基础检查中通过了 1 项。我们没有阅读代码。在添加密钥或令牌之前,请先看看这个服务器要求哪些权限,并使用只具备所需权限的密钥。

它需要哪些密钥或代码?

注册中心没有列出必需的密钥,不过有些服务器会在首次使用时要求你登录。

它在我的电脑上运行还是在云端?

它在你的电脑上运行。你的 AI 应用会在需要时启动它,数据不会经过作者的服务器(除非它自己调用在线服务)。

它还在维护吗?

GitHub 仓库最后更新于–,最新版本(0.1.1)于3个月前进入注册中心。

哪些应用可以使用它?

支持 MCP 的应用,例如 Claude Desktop、Claude Code、Cursor 和 VS Code。你的电脑上还需要有 Node.js。

有什么可以替代它?

同一分类中有:QNSQY, EchelonGraph CVE & Exposure, WatchGuard MCP

替代选择

同一分类中其他作者的服务器,按星标数排序。

如何看卡片:★ GitHub 星标i三大支柱:评价 · 检查 · 使用情况i更新 = 最新版本发布到注册中心的时间i

QNSQY

作者:quantumsequrity

Linux only, local: post-quantum CBOM scan, encrypt to public keys, verify. Takes no secrets

在你的电脑上运行今天更新
安装

EchelonGraph CVE & Exposure

作者:echelongraph

CVE, KEV, EPSS, SBOM and advisory lookups; per-CVE exposure from Shodan data (© Shodan). Keyless.

电脑或云端今天更新
安装

WatchGuard MCP

作者:servosity

WatchGuard Cloud Firebox, Endpoint Security, ThreatSync, NDR and AuthPoint APIs for every customer

在你的电脑上运行今天更新
安装

作者的 README

打开 README

按原文从作者的仓库复制。PopNx MCP 没有审查或背书其内容。HTML、图片和脚本已被移除。链接会离开本站。

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.

Measured results

MetricResult
Output compression70–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 collapse122 → 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.

What it does

  • Progressive tool disclosure — instead of loading every downstream tool's full schema at startup, the client sees 4 meta-tools (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.
  • Output compression pipeline — large tool results are run through base64 stripping, main-content extraction + HTML→Markdown conversion (page chrome — nav, site headers/footers — is stripped when the page has a recognizable content region, so your token budget goes to actual content instead of navigation links), JSON structure-aware summarization, and finally character-budget truncation, in that order, before being returned.
  • Full output retrievable via `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).
  • Session savings report — on shutdown, prints a shareable terminal card (and optional Markdown file) showing tool-definition and output-token savings for the session, plus a breakdown of which tools saved the most.

Quickstart

npx context-firewall --config context-firewall.json

Minimal context-firewall.json (the downstreams block mirrors the mcpServers format you already know):

{

"downstreams": { "filesystem": { "command": "npx", "args": ["-y", "@modelcontextprotocol/server-filesystem", "/path/to/project"] }, "github": { "command": "npx", "args": ["-y", "@modelcontextprotocol/server-github"], "env": { "GITHUB_PERSONAL_ACCESS_TOKEN": "${GITHUB_TOKEN}" } } } }

(${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`](https://github.com/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:
  "github": {

"command": "docker", "args": ["run", "-i", "--rm", "-e", "GITHUB_PERSONAL_ACCESS_TOKEN", "ghcr.io/github/github-mcp-server"], "env": { "GITHUB_PERSONAL_ACCESS_TOKEN": "${GITHUB_TOKEN}" } }

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:

"github": {

"command": "npx", "args": ["-y", "@modelcontextprotocol/server-github"], "denyTools": ["delete_*"] }

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.

Client setup

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:

{

"mcpServers": { "context-firewall": { "command": "npx", "args": ["-y", "context-firewall", "--config", "/absolute/path/to/context-firewall.json"] } } }

Claude Code

Project-scoped .mcp.json in your repo root (shown above), or via the CLI:

claude mcp add --transport stdio context-firewall -- npx -y context-firewall --config /absolute/path/to/context-firewall.json
Claude Desktop

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

.cursor/mcp.json (project-scoped) or ~/.cursor/mcp.json (global) — same mcpServers block as above.

Cline

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.

Compatibility status
ClientStatus
Claude Codetested in real agent sessions — autonomous list → search → invoke → read_more workflow verified end-to-end
Claude Desktopprotocol-verified*
Cursorconfig format documented, community testing welcome
Clineconfig 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.

Configuration

downstreams

Each entry is either a stdio server (same shape as mcpServers) or a Streamable HTTP server:

{

"downstreams": { "local-tool": { "command": "npx", "args": ["-y", "some-mcp-server"], "env": { "TOKEN": "${TOKEN}" } }, "remote-tool": { "url": "https://mcp.example.com/mcp", "transport": "streamable-http" } } }

${VAR_NAME} in any string value is expanded from the environment; a missing variable fails config load with a readable error.

compression

Policy resolution order is default < perServer < perTool (later overrides earlier, field by field):

{

"compression": { "default": { "maxOutputTokens": 2000, "htmlToMarkdown": true, "stripBase64": true, "jsonSummary": true, "llmSummary": false, "bypass": false }, "perServer": { "github": { "maxOutputTokens": 4000 } }, "perTool": { "filesystem/read_file": { "maxOutputTokens": 8000 } } } }

FieldTypeDefaultMeaning
maxOutputTokensnumber2000Soft budget (chars ≈ tokens × 3.5) a compressed output is truncated to as a last resort.
htmlToMarkdownbooleantrueConvert detected HTML to Markdown, extracting the main content region (nav/header/footer chrome stripped) when one is recognizable.
stripBase64booleantrueReplace base64 blobs (data URIs and bare blocks) with a read_more handle.
jsonSummarybooleantrueCollapse homogeneous JSON arrays and trim long string fields, keeping valid JSON.
llmSummarybooleanfalseSemantically summarize over-budget outputs with an LLM of your choice. Requires the top-level llm block - see LLM summarization (opt-in).
bypassbooleanfalseSkip the whole pipeline for this server/tool - output passes through untouched.
report
{

"report": { "enabled": true, "markdownPath": "./context-firewall-report.md" } }

FieldTypeDefaultMeaning
enabledbooleantruePrint the session report to stderr on shutdown.
markdownPathstring*(none)*If set, also write the report as a Markdown file at this path.
callToolTimeoutMs

Top-level (not nested under compression). Per-invoke_tool timeout in milliseconds passed to the downstream MCP SDK client; a downstream that hangs without responding causes invoke_tool to return an isError result once this elapses, instead of blocking. Defaults to the SDK's own default (60,000ms) when unset.

{ "callToolTimeoutMs": 30000 }

How it works

The client calls list_tool_categories() to see what's connected and what it's roughly capable of, search_tools(query) to pull the full input schema for candidate tools, invoke_tool(server, tool, args) to actually run one (compressed on the way back), and read_more(handle, offset, length) to page through anything that got compressed. Compression, when it runs, always applies in the same order: strip base64 → main-content extraction + HTML to Markdown → JSON structure summary → truncate to budget (if the opt-in LLM summarization stage below is enabled, it runs right before truncation). Content extraction is conservative by design: it only strips chrome when a semantic content region ( / ) is recognizable or the removal clearly isn't the page's actual content, and falls back to whole

只显示了开头部分;其余内容请在仓库中阅读

问 PopNx