Indexing the Linux kernel in 3 minutes so your agent stops grepping
28 million lines of code, 75,000 files, indexed in three minutes. That's the Linux kernel, and it's the number that makes codebase-memory-mcp worth your attention.
It's an MCP server that turns a repository into a persistent knowledge graph — functions, classes, routes, dependencies, all queryable — so an agent can ask structural questions instead of opening files one at a time. 17 tools for searching, tracing call paths, detecting changes, and analyzing architecture, across 162 languages. Parsing is tree-sitter AST with hybrid LSP semantic type resolution layered on for real type information rather than syntactic guessing.
The token claim is the one that should get quoted: roughly 3,400 tokens versus roughly 412,000 for an equivalent analysis done by grepping and reading files. A 99.2% reduction. Whether or not that exact ratio holds on your codebase, the direction is obviously right — exploration by file-read is the single most wasteful pattern in agentic coding, and every token spent rediscovering where a function lives is a token not spent on the actual problem.
Two implementation details signal seriousness. It's a single static binary written in C with tree-sitter grammars vendored in, no language runtime and no external services, which means it installs without dragging a dependency tree behind it. And infrastructure files are first-class graph nodes: Dockerfiles, Kubernetes manifests, Kustomize overlays. An agent that can trace from a route handler to the manifest that exposes it is doing something the file-reading approach essentially cannot.
MIT licensed, 44.5k stars, trending on GitHub today at 266 a day. Structural queries come back sub-millisecond.
The thing to watch is staleness — a knowledge graph is only as good as its last index, and the hard part of this category has always been keeping it current on a repo people are actively committing to. Change detection is in the tool list, which suggests they know.
https://github.com/DeusData/codebase-memory-mcp
← Back to all articles
It's an MCP server that turns a repository into a persistent knowledge graph — functions, classes, routes, dependencies, all queryable — so an agent can ask structural questions instead of opening files one at a time. 17 tools for searching, tracing call paths, detecting changes, and analyzing architecture, across 162 languages. Parsing is tree-sitter AST with hybrid LSP semantic type resolution layered on for real type information rather than syntactic guessing.
The token claim is the one that should get quoted: roughly 3,400 tokens versus roughly 412,000 for an equivalent analysis done by grepping and reading files. A 99.2% reduction. Whether or not that exact ratio holds on your codebase, the direction is obviously right — exploration by file-read is the single most wasteful pattern in agentic coding, and every token spent rediscovering where a function lives is a token not spent on the actual problem.
Two implementation details signal seriousness. It's a single static binary written in C with tree-sitter grammars vendored in, no language runtime and no external services, which means it installs without dragging a dependency tree behind it. And infrastructure files are first-class graph nodes: Dockerfiles, Kubernetes manifests, Kustomize overlays. An agent that can trace from a route handler to the manifest that exposes it is doing something the file-reading approach essentially cannot.
MIT licensed, 44.5k stars, trending on GitHub today at 266 a day. Structural queries come back sub-millisecond.
The thing to watch is staleness — a knowledge graph is only as good as its last index, and the hard part of this category has always been keeping it current on a repo people are actively committing to. Change detection is in the tool list, which suggests they know.
https://github.com/DeusData/codebase-memory-mcp
Comments