mcp-cage v0.2.2 β Zero-Code Wire & Native-Hook Security Firewall
"Gitleaks + Little Snitch for AI Coding Agents" β Deterministic, non-bypassable Information-Flow Control (IFC), format-preserving secret scrubbing, SSRF/DNS exfiltration blocking, and MCPTox / CurXecute defense for Claude Code, Cursor, OpenAI Codex CLI, Google Gemini CLI, Google Antigravity (agy), and any Model Context Protocol (MCP) server.
Whether your agent supports native lifecycle hooks (Claude Code, Cursor, Gemini CLI, Codex, Antigravity), only speaks raw stdio MCP JSON-RPC (Claude Desktop, Zed, Windsurf), executes raw shell subcommands, or runs in-process as a Python LangGraph/PydanticAI workflow, mcp-cage enforces the exact same SQLite WAL security state machine.
Click any of the 8 security planes below to inspect its formal invariant, real-world exploit/CVE coverage, and live wire transformation inside mcp_cage_core.py.
Replay the V1 Handle-Tracker Failure (where context laundering & cross-process leaks bypass naive guards) side-by-side against mcp-cage v0.2.2, inspect the live $(P \times U \Rightarrow S)$ capability graph, or run mcp-sploit static audits and explore the 36-Vector Master Attack Atlas.
mcp-cage Wire & Hook Monitorsecret_vault)| ID | Class | Wire Placeholder | Raw Secret (Hidden from LLM) |
|---|
.mcp-cage/audit.jsonl)mcp.json Tool Definitions (Editable)
Uses word-boundary matching + MCP 2025 annotations (readOnlyHint, destructiveHint, openWorldHint) so benign tools like search_files and create_virtualenv have zero false positives.
mcp-cage.yaml Lockdown Policy| ID | Attack Vector & Analogy | Visual Storyboard | Concrete Mechanism & Real-World Incident / CVE | How mcp-cage Stops It |
|---|
Customize your workspace directory, SQLite state path, and enforcement mode below, then select your AI coding agent or Python framework to generate a ready-to-paste configuration.
mcp-cage synthesizes six decades of Operating Systems capability confinement, decentralized Information-Flow Control (IFC), and modern LLM security research into a single zero-dependency runtime monitor.
| Year | System / Milestone Paper | Authors / Venue | Primary Citation Link | Core Principle & Direct Adaptation in mcp-cage v0.2.2 |
|---|---|---|---|---|
| 1966 | Capability-Based Addressing | Dennis & Van Horn (MIT) Β· CACM | doi:10.1145/365230.365252 β |
Replaced ambient authority with unforgeable object capabilities; inspires mcp-cage's opaque <MCP_REDACTED_...> secret vault handles and per-tool role confinement. |
| 1972 | The Reference Monitor Concept | James P. Anderson Β· USAF ESD-TR-73-51 | ESD-TR-73-51 β |
Defines the three reference monitor guarantees: non-bypassable, tamper-proof (out-of-process OS pipe isolation), and verifiable (small zero-dependency core). |
| 1973β77 | Bell-LaPadula & Biba Dual Lattices | Bell & LaPadula (MITRE) Β· K. J. Biba | MTR-2547 / MTR-3153 β |
Formalized No Read Up / No Write Down (Confidentiality) and No Read Down / No Write Up (Integrity); unified in mcp-cage's product lattice $(\mathcal{I} \times \mathcal{C})$. |
| 1976 | A Lattice Model of Secure Information Flow | Dorothy E. Denning Β· CACM 19(5) | doi:10.1145/360051.360056 β |
Proved that monotonic label join ($\sqcup$) across state transitions prevents both explicit and implicit information leaks. |
| 1999 | JFlow / Jif (Decentralized Label Model) | Andrew C. Myers Β· POPL '99 | doi:10.1145/292540.292561 β |
Introduced principled declassification and endorsement gates, mirrored in mcp-cage's ENDORSE_CONTEXT and LEASE_MUTATOR_5M human step-up actions. |
| 2006β07 | HiStar & Flume (OS-Level DIFC) | Zeldovich et al. (OSDI '06) Β· Krohn et al. (SOSP '07) | USENIX OSDI '06 β |
Enforced DIFC at OS process/pipe boundaries without trusting application codeβdirectly analogous to mcp-cage wrap treating the LLM and MCP server as untrusted processes. |
| 2010 | Capsicum: Practical Capabilities for UNIX | Watson, Anderson, Laurie, Kennaway Β· USENIX Security '10 | USENIX Sec '10 β |
Demonstrated incremental capability sandboxing of existing UNIX binaries, inspiring mcp-cage's canonical workspace path guards and dotfile write locks. |
| 2024 | Spotlighting & StruQ (Prompt Boundary Marking) | Hines et al. (Microsoft) Β· Chen et al. (UC Berkeley) | arXiv:2403.14720 β |
Cryptographically randomized datamarking boundaries (<<<UNTRUSTED_DATA_BOUNDARY id=...>>>) with anti-spoofing sanitization on UNTRUSTED_SOURCE wire outputs. |
| 2025 | MELON: Provable Defense via Provenance Attribution | Zhu et al. Β· ICML / arXiv 2025 | arXiv:2502.05174 β |
Adapted as mcp-cage's zero-LLM provenance extractor: records URLs, domains, and emails from untrusted outputs and hard-blocks sinks targeting them ([PROVENANCE HIJACK BLOCKED]). |
| 2025 | CaMeL: Defending Prompt Injections by Design | Debenedetti et al. (Google DeepMind) Β· arXiv 2025 | arXiv:2503.18813 β |
Separates data capabilities and provenance from untrusted LLM control flow; mcp-cage achieves this at zero token cost on the JSON-RPC wire and hook boundary. |
| 2025 | Progent: Programmable Privilege Control for LLM Agents | Shi et al. (UC Berkeley) Β· arXiv 2025 | arXiv:2504.11703 β |
Deterministic parameter-level policy guards; adapted in StandardArgGuards (SQL AST/verb guards, SSRF/IMDSv1 guards, high-entropy DNS exfil blockers, and dotfile locks). |
| 2025 | FIDES: Securing AI Agents with Information-Flow Control | Costa et al. (Microsoft Research) Β· arXiv 2025 | arXiv:2505.23643 β |
Dual-lattice confidentiality and integrity label propagation with explicit sink clearance checks in multi-turn tool sessions. |
| 2025 | MCPTox: Benchmark & Analysis of MCP Tool Poisoning | Wang et al. Β· arXiv 2025 | arXiv:2508.14925 β |
Structural sanitization of poisoned tools/list descriptions, cross-server shadowing detection, and SHA-256 schema pinning in mcp-lock.json. |
| 2026 | FLOWSEAL & mcp-cage v0.2.2 |
Nagarajulu (Naga) Aerakoni | arXiv:2609.14003 / GitHub β |
Unifies Plane A (MCP JSON-RPC 2.0 wire proxy) and Plane B (native IDE/CLI lifecycle hooks) over a single cross-process SQLite WAL taint state machine & bidirectional secret vault. |