Codebase Memory MCP 🔌 MCP server Open source
Local knowledge graph of your repo so agents query call chains instead of grepping files
- GitHub stars
- 46k
- Stars this week
- +765
- Forks
- 3.7k
- Licence
- MIT
- Last push
- 2026-10-02
- Maintainer
- DeusData
curl -fsSL https://raw.githubusercontent.com/DeusData/codebase-memory-mcp/main/install.sh | bashThird-party MCP servers run with your permissions. Read the source before installing, and prefer pinned versions.
Works with
Built on the open MCP standard, so it works in every app that supports MCP.
About Codebase Memory MCP
What it does
Codebase Memory MCP turns a repository into a persistent knowledge graph that your coding agent can query, so it does not have to grep and read files one at a time. It is a single native binary written in C. It parses code with bundled tree-sitter grammars for more than 150 languages and adds type resolution for about a dozen major ones, including Python, TypeScript, Go, Java, C# and Rust. The graph holds functions, classes, call chains, imports, HTTP routes and cross-service links, and it also covers Dockerfiles and Kubernetes manifests. A background watcher keeps the index current as files change. There is no built-in LLM: your agent writes the queries, and the server runs them.
Tools it gives your agent
index_repository,index_status,list_projectsanddelete_projectfor managing indexessearch_graph(structural, BM25 and semantic search),search_codeandget_code_snippettrace_pathfor callers and callees,detect_changesto map a git diff to the symbols it affects, and read-only Cypher-stylequery_graphget_architectureandget_graph_schemafor an overview of the codebasemanage_adrfor keeping architecture decision records across sessions
Works with
It runs locally over stdio. The install command detects and configures dozens of clients, including Claude Code, Codex, Gemini CLI, OpenCode, Cursor, Windsurf, Kilo Code, Zed, Cline, Amp, Goose, Aider and VS Code Copilot. An optional 3D graph viewer runs on localhost.
How to connect
The README's one-line installer for macOS and Linux (npm, PyPI, Homebrew and other package channels are also listed):
curl -fsSL https://raw.githubusercontent.com/DeusData/codebase-memory-mcp/main/install.sh | bash
Then restart your agent and ask it to index the project.
Cost and limits
Free under the MIT licence. It needs no API key, hosted service or language runtime. Indexes are stored in ~/.cache/codebase-memory-mcp/.
Safety notes
The installer writes to your agents' config files and adds skills, instructions and hooks. Use --skip-config if you only want the binary. The project says processing is fully local, that it collects no telemetry and that it makes no background network requests. Set CBM_ALLOWED_ROOT to limit which paths can be indexed. Microsoft Defender has flagged release builds, and the maintainers call that a false positive. You can check downloads against the published SHA-256 checksums.
Pros
- Single native binary with no API key, runtime or hosted service
- Call-path tracing and git-diff impact mapping
- Index stays current through a file watcher
Cons
- Installer edits many agent config files and adds skills and hooks unless you pass --skip-config
- Token-saving figures come from the authors' own benchmarks
Similar MCP servers
All docs & code context MCP servers →Context7 🔌 MCP serverFreemium
Up-to-date, version-specific library documentation for your coding agent
MCP Python SDK 🔌 MCP serverOpen source
The official Python SDK for building Model Context Protocol servers and clients
Serena 🔌 MCP serverFree
Semantic code retrieval and editing toolkit for agents, powered by language servers
pg-aiguide 🔌 MCP serverOpen source
MCP server and skills giving coding agents versioned PostgreSQL and TimescaleDB expertise
MCP Memory Service 🔌 MCP serverOpen source
Self-hosted persistent memory for coding agents with semantic search and a knowledge graph
Grounded Docs MCP Server 🔌 MCP serverOpen source
Self-hosted, version-specific documentation index for coding agents, an open Context7 alternative