Show HN: Ctxfw – AST context firewall that cuts agent prompt tokens by 67%
Category: ai-ml
Tags: ast, prompt-injection, mcp, token-optimization, coding-agents, security
Score: 7.0/10 (Innovation: 7, Technical: 7, Documentation: 8, Utility: 6)
Ctxfw is a local AST-based context firewall and prompt-injection gatekeeper for MCP coding agents, trimming peripheral dependencies to typed stubs to cut prompt tokens by ~60-72%. It combines Tree-sitter compaction with a deterministic SARA security sieve and zero-egress stdio isolation, with reproducible benchmarks against real repos like Zulip, PostHog, and Airflow.
Target audience: AI/agent developers, backend engineers, devops/security engineers
Repository: https://github.com/heuristicolab/ctxfw · Python · Apache-2.0 · 7 stars
View on Hacker News