About this project
codebase-memory-mcp is a code intelligence engine designed to serve AI coding agents through the Model Context Protocol (MCP). It parses a codebase into a persistent knowledge graph of functions, classes, call chains, HTTP routes, and cross-service links, then answers structural queries against that graph.
Key characteristics evidenced in the README:
- Indexing: tree-sitter AST analysis across 162 vendored grammars compiled into the binary. A RAM-first pipeline uses LZ4 compression, in-memory SQLite, and Aho-Corasick pattern matching. The README reports indexing the Linux kernel (28M LOC, 75K files) in about 3 minutes.
- Hybrid LSP: a lightweight C implementation of type-resolution algorithms for Python, TypeScript/JavaScript/JSX/TSX, PHP, C#, Go, C, C++, Java, Kotlin, Rust, and Perl, covering parameter binding, return-type inference, generic substitution, and language-specific resolution patterns.
- Query surface: 15 MCP tools including architecture overview, call-graph tracing, impact analysis, dead-code detection, Cypher-like graph queries, semantic search, BM25 full-text search, and code search. The README reports sub-millisecond structural queries and a token reduction versus file-by-file exploration.
- Graph model: edge types such as CALLS, IMPORTS, DEFINES, IMPLEMENTS, INHERITS, HTTP_CALLS, EMITS, LISTENS_ON, DATA_FLOWS, SIMILAR_TO, and SEMANTICALLY_RELATED. Cross-repo CROSS_* edges link nodes across repositories in the same store.
- Infrastructure-as-code: Dockerfiles, Kubernetes manifests, and Kustomize overlays are indexed as graph nodes with cross-references.
- Distribution: a single native executable for macOS, Linux, and Windows, with no language runtime, hosted service, or API key required. Also available via npm, PyPI, Homebrew, Scoop, Winget, Chocolatey, AUR, and go install. All processing is local.
- Operation: an install command auto-detects and configures supported coding agents. A shared coordination daemon manages background watchers, indexing jobs, and the optional UI. Auto-index and auto-watch are configurable. A built-in 3D graph visualization UI is served at localhost:9749.
- Team sharing: an optional zstd-compressed SQLite snapshot (.codebase-memory/graph.db.zst) can be committed so teammates bootstrap from the artifact and run incremental indexing instead of a full reindex.
The project does not embed an LLM; the MCP client acts as the intelligence layer that translates natural-language questions into graph queries. The README references a preprint (arXiv:2603.27277) describing the design and benchmarks, and documents security practices including local-only processing and release artifact verification.
Comments
0 Rating appears after 10 ratings
Sign in to join the discussion.