Codebase Memory
Codebase Memory is a local, open-source MCP server that connects code, documentation, and infrastructure in a persistent graph for AI coding agents, with 17 MCP tools, CLI access, Lens visualization, and change-aware test selection.
Visit DeusData/codebase-memory-mcpOverview
Codebase Memory (CBM) is an open-source Model Context Protocol server that gives AI coding agents a persistent local knowledge graph of source code, documentation, and infrastructure. It supports structural, full-text, and local semantic search, relationship tracing, source evidence retrieval, index coverage checks, and optional visual exploration through CBM Lens.
Key Features
- Provides 17 MCP tools for indexing repositories, searching symbols and text, querying graphs, tracing paths, retrieving code snippets, comparing graphs, and checking index coverage.
- Builds a connected graph across code, documentation, and infrastructure, including call relationships, documentation references, architecture decisions, container and deployment configuration, and supported CI steps.
- Uses tree-sitter parsing and Hybrid LSP type resolution for supported languages, with language and framework coverage varying by the support matrix.
- Includes native CLI access, persistent indexes, and optional CBM Lens open beta for source navigation, architecture maps, and graph exploration.
- Adds experimental Smart CI test selection that uses change impact, changed tests, and admitted coverage to explain which tests a change reaches.
- Runs source analysis and graph storage locally, with native releases requiring no Docker or language runtime and indexing and graph queries requiring no API key.
Use Cases
- Give AI coding agents persistent repository context so they can find relevant symbols and source snippets without repeatedly reading whole files.
- Trace call paths, dependencies, routes, documentation references, and deployment paths across files, services, and indexed repositories.
- Review changes by mapping diffs to affected symbols, comparing graph snapshots, inspecting related tests, and focusing CI runs with Smart CI.
- Explore architecture and source evidence visually in CBM Lens while checking index coverage and architecture decisions.
Getting Started
- Install the native release and agent integrations on macOS or Linux with the provided install script, restart your coding agent, then ask it to index the project.
- On Windows, use the PowerShell installation path or another documented installation method.
- Optionally start CBM Lens with codebase-memory-mcp daemon start --open.
Deployment & Requirements
- Native releases run on macOS, Linux, and Windows without Docker or a language runtime for the native runtime.
- Indexing and graph queries require no API key.
- Native packages or npm, PyPI, and Go wrappers are available; package wrappers use their respective runtimes.
- Source analysis and graph storage run locally, and CBM Lens is served on loopback.
- Lens browser AI may download an optional model after it is enabled.
Before You Adopt
- License: MIT. Review its terms before using, modifying, or distributing the project.
- Smart CI is experimental and should be validated in shadow mode before gating.
- Relationships depend on supported source forms, dynamic values and unresolved references can leave gaps, and PDF extraction requires a text layer without OCR.
- Language and framework coverage varies, so extraction depth and relationship support depend on the language support matrix.
- Source analysis and graph storage are local, but coding agents have their own data settings, Lens can download an optional browser model after being enabled, and installers and update checks use the network.