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. |
| 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_pathA | 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_outlineC | 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_architectureA | Compact counts, languages, packages, entry points. Request structure, dependencies, routes, hotspots, boundaries, layers, clusters, cycles, or file_tree; path scopes a directory. |
| 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, and coverage gaps. 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_tracesC | Validate and count traces; graph edge creation is not implemented |
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.