Codebase Memory MCP is a high-performance MCP server that builds a persistent knowledge graph of your codebase — functions, classes, call chains, HTTP routes, and cross-service links — and exposes 14 tools to your AI coding agent. Index the Linux kernel (28M LOC, 75K files) in 3 minutes. Answer structural queries in under 1ms. Reduce token usage by 99% compared to file-by-file grep exploration.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/DeusData/codebase-memory-mcp/llms.txt
Use this file to discover all available pages before exploring further.
Quickstart
Get from zero to indexed in under 2 minutes with a single install command.
Installation
All install methods: one-line script, package managers, manual binary, and build from source.
MCP Tools Reference
All 14 tools — index, search, trace, Cypher queries, architecture, ADRs, and more.
Agent Setup
Auto-configure Claude Code, Codex, Gemini CLI, Zed, Aider, KiloCode, and 5 more agents.
What it does
Codebase Memory MCP parses your source with 158 vendored tree-sitter grammars and an optional Hybrid LSP layer that resolves types across imports, generics, and inheritance — producing a SQLite knowledge graph that lives at~/.cache/codebase-memory-mcp/. Your AI agent queries the graph instead of reading files one-by-one.
158 Languages
All grammars compiled into the binary. Nothing to install, nothing that breaks.
Hybrid LSP
Semantic type resolution for Python, TypeScript, Go, Rust, Java, Kotlin, C/C++, PHP, and C#.
14 MCP Tools
Search, trace call paths, Cypher queries, dead code detection, architecture overview, and ADRs.
Zero Dependencies
Single static binary for macOS, Linux, and Windows. No Docker, no runtime, no API keys.
99% Fewer Tokens
5 structural queries: ~3,400 tokens vs ~412,000 via file-by-file search.
11 Agents
One
install command auto-detects and configures every major AI coding agent.Get started in 3 steps
Install the binary
Restart your coding agent
The installer auto-detects and configures Claude Code, Codex CLI, Gemini CLI, Zed, and more. Just restart your agent — no manual config needed.
Knowledge Graph Concepts
Understand nodes, edges, and how the graph represents your codebase.
Cypher Queries
Write graph queries to explore call chains, find dead code, and trace dependencies.
Graph Visualization
Explore your knowledge graph in a 3D interactive UI at localhost:9749.
Performance Benchmarks
Indexing times, query latencies, and token efficiency benchmarks.