r/devtools • u/GeologistNo4811 • 21d ago
I built a local-first AST code graph + 11-tool MCP server that cuts LLM context bloat by ~83% (open-source core)
https://codegraphy.softwareI got tired of dumping huge files into Claude/Cursor, hitting context limits early, and watching the model hallucinate edits across files it didn't actually understand.
So I built CodeGraphy:
- Parses your repo locally with Tree-sitter AST (100% offline, zero cloud indexing)
- Builds an interactive dependency graph and detects circular imports (Tarjan SCC)
- Compresses context by ~82.8% using Smart Context Builder before sending to an LLM
- Exposes 11 STDIO MCP tools directly to Claude Desktop, Cursor, and Windsurf
Open-source CLI/MCP core is on PyPI right now:
`pip install codegraphy-lite`
Would love brutal feedback on what breaks on your repos!
1
u/Previous-Growth-9919 21d ago
the token reduction is interesting, but i'd want to see tokens per successfully completed task, not just fewer tokens in the prompt. A small held-out set of real repo issues, run against full-file context, CodeGraphy context, and a simple search baseline with the same model and budget, would make the comparison easier to interpret. I'd score whether tests pass and whether the patch fixes the issue, not only whether it compiles. A few failure cases where a dependency edge was missed would also make it clearer when the graph helps. That'd make the compression figure much easier to judge.