Quick Verdict
Codebase Memory MCP is for developers and teams who use Claude Code or Cursor heavily on medium-to-large codebases and care about token costs. It is a high-performance code intelligence MCP server (32,700+ GitHub stars, MIT) that indexes an entire codebase into a persistent knowledge graph — functions, classes, call chains, cross-service links — so the agent answers “who calls this” and “what does changing this affect” by querying the graph instead of burning tokens reading files. The project’s numbers: five structural queries cost ~3,400 tokens versus ~412,000 via file-by-file search — roughly 120x less.
Engineering quality is the selling point: the Linux kernel (28M LOC) fully indexes in about 3 minutes with sub-millisecond graph queries; the semantic-search embedding model is compiled into the binary — no API key, no Ollama, no Docker; and the installer auto-configures 43 client surfaces. Everything runs 100% locally, so private repos are safe. Small projects gain little — reading a small repo directly is already cheap.
Best For
- Heavy AI-coding users: agents working in large repos daily
- Token-cost-sensitive teams: structural queries hit the graph, bills drop
- Microservice maintainers: cross-service call chains and blast-radius analysis
- Private-code teams: compliance scenarios where code cannot leave the network
- Not ideal for: small-project developers (limited gain) or people not using coding agents
Key Features
- Persistent knowledge graph: functions/classes/call chains/cross-service links
- 15 MCP tools: indexing, search, graph queries, call tracing, change detection, architecture analysis, ADR management, and more
- 158 languages via vendored Tree-Sitter grammars
- Hybrid LSP resolution: language-server-grade typing for Python/TS/JS/PHP/C#/Go/C/C++/Java/Kotlin/Rust/Perl
- Built-in semantic search: nomic-embed-code (768d int8) compiled into the binary, zero external deps
- Performance: Linux kernel indexed in ~3 minutes, Cypher queries <1ms
- Dead-code detection and cross-service linking
- 43 client surfaces auto-configured: Claude Code, Cursor, VS Code, etc.
Use Cases
- Structural Q&A on large repos: callers, dependencies, impact analysis
- Refactoring assessment: call-graph tracing plus change detection
- Dead-code cleanup across the repository
- Microservice architecture mapping
- Onboarding: agents explaining architecture from the graph
Pricing
| Edition | Price | Notes |
|---|---|---|
| One-line script | Free | curl install on macOS/Linux, install.ps1 on Windows |
| Package managers | Free | npm / PyPI / Homebrew / Scoop / AUR |
MIT, fully free, no paywall; binaries are signed and scanned by 70+ antivirus engines. The indirect payoff is an order-of-magnitude drop in agent token spend.
Pros
- Order-of-magnitude token savings directly cut agent costs
- Excellent indexing and query performance, usable at 28M-LOC scale
- Zero-config semantic search, no external model service
- 158-language coverage plus LSP-grade resolution for 12 languages
- 43 auto-configured clients, low integration cost
- MIT-licensed, fully local, private-code friendly
Cons
- Initial full index of huge repos takes time and disk
- LSP-grade precision covers only 12 mainstream languages
- Graph freshness needs attention under heavy churn
- Limited benefit on small projects
- Documentation is English-first
Alternatives
| Tool | Better for | Strengths | Weaknesses |
|---|---|---|---|
| Context7 | Looking up third-party library docs | Instant library documentation | Doesn’t index your own codebase |
| claude-mem | Cross-session memory | Persistent conversation memory | No code-structure graph |
| Claude Code built-in retrieval | Developers who want a terminal agent that reads, edits, runs commands, and follows repository instructions directly | No separate index service and a complete repo workflow | Not a persistent code graph; structural questions on large repos may read more files and tokens |
FAQ
Is it free?
Fully free and open source (MIT); the embedding model is bundled, so no extra API key or model service.
Does my code get uploaded?
No. Indexing, graph, and semantic search all run locally — “your code never leaves your machine.”
Is my language supported?
Tree-Sitter parsing covers 158 languages; LSP-grade type inference covers 12 mainstream ones.
How long does indexing take?
Reference: the Linux kernel (28M LOC, 75K files) in ~3 minutes; typical business repos in well under a minute.
Does it require an external embedding service?
No. The semantic-search embedding model is compiled into the binary, so it needs no API key, Ollama, or Docker.
Bottom Line
If your coding agent spends its days reading files to trace call chains in a big repo, Codebase Memory MCP is likely one of the highest-ROI MCP installs of the year: one command, and both your token bill and response latency improve immediately. Index your largest repo, ask three structural questions, and compare token usage — the numbers will make the case. Skip it for small projects.