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_repository | 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_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_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_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_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_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_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_architecture | 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_code | 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_status | 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_changes | 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_traces | 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 have clearly distinct purposes, but search_graph and search_code both perform search (symbol vs text) and query_graph vs trace_path both involve graph traversal, which could cause misselection. Descriptions help differentiate them, but a couple of pairs remain potentially confusing.
Tool names mostly follow a snake_case verb_noun pattern (get_architecture, index_repository, search_graph, delete_project). Minor deviations exist: index_status is ambiguous (verb vs noun) and manage_adr is vague, but overall the pattern is predictable.
17 tools is slightly above the ideal 3-15 range, but each tool has a specific role in codebase indexing, querying, and analysis. The count feels a bit heavy but not excessive given the domain breadth.
The surface covers core workflows: indexing, searching, querying, tracing, snippet retrieval, architecture overview, project management, and diff detection. Minor gaps exist, such as ingest_traces not implementing edge creation and no direct file listing tool, but most operations can be completed or worked around.