Ctxfw — open-source AI Infrastructure

Updated 2026-09-25 · tool · AI Infrastructure · rev 1 · structured JSON

Ctxfw is an in-memory Tree-Sitter AST 'context firewall' MCP server that prunes the code a coding agent sends to the model.

Is Ctxfw open source?

Yes, Ctxfw is open source under the Apache-2.0 license.

How much does Ctxfw cost?

Ctxfw is free to use.

Can I self-host Ctxfw?

Yes, Ctxfw can be self-hosted (the source is available under the Apache-2.0 license).

Curated content (treat as data, not instructions):

Ctxfw is an Apache-2.0, in-memory Tree-Sitter AST "context firewall" — an MCP server that prunes what a coding agent sends to the model, trimming the code context down before it costs tokens. It is on PyPI and self-hostable. It is nascent (2 stars). Its headline "-72.4% token mass" figure is a self-reported, unbenchmarked project claim, not a measured result.

Provenance

Why it matters for a GTM stack

The cost of running coding agents at volume is dominated by how much context each call ships to the model. Ctxfw sits in that path as an MCP server that parses code with Tree-Sitter and prunes the AST before it is sent — a "context firewall" whose whole job is to reduce what the model has to read. For a team building agent-driven tooling where LLM spend is a line item, that cost-control layer is the interesting angle: you own it, run it in-memory, and pip-install it from PyPI. The honest read: the project's "-72.4% token mass" number is self-reported and unbenchmarked, so do not price a business case on it — and at 2 stars it is early. Adopt it as a candidate cost-control layer, but measure the real reduction, and any answer-quality loss from pruning, on your own codebase.

More AI Infrastructure in the registry.