← Back to directory
C

Codebase Memory

Community
A persistent code knowledge graph for AI coding agents.
Category
Dev Tools #74 of 438
Stars
★ 46.9k Very popular
Transport
stdio (local process)
Runtime
Prebuilt binary · Node.js · Python
Credentials
No credential needed
License
MIT
Last commit
Tools
14
63FMRS · C

Based on the supplied repository description, server.json, and README: this is an MIT-licensed, local, stdio-based code-intelligence MCP server. Upstream product or protocol ownership is not evidenced by the supplied material, so official is false.

Strongest · Documentation 15/20 Weakest · Reliability 10/20

Reliability
10/20
Security and permissions
11/20
Maintenance
14/20
Documentation
15/20
Setup experience
13/20
Why each score
Reliability 10/20
The manifest declares stdio transport, and the README describes MCP tools, CLI behavior, persistence, and diagnostic paths; it also claims CI and extensive tests. However, only the manifest and README were supplied, not the source, workflows, or tests, so initialization, tool listing, validation, and failure handling cannot be verified. The README claims 15 tools, while the listed tables count to 14. Under the static rule, reliability is capped at 12; points are deducted for unverified execution evidence and inconsistent declarations.
Security and permissions 11/20
The README states that processing is local, telemetry is not collected, and no API key is required. It also describes CBM_ALLOWED_ROOT, cache isolation, checksums, signatures, SLSA provenance, and a security-reporting channel, supporting basic data-boundary and supply-chain controls. Points are deducted because the installer writes agent configuration, instructions, skills, and lifecycle hooks; startup update checks contact the network; arbitrary repository paths are allowed when CBM_ALLOWED_ROOT is unset; and project graph data can be deleted. Some operations are described as confirmed or scoped, but least-privilege behavior, the installer's complete effects, and deletion safeguards cannot be independently verified from the supplied material. No listed red-line risk is established.
Maintenance 14/20
The project is not archived and provides an MIT license, version 0.8.1, a GitHub release path, an update command, a security-reporting channel, and claimed CI, CodeQL, and release processes. This indicates identifiable ownership and an update path. Points are deducted because no commit history, release cadence, issue-response evidence, dependency-update record, or security-advisory history was supplied, so sustained maintenance cannot justify full marks.
Documentation 15/20
The README covers installation, manual configuration, platforms, tool categories, the graph model, environment variables, ignore rules, persistence, troubleshooting, performance, and security, with a mainstream client configuration example. Points are deducted for inconsistent claims about 158 versus 159 languages and 15 versus 14 tools, performance and test figures lacking independently reviewable source or benchmark evidence, and operational details about configuration writes, automatic updates, and the background daemon relying primarily on project assertions.
Setup experience 13/20
The material provides macOS, Linux, and Windows installation paths, prebuilt binaries, npm/PyPI options, an optional UI, manual MCP configuration, and broad multi-client auto-configuration. The mainstream setup path is clear. Points are deducted because installers modify agent configuration and hooks, remote curl/PowerShell scripts increase supply-chain and review burden, and the manifest's npx/uvx package paths are not execution-verified by the supplied files. Static review provides no source-level execution evidence, so the score does not approach full marks.

Static review · not runListed 2026-07-29

Read the FMRS scoring method →

Fit and risk

What it can accessReads local filesWrites / deletes local files

Best for

  • AI coding-agent users who need local code-structure analysis
  • Development teams seeking to reduce file-by-file search and context-token usage
  • Projects requiring cross-file, cross-package, or cross-repository relationship queries

Not for

  • Users who require a built-in LLM or natural-language-to-graph-query translation
  • Environments where the server must not read local source code
  • Scenarios that require only a remote cloud service instead of a local stdio process

Required permissions

  • Read access to local repositories and related configuration files being indexed
  • Write access to ~/.cache/codebase-memory-mcp/ for persistent indexes and logs
  • The installer may write agent configuration, instructions, skills, and lifecycle hooks
  • The optional UI may serve a local interface at localhost:9749

Risks and side effects

  • Indexing and searching process local source code, so its scope and cache location should be reviewed
  • The installer modifies agent configuration, skills, instructions, or hooks
  • Uninstall and project deletion can remove associated configuration or graph data; deletion requires confirmation
  • Although the source describes signatures, checksums, and antivirus scanning, users should still audit binaries before execution

Setup

Before you start

Runtime:Prebuilt binary · Node.js · Python

