whereismyai
Ctxfw
Ctxfw is an in-memory Tree-Sitter AST context firewall and pruning MCP server that reduces context token usage for autonomous coding agents.
Ctxfw operates as an in-memory Tree-Sitter AST context firewall and pruning MCP server designed for autonomous coding agents. It utilizes multi-depth topological resolution, ranging from focal targets to ambient dependencies, to prune unnecessary tokens while maintaining syntactic integrity. The tool employs SQLite WAL symbol indexing and an in-memory L1 write-through cache to achieve low latency. It functions as a local-first system without external API dependencies or network telemetry. The software is compatible with coding agents like Cursor, Claude Code, and Windsurf, focusing on reducing context token mass for improved agent efficiency.
Ctxfw at a glance
- Best for: Software engineer
- Runs on: Linux, self-hosted
- Pricing: Free
- Released: September 2026
- Category: AI coding tool
- Website: github.com/heuristicolab/ctxfw
Key features
- In-memory Tree-Sitter AST processing
- Multi-depth topological resolution
- SQLite WAL-based symbol indexing
- Context token pruning for AI agents
- Local-first execution with no external API calls
- Syntactic validity verification via ast.parse
Use it for
- Reducing context window consumption for coding agents
- Optimizing repository context for large-scale codebases
- Managing dependencies in multi-depth project analysis
Alternatives to Ctxfw
- Chemical X — Stops wasting agent context on CLI noise and compiler dumps.
- Codebase Memory MCP — High-speed indexing and persistent knowledge graphs for AI coding agents.
- CtxWise — It reduces startup tokens and blocks secret leaks in agent configuration files.
- ContextMCP — Maintains fresh, accurate context for AI agents using AST-aware chunking.
- Lcc — Cuts token counts significantly without losing exact session details.
- CodeSight — Reduces AI token usage significantly and maps projects instantly.
- CodeGraph — It eliminates file crawling, reducing AI agent tool calls by 88% and cutting costs.
- claude-mem — It shares persistent, searchable agent memory across sessions and devices.
- jCodeMunch MCP — Cuts AI code-reading token costs by over 95 percent via tree-sitter symbol indexing.
- JFrog Boost — Lowers token usage for AI coding agents through input filtering.
- ripwire — It reduces token spend and prevents bugs by giving coding agents precise repository context.
- jevgrep — Reduces coding agent costs by providing targeted, relevant repository context.
All Ctxfw alternatives