ctx: an open-source Rust code graph agents can query to save context budget (MCP support)

arcandor · reddit · 2026-08-27

A developer open-sourced ctx (MIT, single Rust binary) that turns a source tree into a queryable code graph, letting coding agents ask where things are instead of grepping and reading files to fill up the context window. The author says he designed the architecture and heuristics while Claude wrote the implementation.

Key queries:

Built on Tree-sitter with a unified graph across Rust/Python/TS/Markdown—no language servers, embeddings, or index warm-up; builds in 100ms deterministically against current source. Reports 96.2% internal call-graph recall on its own codebase. Falls back to a unique-name heuristic for unevaluated-expression receivers. MCP support included; install via cargo install code-context or brew.

Original post →

More from coding & agent

coding & agent channel →