codebase-memory-mcp
An MCP server that builds a code graph of functions, classes, calls and routes and answers the agent's structural queries locally
- 48,531 ★ on the repository
- Last commit
- MIT
Extended access
Why this level
- Reads the whole codebase and writes settings into agent configurations
- Runs a background daemon, a file watcher and a local web UI
Install
- Works in
Manual install
curl -fsSL https://raw.githubusercontent.com/DeusData/codebase-memory-mcp/main/install.sh | bashmacOS and Linux. The installer downloads the binary and configures detected agents. Restart the agent afterward.
Access and checks
How we reviewExtended accessThe tool runs code or makes network calls and only reads external data.
- Reads the whole codebase and writes settings into agent configurations
- Runs a background daemon, a file watcher and a local web UI
This is third-party code. Review the repository files before installing.
What it does
The server indexes a repository and builds a graph of code relationships: functions, classes, call chains, HTTP routes and cross-service links. Parsing goes through tree-sitter grammars for a large set of languages, and several languages add type resolution. The agent asks structural queries, for example what calls a function, where dead code is, or how a change affects other parts, instead of reading files one by one. Everything runs locally, with no API keys and no external service, and the code never leaves the machine. It has a built-in 3D graph visualization in the browser and a team-shared graph snapshot that can be committed to the repository.
Who it is for. For developers who want the agent to navigate a large codebase by structure rather than by rereading files.
Good fit when
- You need to quickly grasp the architecture and links in a large repository
- You need to find who calls a function and assess the impact of changes
- You want code and graph search without reading many files into context
- You want a local tool with no API keys and no external services
Not a fit when
- You want a ready natural-language answer without an agent: the server only builds and serves the graph
- The project is tiny and plain file search is enough
- You cannot run a local binary and a background process
Example request
Index the project and show what calls the ProcessOrder functionMCP
- Transport
- stdio
- Authentication
- not required
Environment variables
CBM_CACHE_DIR- Cache and index directory, default ~/.cache/codebase-memory-mcp.
CBM_DIAGNOSTICS- Enables a diagnostics log for memory and performance reports.
Limitations
The server is only an analysis backend; it contains no model and relies on the agent as the intelligence layer. It reads your codebase and writes settings into the agent's configuration, which is what it is designed to do. On Windows Microsoft Defender may flag the binary as a false positive, which the author explains in the docs. The shared graph snapshot, if committed on every change, bloats git history heavily, so it is better to commit it on a schedule.
How to disable. Run codebase-memory-mcp uninstall: the command removes the entries in agent configs, the hooks and the binary itself, and deletes indexes only after confirmation.
FAQ
Does it need an API key or the internet?
No. Indexing and queries run locally, no API keys are needed, and the code never leaves the machine.
Does the server answer questions in words itself?
No. It builds and serves the graph, while your agent phrases the answer by calling the server's tools.
Discussion
No questions or reviews yet.
Related
MCP serversAn MCP server that indexes code with tree-sitter and returns individual functions and classes to the agent instead of whole files
An MCP server that builds a code knowledge graph: semantic search, call graph, HTTP route tracing and change impact analysis.
An MCP server that builds a code graph once and serves the answer to the agent instead of re-reading files
A local code graph with version history: an MCP server that tells the agent who calls a function and what an edit breaks
The CodeAlive MCP server: the agent searches large codebases by meaning and exactly and follows call relations without a full read
Local code graph for agents: an MCP server returns entry points, symbol links and change impact in one call
Comparison with similar tools
Cards that share the main search query, and how they differ.
| Tool | Official | Authentication | Repository stars | Main difference |
|---|---|---|---|---|
| codebase-memory-mcp (this card) | no | not required | 48,531 | |
| Ix | no | 1,155 | ix turns a repository into a persistent graph of symbols | |
| Token Savior | no | not required | 1,217 | token Savior indexes code by symbol |
| CodeGraph (Rust) | no | not required | 915 | a Rust code graph for agents |
README in short
The README describes codebase-memory-mcp as a local code-analysis engine for agents, shipped as an MCP server and a native binary with no language runtime. It parses code via tree-sitter for a large set of languages and builds a persistent knowledge graph of functions, classes, calls, routes and cross-service links. Around 15 MCP tools are available: search, call tracing, architecture overview, change-impact assessment, Cypher-style queries, dead-code detection and more. Installation is via a script, npm, PyPI, Homebrew and other managers, with a built-in 3D graph visualization and a team-shared snapshot. Everything runs locally, with no API keys and no telemetry.