DeusData /
codebase-memory-mcp
Local MCP server that indexes your code into a graph so agents query it, not grep
- 47.3k stars
- 1.6k stars since 3 Oct
- C
- Updated yesterday
- Some experience
- Coding agents & dev tools
Coding agents usually explore a project by grepping and reading files one at a time. That burns tokens and many tool calls. This project parses your repository once, stores the result as a graph, and lets the agent ask the graph directly.
It uses tree-sitter to build syntax trees for 162 languages, all compiled into one native binary. For 12 languages, including Python, TypeScript, Go, Rust, Java and C++, it adds a hybrid LSP step that resolves types more accurately. The graph lives in SQLite on your machine. The README says nothing leaves it and no API key is needed.
The README compares it with file-by-file exploration. Its preprint reports 10x fewer tokens and 2.1x fewer tool calls across 31 repositories, with 83% answer quality. Those are the authors' own numbers. It also bundles a 3D graph viewer and a shared background daemon, so several agent sessions can use one index.
What it does
Persistent code knowledge graph
Records functions, classes, call chains, HTTP routes and cross-service links. Dockerfiles, Kubernetes manifests and Kustomize overlays become graph nodes too.
17 MCP tools
Covers search, tracing, architecture views, impact analysis, Cypher queries, dead code detection, cross-service HTTP linking and ADR management.
One-command setup for many agents
The install command detects supported coding agents and writes their MCP config, instructions, skills and hooks where supported. The README lists 45 client surfaces.
Built-in 3D graph viewer
Run the binary with --ui=true --port=9749 and open localhost:9749 to explore the graph in a browser.
Auto-indexing and file watching
Optionally indexes new projects on first connection and tracks git changes in the background. Both can be switched off through config settings.
What you could build
- Ask your coding agent who calls a given function, without it reading dozens of files.
- Check the likely impact of a change before refactoring a large repository.
- Find dead code in a project using the graph tools.
- Map how services in a multi-service system talk to each other over HTTP.
- Browse a codebase's structure visually in the 3D graph view.
Get started
Run the one-line installer on macOS or Linux (Windows has a PowerShell installer), then restart your coding agent. Ask it to "Index this project". The installer edits your agent config files, so you may want to read the script first.
curl -fsSL https://raw.githubusercontent.com/DeusData/codebase-memory-mcp/main/install.sh | bashcodebase-memory-mcp --ui=true --port=9749codebase-memory-mcp config set auto_index trueCommands are copied from the project's README. Read it on GitHub for the full setup.
More in Coding agents & dev tools
rea
MCP server that lets AI agents reverse engineer apps, binaries and websites locally