Overview
codebase-memory-mcp is a revolutionary, high-performance code intelligence server designed to supercharge AI coding agents. It transforms your entire codebase into a persistent, queryable knowledge graph with unparalleled speed. Imagine indexing an average repository in milliseconds or the entire Linux kernel in just minutes. This powerful tool enables sub-millisecond queries, drastically reducing token usage by up to 99% compared to traditional methods. Delivered as a single, zero-dependency static binary, it’s exceptionally easy to deploy and use across macOS, Linux, and Windows.
Key Features
- Blazing-Fast Indexing: Full-indexes vast codebases, like the Linux kernel (28M LOC, 75K files), in mere minutes. It achieves this through a RAM-first pipeline leveraging LZ4 compression, in-memory SQLite, and fused Aho-Corasick pattern matching, releasing memory post-indexing.
- Extensive Language Support: With 158 languages powered by vendored
tree-sittergrammars, it provides deep, high-quality parsing and an enhanced understanding via Hybrid LSP semantic type resolution for key languages. - Zero Dependencies, Single Binary: Deployable as a single static binary for macOS, Linux, and Windows, eliminating complex setup. Just download, run
install, and restart your agent. - Massively Reduced Token Usage: Transforms code exploration from token-heavy file-by-file searches into efficient graph queries, cutting token consumption by up to 99.2%.
- Seamless Agent Integration: Automatically detects and configures over 11 popular coding agents (e.g., Claude Code, Gemini CLI, VS Code), integrating MCP server entries, instruction files, and pre-tool hooks for immediate productivity.
- Powerful Graph Analysis & Querying: Offers advanced features like architecture overviews, ADR management, Louvain community detection, Git diff impact mapping, call graph tracing, dead code detection, and a flexible Cypher-like query interface.
- Semantic & Structural Search: Combines advanced semantic search with bundled embeddings and efficient BM25 full-text search via SQLite FTS5, alongside structural and graph-augmented grep capabilities.
- Cross-Service & Cross-Repo Intelligence: Enables sophisticated linking between HTTP routes, gRPC/GraphQL/tRPC services, and even across multiple indexed repositories, visualizing multi-repo architectures in a 3D UI.
- Optional Graph Visualization: A built-in 3D interactive UI (available in the
uivariant) allows for intuitive exploration of your codebase's knowledge graph atlocalhost:9749. - Team-Shared Graph Artifact: Commit a compressed knowledge graph snapshot (
.codebase-memory/graph.db.zst) to your repository for instant onboarding of teammates, skipping lengthy re-indexing.
Typical Use Cases
- Accelerated Code Navigation: Quickly understand complex codebases by tracing function calls, identifying dependencies, and pinpointing definitions across languages.
- AI Agent Enhancement: Provide AI coding assistants with deep, structured understanding of the entire codebase, enabling more accurate code generation, debugging, and refactoring.
- Architecture and Impact Analysis: Gain instant insights into system architecture, identify the impact of changes before committing, and detect potential dead code.
- Efficient Knowledge Discovery: Utilize powerful semantic and structural search capabilities to find specific code patterns, functions, or architectural components rapidly.
- Streamlined Team Collaboration: Enable new team members to grasp project structure and relationships instantly by leveraging the shared graph artifact.
- Infrastructure as Code Understanding: Index and query Dockerfiles, Kubernetes manifests, and Kustomize overlays as first-class graph entities.
