Security gateway for MCP agents: blocks prompt-injection-driven tool calls before they execute.
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β or use 1-click editor setup below.
π‘ Paste the JSON block into your client's configuration file under mcpServers, then restart the application.
The security gateway for MCP agents that other gateways can't be: it blocks prompt-injection-driven tool calls by checking whether an action is grounded in evidence and intent β not just whether it matches a regex.
AI agents now take real actions β payments, trades, writes, sends β and the parameters of those actions are taken on faith. Existing MCP security gateways are syntactic (globs, allowlists, regex); none can answer the question that matters: is this action grounded in the evidence and consistent with the user's intent? A payment to an attacker's address looks identical to a payment to the real vendor.
Tripwire is an MIT-licensed MCP proxy. Point any MCP agent at Tripwire instead of its tool servers; Tripwire forwards everything transparently while running a three-tier verification pipeline on calls that policy marks as consequential:
Every decision β including passes β lands in a hash-chained, append-only audit log that tripwire verify-log re-validates.
The full design and build plan is in TRIPWIRE_PLAN.md.
Read next: docs/THREAT_MODEL.md β what each tier defends against, and exactly what Tripwire cannot do. docs/POLICY.md β the policy YAML reference.
v0.3.0 β all five build phases complete, plus a no-engineering-required setup flow (tripwire init / check / logs) and HTTP transport for server-side deployments (one Tripwire process, many isolated agent sessions). See docs/GETTING_STARTED.md and Server-side (HTTP).
<upstream>__<tool> with definitions passed through verbatim; byte-equivalent passthrough proven by integration test; HMAC-SHA256 receipt ledger over canonical JSON (in-memory + JSONL); hash-chained audit log of all traffic; tripwire verify-log.sensitive_params provenance, with anti-laundering (echoed inputs never gain a tool's trust label, failed executions are not evidence); structured machine-actionable BLOCK results built for agent self-correction. The poisoned-invoice attack is blocked by Tier 1 alone β zero model calls.tripwire__declare_intent tool (receipted; policy can require it via require_intent, and the block error tells the agent how to self-serve); verification packet builder (intent + proposed call + Tier 1 provenance + receipted evidence excerpts); thin fetch-based verifier clients for Anthropic/OpenAI/Google with strict JSON verdict parsing; parallel panel with majority/unanimous quorum; timeouts, malformed output, and missing keys all count as failed verdicts under fail-closed; verifier disagreement flagged as signal; versioned prompt templates pinned in every audit entry. Live smoke script gated behind env keys (npm run smoke:live); CI stays fully deterministic with mocked verifiers.npm run demo shows the disarmed agent paying the attacker, the identical agent blocked structurally and self-correcting, and Tier 2 catching a plausible-but-wrong amount.Three runs of the same scripted agent against the same poisoned invoice ("our banking details changed β remit to 0xBBBBβ¦"):
bounds_and_sanity check blocks it; the agent re-reads the invoice and pays the right amount.The demo ends with the audit excerpt: every decision hash-chained, every execution HMAC-receipted.
42 scripted sessions: 21 attacks, 21 legitimate flows built to tempt false positives (vendors genuinely rotating banking details, unusual-but-correct amounts, batches, encoding variations, partial payments). Reproduce with npm run bench; the numbers are pinned by test/bench.test.ts.
| Metric | Result |
|---|---|
| Attacks caught | 19/21 (90.5%) |
| β caught by Tier 1 (structural, 0 model calls) | 15/21 |
| β caught by Tier 2 (consensus) | 4/21 |
| Attacks missed (documented) | 2/21 |
| False-block rate (the headline) | 1/21 (4.8%) |
Honesty notes, because alert fatigue is how security tools die:
npm run bench -- --live re-runs the corpus against a real Anthropic/OpenAI/Google panel.The agent reads a poisoned invoice ("our banking details changed: 0xBBBBβ¦") and tries to pay it. The address only ever appeared inside untrusted document content, so the call never reaches the payment rail:
A well-built agent reads this, re-queries the vendor record (trusted), and retries with the real address β which passes. That loop is tested end-to-end with zero verifier models in test/tier1.integration.test.ts.
New to this? Follow docs/GETTING_STARTED.md β written for non-engineers.
tripwire init also writes tripwire-agent-config.json β paste it into your AI agent's MCP settings (Claude Desktop, Claude Code, etc.), replacing the tool servers it lists today. Tripwire now sits in front of them. Then use your agent normally; dangerous calls are verified, and tripwire logs shows you what happened in plain English.
Running agents server-side rather than on a laptop? Switch the transport and one Tripwire process serves many agents β each in a fully isolated verification session (own receipts, provenance, audit, upstream connections):
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/tripwire-2)<a href="https://allmcps.com/mcp/tripwire-2"><img src="https://allmcps.com/api/badge/tripwire-2?style=directory" alt="Tripwire on AllMCPs" /></a>