Codebase Memory MCP
DeusData
Code-intelligence MCP server - a persistent knowledge graph over 158 languages via tree-sitter AST parsing.
What is Codebase Memory MCP?
Codebase Memory MCP builds a persistent structural knowledge graph of a codebase with tree-sitter AST parsing and lightweight type resolution for 9 languages. It runs as an MCP server with 14 tools so agents query call graphs, symbols, dead code and cross-service links instead of searching files. It ships as a single static binary with SLSA Level 3 provenance and claims sub-millisecond graph queries (project's own claim).
Codebase Memory MCP in depth
AI coding assistants are surprisingly bad at understanding the shape of a codebase. To answer a question like "what calls this function" or "which handler serves this route," they tend to grep, open files, and read them one by one, burning through the context window before they reach an answer. Codebase Memory MCP from DeusData attacks that problem by building a persistent structural knowledge graph of your code ahead of time. It parses sources with tree-sitter across 158 languages, captures functions, classes, imports, call chains, routes, and cross-service links, and stores them as graph nodes and edges. An MCP server then exposes that graph so an agent can ask precise structural questions instead of crawling the filesystem.
The interesting part is how it layers two kinds of analysis. Tree-sitter gives broad syntactic coverage, and on top of that a lightweight C type-resolution layer the project calls Hybrid LSP refines results for nine languages: Python, TypeScript/JavaScript, PHP, C#, Go, C/C++, Java, Kotlin, and Rust, handling imports, generics, and inheritance. The graph lives in an embedded SQLite store and is queried through a Cypher-like read subset, with 14 MCP tools for indexing, searching, tracing paths, detecting changes, and pulling architecture overviews. It ships as a single static binary with no runtime dependencies, no vector database, and no API keys, which is a real contrast to embedding-based code search that needs a model and an index server before it does anything useful.
This is aimed at developers who already use an MCP-capable assistant, such as Claude Code, Codex CLI, or others the installer auto-configures, and who work on large or unfamiliar repositories. Concrete uses fit that profile well: tracing a call path across packages before a refactor, finding dead code, mapping HTTP routes to their handlers, or following cross-service edges through gRPC, GraphQL, or tRPC calls in a microservice estate. Because the graph can be committed as a compressed artifact, a team can share one index so new joiners get structural answers without re-indexing. The background watcher re-indexes on file changes, so the graph stays roughly current as you work rather than going stale after the first run.
The honest caveats matter here. The headline token-reduction figure, around 99 percent fewer tokens across five sample questions, is the project's own benchmark with no independent reproduction, so treat it as a directional claim rather than a guarantee. The tool is structural, not semantic: it maps how code connects, not what it means, so it will not answer fuzzy conceptual questions the way embedding search can. Its value is also gated on having an MCP client that actually calls the tools well; standalone, the graph is just a database. Only nine languages get deep type resolution, the rest fall back to textual matching, and anything outside the supported query subset fails by design. Windows users may also hit SmartScreen warnings.
Against Sourcegraph Cody, the trade is clear. Cody is a hosted, semantic, embedding-driven assistant with broad IDE integration and a commercial support model, while Codebase Memory MCP is a local, structural, zero-dependency graph you run yourself and feed to whatever agent you prefer. The engineering signals are reassuring: MIT licensed, SLSA Level 3 provenance, and a large passing test suite the project reports at over 5,600 tests. Adopt it if you live in an MCP assistant on a big codebase and want fast, precise structural answers without standing up infrastructure. Hold off if you need general-purpose semantic RAG over code, if your stack sits outside the nine deeply supported languages, or if you are not using an MCP-capable client at all.
Pros & Cons
Pros
- Single static binary with zero runtime dependencies - no vector DB to set up first
- SLSA Level 3 provenance and 5,600+ passing tests signal rigorous engineering
- 158-language indexing with deep resolution for 9 languages
Cons
- Token-reduction claims are the project's own with no third-party reproduction
- Value is gated on MCP-capable assistant support - less useful standalone
- Structural graph tool, not a semantic embedding search
License
MIT (OSI-open)
When it is interesting
Using an MCP-capable assistant on a large or unfamiliar codebase where file search wastes context budget.
When it is too early
If you want general-purpose semantic RAG over code rather than a structural graph.
Commercial alternative & related
- Commercial counterpart: Sourcegraph Cody
This repo featured in the 2026-07 edition of the Open-Source AI Radar.
chrome-devtools-mcp
ChromeDevTools
Official Chrome DevTools MCP server giving coding agents control of a real Chrome instance with DevTools-grade inspection.
n8n-mcp
czlonkowski
Independent MCP server giving AI assistants structured access to n8n node docs to build and validate workflows.
claude-context
zilliztech
Code-search MCP server for AI coding agents - semantic + BM25 hybrid search across whole codebases.