Other optional settings (8)
CBM_ALLOWED_ROOT optional Optional; confines index_repository to paths within this directory, useful for untrusted callers.
CBM_CACHE_DIR optional Optional; overrides the index database directory, default ~/.cache/codebase-memory-mcp.
CBM_DIAGNOSTICS optional Optional; set to 1/true to enable daemon snapshot. and trajectory.nd diagnostics logs.
CBM_DOWNLOAD_URL optional Optional; overrides the update download URL for testing or self-hosted deployments.
CBM_LOG_LEVEL optional Optional; minimum log level (debug/info/warn/error/none), default info.
CBM_WORKERS optional Optional; overrides parallel indexing worker count (1–256), useful in containers.
CBM_MEM_BUDGET_MB optional Optional; explicit in-memory graph budget cap in MiB, takes precedence over auto-detection.
CBM_DUMP_VERIFY_MIN_RATIO optional Optional; minimum persisted-vs-memory node ratio after indexing, default 0.5.

Use the macOS/Linux installer or Windows PowerShell installer, or download a platform-specific binary from GitHub Releases. Restart the coding agent and say “Index this project.” You may also add the provided stdio configuration manually to an MCP configuration file.

.mcp.json
{"mcpServers":{"codebase-memory-mcp":{"command":"/path/to/codebase-memory-mcp","args":[]}}}

Shown for Claude Code. Other clients may use a different file or key (VS Code uses "servers") — the configurator below converts it.

.vscode/mcp.json
{
  "servers": {
    "codebase-memory-mcp": {
      "command": "/path/to/codebase-memory-mcp",
      "args": []
    }
  }
}

Goes in your project's .vscode/mcp.json (VS Code uses a "servers" key).

Terminal
claude mcp add codebase-memory-mcp -- /path/to/codebase-memory-mcp

Run it in a terminal; replace any <…> placeholders with your own values first.

Check that it works

Restart your agent and run /mcp — you should see codebase-memory-mcp with its 15 tools; or say 'Index this project' and confirm list_projects shows the project with node/edge counts.

Troubleshooting

  1. Ensure the MCP command uses an absolute path
  2. Restart the coding agent after configuration changes and verify the server appears in its MCP view
  3. Use an absolute repo_path for index_repository and specify the correct project in queries
  4. If trace_path returns no results, first use search_graph to find the exact qualified name
  5. For the UI, confirm that the UI build is installed and open http://localhost:9749

Things to try

Once connected, you can ask your AI assistant things like:

  • Index this project
  • Trace who calls the ProcessOrder function with trace_path
  • Find dead code with query_graph, e.g. functions with no callers
  • Give me an architecture overview of this codebase

Tools 14

index_repository writes
Indexes a repository into the knowledge graph and enables ongoing synchronization.
list_projects read-only
Lists indexed projects with node and edge counts.
delete_project destructive
Removes a project and all of its graph data.
index_status read-only
Checks the indexing status of a project.
search_graph read-only
Performs structured searches using labels, name patterns, file patterns, and degree filters.
trace_path read-only
Uses BFS traversal to find callers and callees of a function.
detect_changes read-only
Maps Git changes to affected symbols and classifies blast radius and risk.
query_graph read-only
Executes read-only Cypher-like graph queries.
Show 6 more tools
get_graph_schema read-only
Returns node and edge counts, relationship patterns, and property definitions.
get_code_snippet read-only
Reads a function's source snippet by qualified name.
get_architecture read-only
Provides an overview of languages, packages, entry points, routes, hotspots, and clusters.
search_code read-only
Performs grep-like text search within indexed project files.
manage_adr writes
Creates, reads, updates, and deletes Architecture Decision Records.
ingest_traces writes
Ingests runtime traces to validate HTTP_CALLS relationships.

Use cases

Understanding architecture and module boundaries in large repositories
Tracing call paths and assessing change impact
Searching code, detecting dead code, and querying the graph
Analyzing cross-service HTTP, gRPC, GraphQL, and messaging relationships
Sharing or reusing graph knowledge across sessions and repositories

Supported clients

Claude Code
Codex
Gemini CLI
ZedPartial support
OpenCode
CursorPartial support
WindsurfPartial support
AiderPartial support
KiloCode
VS Code
GitHub Copilot CLI
OpenHandsPartial support
ClinePartial support
Qwen Code
Factory Droid
GoosePartial support
Mistral Vibe
Qoder CLI
Kimi Code CLI
Rovo Dev CLIPartial support

Listed from the project's documentation, not tested by this site.

Overview

Codebase Memory is a high-performance code-intelligence MCP server that indexes repositories into a persistent knowledge graph. It supports 158 languages, sub-millisecond structural queries, and 15 MCP tools. It uses tree-sitter AST analysis with Hybrid LSP type resolution for selected languages; processing is local and the server does not include an LLM.

Similar servers

Context7 80 · B

Upstash's official server providing up-to-date third-party library docs for AI coding assistants

★ 63.3k · Tools 2 Compare with this →

Source revision 658639ec569c Data synced 2026-10-19 Read the FMRS scoring method