{"slug": "show-hn-mcp-sentry-v2-0-zero-dependency-firewall-and-audit-proxy-for-mcp", "title": "Show HN: MCP-Sentry v2.0 – Zero-dependency firewall and audit proxy for MCP", "summary": "MCP-Sentry v2.0, a zero-dependency security proxy for the Model Context Protocol, was released as a Show HN project, positioning itself between AI clients such as Claude Desktop, Cursor and Windsurf and any MCP server to intercept JSON-RPC 2.0 traffic in both directions. The tool reports 0.031 ms average latency and blocks attacks in under 0.1 ms, defending against tool poisoning in tools/list, rug-pull schema mutation via SHA-256 hash-locking of each tool's name, description and inputSchema, cross-server secret exfiltration, destructive commands like rm -rf and DROP TABLE, and runaway tool-retry loops that the project says can burn $500+ in API credits overnight. MCP-Sentry v2.0 also adds a human-in-the-loop approval gate for high-risk tools, in-flight redaction of OpenAI, Anthropic, AWS, GitHub, Stripe, PEM, JWT and database-URI secrets, and a SHA-256 hash-chained audit ledger with HMAC and SQLite aimed at SOC2 and EU AI Act readiness.", "body_md": "**Zero external dependencies. Sub-millisecond latency (0.031 ms avg). Bidirectional JSON-RPC 2.0 interception for Claude Desktop, Cursor, Windsurf, and Enterprise MCP Servers.**\n\nAI Agents using MCP (`stdio` or `Streamable HTTP`) have direct access to your local shell, databases, filesystem, and external APIs — with **zero native security boundary**. A single poisoned third-party MCP server or stuck agent loop can:\n\n- **Steal `~/.ssh/id_rsa`, `.env`, and AWS/OpenAI keys** via hidden Tool Poisoning instructions in`tools/list` .\n- **Silently mutate tool definitions after you approve them** (Rug-Pull attacks).\n- **Exfiltrate sensitive files** across servers (read secret via Server A → send out via`fetch` /email on Server B).\n- **Burn $500+ in API credits overnight** in an infinite tool-retry loop.\n- **Execute destructive `rm -rf /` or `DROP TABLE`** with no human confirmation or audit trail.\n\n**MCP-Sentry v2.0** sits transparently between your AI client and any MCP server — blocking attacks in **< 0.1 ms** with **zero code changes**.\n\n```\n┌─────────────────────────────┐\n│  Claude / Cursor / Windsurf │\n│   or Enterprise AI Agent    │\n└──────────────┬──────────────┘\n               │ JSON-RPC 2.0 (stdio OR Streamable HTTP)\n               ▼\n┌─────────────────────────────────────────────────────────────┐\n│                    MCP-SENTRY v2.0 GATEWAY                  │\n│  ┌─────────────────────┐  ┌──────────────────────────────┐  │\n│  │ Inbound (C -> S)    │  │ Outbound (S -> C)            │  │\n│  │ • Policy-as-Code    │  │ • Tool Poisoning Scanner     │  │\n│  │ • Destructive/SQLi  │  │ • Rug-Pull SHA-256 Lock      │  │\n│  │ • Cross-Server DLP  │  │ • Secret Auto-Redaction      │  │\n│  │ • Taint Enforcement │  │ • Session Taint Marking      │  │\n│  │ • Loop & Cost Cap   │  └──────────────────────────────┘  │\n│  │ • HITL Approval UI  │  ┌──────────────────────────────┐  │\n│  └─────────────────────┘  │ Cryptographic Audit Ledger   │  │\n│                           │ SHA-256 Chain + HMAC + SQLite│  │\n│                           └──────────────────────────────┘  │\n└──────────────┬──────────────────────────────────────────────┘\n               │ Safe, Inspected JSON-RPC 2.0\n               ▼\n┌─────────────────────────────┐\n│   Any Local or Remote MCP   │\n│  (Postgres, GitHub, Bash…)  │\n└─────────────────────────────┘\n```\n\n1. **Dual-Transport Bidirectional Proxy (`stdio` + `HTTP`)**  - Wrap any local `stdio` MCP server in 1 line:`mcp-sentry wrap -- npx @modelcontextprotocol/server-postgres`\n  - Reverse-proxy remote HTTP MCP servers with a built-in **Live Wireshark-style Firewall Dashboard** (`/sentry/ui` ).\n2. Wrap any local \n3. **Real OWASP MCP Threat Engine**  - **Tool Poisoning Defense** : Detects hidden`<IMPORTANT>` /`<SYSTEM>` tags, stealth exfil directives, and invisible Zero-Width / BiDi Unicode smuggling in`tools/list` .\n  - **Rug-Pull / Schema Drift Hash-Lock** : Pins SHA-256 fingerprints of every tool's`name + description + inputSchema` on first sight and blocks post-approval mutation.\n  - **Cross-Server Taint Tracking & DLP** : Scans responses for OpenAI/Anthropic/AWS/GitHub/Stripe/PEM/JWT/DB-URI secrets,**redacts them in-flight** , taints the session, and blocks subsequent outbound network tools (`fetch` ,`curl` ,`send_email` ).\n  - **Destructive Command & Path Traversal Blocker** : Blocks`rm -rf` ,`DROP TABLE` ,`TRUNCATE` ,`curl | bash` , reverse shells, and`../` traversal.\n4. **Human-in-the-Loop (HITL) Approval Gate**  - In HTTP proxy mode, high-risk tools (`execute_sql` ,`run_command` ,`transfer_funds` ) are suspended in real time until an operator clicks**APPROVE** or**DENY** in the live dashboard.\n5. In HTTP proxy mode, high-risk tools (\n6. **Deterministic Infinite-Loop & Budget Circuit Breaker**  - Halts runaway identical tool-call retry loops and enforces per-minute / per-session hard caps.\n7. **Tamper-Evident Cryptographic Audit Ledger (SOC2 / EU AI Act Ready)**  - Every allow/block/redact decision is hash-chained (`SHA-256` ) and signed (`HMAC-SHA256` ) into both JSONL and SQLite. Verify zero tampering anytime with`mcp-sentry audit --verify` .\n8. Every allow/block/redact decision is hash-chained (\n9. **Hot-Reloaded Policy-as-Code (`sentry.yaml`)**  - Edit tool whitelists, denied paths, allowed domains, and HITL gates without restarting the gateway.\n\n```\ngit clone https://github.com/yepinggu66/mcp-sentry.git\ncd mcp-sentry\npip install -e .\nmcp-sentry bench\n{\n  \"mcpServers\": {\n    \"postgres-guarded\": {\n      \"command\": \"mcp-sentry\",\n      \"args\": [\"wrap\", \"--policy\", \"sentry.yaml\", \"--\", \"npx\", \"-y\", \"@modelcontextprotocol/server-postgres\", \"postgresql://...\"]\n    }\n  }\n}\nmcp-sentry init\nmcp-sentry proxy --upstream http://127.0.0.1:9000/mcp --port 8787 --policy sentry.yaml\n# Open http://127.0.0.1:8787/sentry/ui\nmcp-sentry audit --verify\n```\n\nVerified directly via `mcp-sentry bench` and `python -m unittest discover -s tests -v`:\n\n| Category | Attack Vectors Tested | Block Rate | Avg Latency | \n|---|---|---|---|\n| Tool Poisoning & Unicode Smuggling | Hidden `<IMPORTANT>` exfil, Zero-Width BiDi, stealth directives | **3 / 3 (100%)** | 0.042 ms | \n| Rug-Pull Schema Drift | Post-approval SHA-256 tool mutation | **1 / 1 (100%)** | 0.015 ms | \n| Destructive & Shell/SQL Injection | `rm -rf /` ,`DROP TABLE` ,`TRUNCATE` ,`curl\\|bash` , reverse shell,`base64\\|sh` | **6 / 6 (100%)** | 0.017 ms | \n| Secret Theft, DLP & Path Traversal | `.env` ,`~/.ssh/id_rsa` ,`../` , OpenAI/AWS/GitHub/PEM/Postgres URI | **8 / 8 (100%)** | 0.016 ms | \n| Response Redaction & Taint Exfil | In-flight AWS/OpenAI masking + cross-server outbound block | **2 / 2 (100%)** | 0.038 ms | \n| Domain Firewall, HITL, Loop & Ledger | Domain deny, HITL suspension, 4th-call loop trip, 1-byte tamper detection | **4 / 4 (100%)** | 0.074 ms | \n| **TOTAL** | **24 Real MCP Attack Vectors** | **24 / 24 (100.0%)** | **0.031 ms** | \n\n- **Online Security Sandbox** :[https://pingguye.cn/stackverdict/agentwall](https://pingguye.cn/stackverdict/agentwall)\n- **Commercial / Enterprise License & Source Code Buyout** :\n  - Need custom SSO/RBAC, multi-tenant Slack/Teams HITL approval bots, SIEM/OTLP pipelines, or full commercial IP licensing?\n  - Contact: **[yepinggu66@gmail.com](mailto:yepinggu66@gmail.com)**", "url": "https://wpnews.pro/news/show-hn-mcp-sentry-v2-0-zero-dependency-firewall-and-audit-proxy-for-mcp", "canonical_source": "https://github.com/yepinggu66/mcp-sentry", "published_at": "2026-11-19 18:36:05+00:00", "updated_at": "2026-11-19 18:46:23.679192+00:00", "lang": "en", "topics": ["ai-agents", "agent-protocols", "ai-safety", "developer-tools"], "entities": ["MCP-Sentry", "Model Context Protocol", "Claude Desktop", "Cursor", "Windsurf", "Anthropic", "OpenAI", "GitHub"], "also_reported_by": [], "takeaway": "MCP-Sentry v2.0 wraps any stdio or Streamable HTTP MCP server with one command and pins SHA-256 fingerprints of each tool's name, description and inputSchema to block post-approval rug-pull mutations at 0.031 ms average latency.", "recommendation": null, "alternates": {"html": "https://wpnews.pro/news/show-hn-mcp-sentry-v2-0-zero-dependency-firewall-and-audit-proxy-for-mcp", "markdown": "https://wpnews.pro/news/show-hn-mcp-sentry-v2-0-zero-dependency-firewall-and-audit-proxy-for-mcp.md", "text": "https://wpnews.pro/news/show-hn-mcp-sentry-v2-0-zero-dependency-firewall-and-audit-proxy-for-mcp.txt", "jsonld": "https://wpnews.pro/news/show-hn-mcp-sentry-v2-0-zero-dependency-firewall-and-audit-proxy-for-mcp.jsonld"}}