# DeusData/codebase-memory-mcp [Health: Active]

**Category:** 🧠 Knowledge & Memory  
**Repository:** https://github.com/DeusData/codebase-memory-mcp  
**GitHub Stars:** 47616  
**npm Downloads (last month):** 11488  
**Views:** 9  
**Installs:** 1  
**Upvotes:** 1  
**Directory Page:** https://allmcps.com/mcp/deusdata-codebase-memory-mcp

## Description
Code-intelligence engine that indexes a repo into a persistent knowledge graph — functions, classes, call chains, HTTP routes, cross-service links. 159 languages via tree-sitter + Hybrid LSP, sub-ms structural queries, 99% fewer tokens than grep. Single static binary, zero dependencies, 100% local. npx codebase-memory-mcp

## Tools
Capabilities this server exposes over MCP:

- **index_repository** — Index a repository. full/moderate add semantics; fast omits them; cross-repo-intelligence links services. Reports coverage gaps.
- **search_graph** — Find symbols via BM25 query, regex name/qn filters, or semantic_query. Rows keep qn/file/lines and in/out over CALLS/USAGE/CALL_REFERENCE/INHERITS/IMPLEMENTS.
- **query_graph** — Read-only Cypher for multi-hop, aggregation, complexity, or cross-service analysis. Default: 200 visible rows with exact/lower-bound totals and truncation; continue safely with next_cursor. graph=missed is a file tree of flagged coverage gaps; absence is not proof of completeness. Use get_graph_schema(diagnostics=full) for properties.
- **trace_path** — Trace callers/callees, data flow, or cross-service paths. Defaults exclude tests and resolver evidence. Rows keep qn/hop with explicit totals, relations, and continuations.
- **get_code_snippet** — Read a search_graph symbol. auto bounds source and outlines large containers; full restores up to 500 lines. Source/outline pages continue; coverage_note marks gaps.
- **get_file_outline** — Declaration outline of one exact repository-relative file: optional exact label filter, source order, exact total/offset/limit paging; file/folder/container nodes excluded.
- **get_graph_schema** — Get node-label and edge-type counts. diagnostics=full also lists queryable properties.
- **compare_graphs** — Compare two indexed snapshots: deterministic target-only additions and base-only removals of stable node/edge identities; each set capped by limit and a 512 KiB budget with exact totals and truncation reasons.
- **get_architecture** — Compact counts, languages, packages, entry points. Request structure, dependencies, routes, hotspots, boundaries, layers, clusters, cycles, or file_tree; path scopes a directory.
- **search_code** — Graph-ranked text search: compact symbols, full bounded source, or file paths.
- **list_projects** — List projects with stable paging. Identity is lean; stats adds graph sizes.
- **delete_project** — Delete a project from the index
- **index_status** — Project readiness, counts, root, and coverage gaps. diagnostics adds coverage rows; verbose adds Git paths. Best-effort only; verify cited paths with check_index_coverage.
- **check_index_coverage** — Best-effort exact-path/scope coverage and freshness, paged separately. full diagnostics adds raw detail. Clean is not proof of completeness.
- **detect_changes** — Map a Git diff to files and impact. Page with snapshot cursors.
- **manage_adr** — Outline an ADR by default; get reads it; update replaces it
- **ingest_traces** — Validate and count traces; graph edge creation is not implemented

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

```json
"mcpServers": {
  "codebase-memory-mcp": {
    "command": "npx",
    "args": ["-y","codebase-memory-mcp"]
  }
}
```

## Documentation

## What DeusData/codebase-memory-mcp does

DeusData/codebase-memory-mcp turns a repository into a persistent graph of code and surrounding technical artifacts. The graph can represent symbols, declarations, calls, inheritance, implementations, usage relationships, HTTP routes, and links across services. It also works with documentation, configuration, infrastructure files, architecture decisions, and other supported project formats.

The MCP surface is intended for code agents that need to locate an unfamiliar feature, inspect how components depend on one another, follow a call across service boundaries, or estimate the impact of a change. Results retain repository-relative paths, qualified names, source lines, relationship types, and coverage information where applicable.

## How it works

Indexing uses vendored tree-sitter grammars together with Hybrid LSP-based type resolution for supported languages. The resulting graph is stored locally and remains available between sessions. A repository can be indexed with different semantics: full and moderate modes include more relationship information, while fast mode omits some semantics. Cross-repository intelligence can link services when indexing multiple projects.

Graph-oriented tools return bounded, paged results. `query_graph` accepts read-only Cypher for multi-hop traversal, aggregation, complexity checks, and cross-service analysis. Continuation cursors allow an agent to retrieve additional pages. `trace_path` follows callers, callees, data flow, or cross-service paths, while `detect_changes` maps a Git diff to affected files and related graph impact.

Coverage is surfaced rather than assumed. Index status and coverage checks report gaps, freshness, and relevant paths, and the missed graph can expose files flagged during indexing. A clean result is not proof that every file or relationship was captured.

## Setup and configuration

The project can be launched with the package command:

```bash
npx codebase-memory-mcp
```

The native release is distributed as a static binary and is available for macOS, Linux, and Windows. The documented installer for macOS and Linux is:

```bash
curl -fsSL https://raw.githubusercontent.com/DeusData/codebase-memory-mcp/main/install.sh | bash
```

The native runtime does not require Docker or a language runtime. Indexing and graph queries do not require a hosted service or API key. The installer can configure supported agent clients, along with applicable guidance, skills, profiles, and hooks.

## Tools and capabilities

- `index_repository` creates or updates a repository graph and reports coverage gaps.
- `search_graph` supports BM25, regular-expression name or qualified-name filters, and semantic queries. Results include symbol identity, locations, and incoming or outgoing relationships.
- `query_graph` runs read-only Cypher with bounded, cursor-based output.
- `trace_path` follows code relationships and returns hop, relation, total, and continuation data.
- `get_code_snippet` retrieves bounded source or outlines for indexed symbols; `get_file_outline` lists declarations in source order.
- `get_graph_schema` reports node and edge counts, with optional diagnostic property details.
- `compare_graphs` compares indexed snapshots using stable node and edge identities.
- `get_architecture` summarizes languages, packages, entry points, dependencies, routes, layers, clusters, cycles, hotspots, boundaries, or file trees.
- `search_code` provides graph-ranked text search for symbols, bounded source, or paths.
- `list_projects`, `delete_project`, and `index_status` manage indexed projects and readiness information.
- `check_index_coverage` checks path or scope coverage and freshness; `detect_changes` analyzes Git changes.
- `manage_adr` outlines, reads, or replaces architecture decision records.
- `ingest_traces` validates and counts traces, but does not create graph edges from them.

## Limitations and notes

Several responses are deliberately bounded. Graph queries default to a visible row limit, and snapshot comparisons also enforce item and byte budgets; totals and truncation reasons accompany these results. Large source containers are returned as outlines unless a fuller bounded request is made.

Tracing excludes tests and resolver evidence by default. Coverage, status, and freshness checks are best-effort, so cited paths should be verified when completeness matters. The visual CBM Lens companion is a separate open-beta component; the MCP server is the core interface for agent access.

_Full upstream README: https://allmcps.com/mcp/deusdata-codebase-memory-mcp/readme_

