mcp-bouncer: A 500-Line Policy Proxy That Blocks Dangerous MCP Tool Calls
princejain756 · reddit · 2026-10-14
Frustrated that existing MCP security tools only audit tool descriptions, the author built mcp-bouncer—a 500-line, zero-dependency policy proxy for stdio MCP servers that sits on the JSON-RPC pipe and refuses dangerous calls at request time.
Key features: per-tool allowlists (unapproved tools are also hidden from tools/list so the agent never sees them), path traversal defense by resolving ./.. before matching, blocking of private hosts and 169.254.169.254 metadata endpoints in URL args, per-tool rate limits and response caps, and an audit log with sha256-digested args. A scan mode audits servers standalone—flagging injection-style descriptions, tool shadowing, and unconstrained params—and exits nonzero for CI use. The author notes it's protocol-level enforcement, not a kernel sandbox.
More from coding & agent
- One AI audit of curl produced 24 CVEs; 18 fixed in 8.23.0 today — aidangomez · 2026-10-14
- Asked Fable to review code, it spawned 6 subagents and burned through the 5-hour limit — Aryvyo · 2026-10-14
- Using Obsidian as your agent's knowledge base: distill every conversation into md notes — mazzaTalk · 2026-10-14
- Two small LLMs on a Galaxy S21 complete an Amazon shopping task locally in 51 minutes — Mean-Standard7390 · 2026-10-14
- Tech in Five: a quick primer on what Computer Use actually is — JohnSavill · 2026-10-14
- Dev pays UK ICO fee via Codex: agent filled the form in 2 seconds — yihui_indie · 2026-10-14