I built Trevec, an MCP-native code retrieval engine specifically designed for Claude Code. It is completely free to try and use. How Claude helped me build this: I used Claude Code extensively to build this project. Trevec is built in Rust, and I used Claude to write the complex Tree-sitter AST extraction logic and to map out the codebase relationships. I also used Claude Code to write the Python evaluation harness we used to benchmark it against SWE-bench. What it does & the problem it solves: Trevec provides a get_context MCP tool and Claude uses this to quickly retrieve any piece of your code and the relevant context along without any dead code references. It returns the exact functions + their callers + their dependencies in a single call (takes ~49ms). Under the hood, it parses your code into AST units, builds a knowledge graph of relationships, and uses that structure to retrieve precisely the context Claude needs — not just text matches, but the code neighborhood and your chat history too. Benchmark results (SWE-bench Lite, 300 issues): 42.3% — the first file Trevec returns is exactly the file that needs fixing 60.7% Recall@5 Average ~4,000 tokens per query (vs 30k+ when agents explore the repo themselves, which saves massive token costs). Benchmark results here: https://github.com/Beaverise/trevec-swe-bench-results (Not a promotion or clickbait) How to try it for free: Trevec is 100% local. Your code never leaves your machine, and no API keys are needed. Setup takes 30 seconds. Would love feedback from anyone using Claude Code daily! submitted by /u/MutantX222
Originally posted by u/MutantX222 on r/ClaudeCode
