skill · curated · mcp · code-intelligence · tree-sitter · Oct 1, 2026 · 2 min read
codebase-memory-mcp: Structural Code Intelligence Without the Token Burn

codebase-memory-mcp is an MCP server that builds a persistent structural knowledge graph of your codebase using tree-sitter — then exposes it to your AI agent through 14 typed query tools: call-path tracing, impact analysis, hub detection, and more. Index once, query forever.
When it shines
The payoff is on large repos where your agent keeps re-reading the same files to answer basic structural questions: "what calls this function?", "what would break if I change this type?", "where does this request flow through the app?" Instead of dumping files into context, the agent asks the graph and gets a precise answer in under 1ms.
DeusData's benchmarks show 83% answer quality across 31 real-world repos, 10× fewer tokens, and 2.1× fewer tool calls compared to naive file-by-file exploration. It full-indexes an average repo in milliseconds; the Linux kernel (28M LOC, 75K files) in about 3 minutes.
Ships as a single static binary with 158 vendored tree-sitter grammars compiled in — no runtime deps, nothing to break.
The real caveats
Large repos time out on first index. MCP clients impose call deadlines, and triggering indexing inline can exceed that limit. The fix is async: true mode with polling — but you will hit the wall before you find the docs.
Git history bloat. The graph artifact (.codebase-memory/graph.db.zst) lands on disk. Add it to .gitignore immediately or you will start committing multi-MB diffs on every re-index.
Windows Defender false positive. The binary triggers Trojan:Script/Wacatac.B!ml. It is a documented false positive, but it will give your team a moment of panic.
Try it
One-liner install on macOS/Linux:
curl -fsSL https://raw.githubusercontent.com/DeusData/codebase-memory-mcp/main/install.sh | bashPoint your MCP client at the local server and run index_codebase on your project root. The graph persists across sessions, so subsequent agent runs skip the indexing step entirely.
Full docs and source: github.com/DeusData/codebase-memory-mcp, by DeusData.