Open-source MCP firewall blocks prompt injection in 2.7ms with deterministic regex and AST parsing

EstablishmentTough18 · reddit · 2026-09-28

An open-source Security Gate x402 MCP server adds sub-3ms deterministic protection against indirect prompt injection and tool poisoning for autonomous agents that run bash, scrape the web, or sign on-chain transactions via Safe{Wallet}.

Instead of slow LLM-as-a-judge checks (500-2000ms per call), it uses 100% deterministic regex and AST parsing: 1.84ms for secret-leak/AST scans, 2.73ms for prompt injection deflection, and exactly 0 Gwei gas lost on intercepted attacks, which are stopped off-chain before EIP-712 signing. Ships with a ready-made Claude Desktop config, a one-line Python GuardedSafeWallet integration, and a live JSON-RPC demo endpoint; repo, PyPI package, and online inspector are public.

Original post →

More from coding & agent

coding & agent channel →