AST-Retrieval MCP Saves 2.1M Tokens in Real Claude Code Roblox Project
naruto_uzumaki00 · reddit · 2026-08-14
A developer integrated a custom AST-retrieval MCP plugin while building a Roblox game entirely with Claude Code. The plugin uses tree-sitter to feed the agent exact code slices instead of full files.
Real-World Metrics
- Across a 164k-token repo, 188 real retrieval calls were logged.
- Saved approximately 2.12 million tokens (93% reduction) compared to whole-file reads.
- This directly cuts costs on metered APIs and delays hitting weekly caps on Claude Code subscriptions.
Additional Details
- The tool is open-source (Apache-2.0) and works as an MCP plugin (Claude Code + Codex) or a proxy.
- Supports 13 languages including Luau.
More from coding & agent
- How do you debug bad agent runs when you already have tracing? — Sensitive-Parsnip-12 · 2026-10-16
- Where does pre-task context live for agents? Devs debate workflows beyond handoff — shishen2026 · 2026-10-16
- No-instruction autonomous agent wakes up, sets own goals, and tries hacking by default — sethlazar · 2026-10-16
- CODESTRUCT reframes codebases as AST action spaces to fix brittle LLM code agents — burkov · 2026-10-16
- Would you install another SDK for agent debugging on top of your tracing stack? — Sensitive-Parsnip-12 · 2026-10-16
- Law student builds all-in-one AI study platform LexLab Studio with ChatGPT and Muse — Acrobatic_Rhubarb598 · 2026-10-16