codebase-memory-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| CBM_WORKERS | No | Override the parallel-indexing worker count. Range 1-256. | |
| CBM_CACHE_DIR | No | Override the database storage directory. All project indexes and config are stored here. | ~/.cache/codebase-memory-mcp |
| CBM_LOG_LEVEL | No | Set the minimum log level. Accepted values: debug, info, warn, error, none or 0-4. | info |
| CBM_DIAGNOSTICS | No | Set to '1' or 'true' to enable periodic diagnostics output to /tmp/cbm-diagnostics-<pid>.json. | false |
| CBM_DOWNLOAD_URL | No | Override the download URL for updates. Used for testing or self-hosted deployments. |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| prompts | {
"listChanged": false
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| index_repositoryA | Index a repository. full/moderate add semantics; fast omits them; cross-repo-intelligence links services. Reports coverage gaps. Waits for the whole index by default; a large repo can exceed a client's per-call deadline. async:true starts (or joins) the index in the daemon and returns at once; poll with status:true (same repo_path) until state is succeeded, failed or cancelled. async needs a daemon that outlives the call: an MCP session or |
| search_graphB | 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_graphA | 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_pathB | 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_snippetB | 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_outlineB | 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_schemaB | Get node-label and edge-type counts. diagnostics=full also lists queryable properties. |
| compare_graphsA | 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_architectureB | Bounded static architecture; poll pending jobs. include_behavior_evidence=true adds indexed call arguments, parameter declarations and return types; not full dataflow or runtime traces. |
| search_codeC | Graph-ranked text search: compact symbols, full bounded source, or file paths. |
| list_projectsA | List projects with stable paging. Identity is lean; stats adds graph sizes. |
| delete_projectB | Delete a project from the index |
| index_statusA | Project readiness, counts, root, watch state, coverage gaps, and doc_links (doc-comment references: MENTIONS edges, unresolved by reason). diagnostics adds coverage rows; verbose adds Git paths. Best-effort only; verify cited paths with check_index_coverage. |
| check_index_coverageA | Best-effort exact-path/scope coverage and freshness, paged separately. full diagnostics adds raw detail. Clean is not proof of completeness. |
| detect_changesC | Map a Git diff to files and impact. Page with snapshot cursors. |
| manage_adrB | Outline an ADR by default; get reads it; update replaces it |
| ingest_tracesA | Record observed runtime calls so the graph can distinguish observed from merely possible paths. Each trace is a call path (qualified names, adjacent = caller→callee) or a bare caller/callee pair. Stored per run label, keyed by qualified name (reindex-proof). Only pairs whose both endpoints are indexed symbols are stored; the response reports unresolved names (up to 10) so the producer can fix its naming. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
| explore_codebase | Explore a codebase with graph-first structural discovery. |
| review_change_impact | Review affected callers, tests, boundaries, and risks. |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 17 tools
Most tools target clearly distinct resources and actions, but search_graph vs search_code and query_graph vs trace_path have overlapping search/traversal semantics that descriptions only partly disambiguate. An agent could still misselect between graph-symbol search and text search, or between generic Cypher traversal and call-path tracing.
All 17 tools use snake_case and follow a mostly verb_noun pattern (search_graph, get_code_snippet, delete_project, check_index_coverage). A few are noun-heavy (index_status, index_repository), but the style is otherwise consistent and predictable.
17 tools is above the typical 3-15 sweet spot and feels heavy for one MCP server, even though the domain is broad. Each tool appears to have a distinct role, but the surface spans indexing, search, graph query, traces, ADR, architecture, and changes, making the set borderline crowded.
Core graph-based codebase lifecycle coverage is strong: indexing, status, coverage, search, snippet retrieval, graph query, tracing, architecture, and project deletion are all present. Minor gaps exist around updating indexed data, managing trace runs, or directly mutating graph content, but there are no obvious critical dead ends for typical analysis workflows.