← Back to directory
C

Codebase Memory

Community
A codebase knowledge graph for AI coding agents.
Category
Dev Tools #227 of 438
Stars
★ 243 Very popular
Transport
stdio (local process)
Runtime
Prebuilt binary
Credentials
No credential needed
License
MIT
Last commit
Tools
15
52FMRS · D

This is an MIT community fork maintained by win4r, not an official DeusData server. It is suited to local codebase knowledge graphs and AI-assisted code exploration. Key considerations are building from source, writes to agent configuration files, and avoiding the update subcommand because it can overwrite the fork build.

Strongest · Documentation 13/20 Weakest · Reliability 8/20

Reliability
8/20
Security and permissions
12/20
Maintenance
10/20
Documentation
13/20
Setup experience
9/20
Why each score
Reliability 8/20
The static material describes a stdio server and lists npm/PyPI packages, but the fork README explicitly says it ships no prebuilt binaries while the manifest still identifies the upstream repository, upstream version, and package metadata. This creates reproducibility and release-identity inconsistencies. The README describes many tools and fixes, but provides no fork-specific CI, commit history, or key-path test evidence, so the happy path is only plausible and deductions apply for handshake, error-handling, and release-consistency evidence.
Security and permissions 12/20
The material indicates primarily local processing, no API keys, and disclosure that the server reads repositories, writes agent configuration, persists caches, and exposes project deletion. There is no evidence of credential theft, covert exfiltration, or default remote execution, so no red line is triggered. However, permissions and confirmation around automatic configuration, background watching, update downloads, deletion, and curl-piped installation are incomplete, and there is no auditable data-flow or fork-specific security-response evidence.
Maintenance 10/20
The repository is marked MIT and not archived, and the README claims integration of multiple upstream fixes; it also identifies an upstream security channel and update path, indicating some maintenance basis. However, the supplied material provides no fork release history, commit cadence, issue-response evidence, dependency-update evidence, or clear governance details. The manifest still describes the upstream project, so full marks are not justified.
Documentation 13/20
The README covers installation, building, platforms, configuration, tool categories, the data model, limitations, troubleshooting, and security claims, providing substantial operational guidance. Points are deducted because much of it is inherited upstream material and conflicts with the fork's no-prebuilt-release statement; tool counts are inconsistent (15 versus 14), manifest package data does not match the fork, and complete per-tool parameters, error behavior, and verifiable test evidence are missing.
Setup experience 9/20
The README provides source-build instructions, manual stdio configuration, and examples for several clients. However, the fork requires compiling 158 grammars locally, which is costly and requires a compiler and dependencies. The manifest suggests direct npm/PyPI execution while the README says there are no prebuilt binaries, making the installation path uncertain. Automatic installation also writes multiple agent configuration files, so setup is not especially predictable or low-friction.

Static review · not runListed 2026-08-14

Read the FMRS scoring method →

Fit and risk

What it can accessReads local filesConnects to a database

Best for

  • AI coding agents that need local code intelligence.
  • Teams requiring cross-file call resolution, architecture analysis, or incremental indexing.
  • Users who prefer a pure-C stdio server with local persistent storage.

Not for

  • Users requiring a built-in large language model or cloud-hosted code analysis.
  • Users unable to build from source or provide a C/C++ build environment.
  • Clients requiring SSE or streamable-http transport.

Required permissions

  • Read access to the repositories and Git changes being indexed.
  • Local write access for the SQLite graph database and configuration in the cache directory.
  • When installing or configuring supported agents, write access to agent configuration, instruction files, skills, and hooks.
  • Write access to Architecture Decision Records when managing ADRs.

Risks and side effects

  • The tool reads the codebase and may write to agent configuration files.
  • The fork has no prebuilt binaries; building compiles many vendored grammars.
  • Do not run the binary's update subcommand because it pulls the official upstream release and overwrites the integrated build.
  • Deleting a project or local cache removes the corresponding graph data, but not the source code.

Setup

Before you start

Runtime:Prebuilt binary

Other optional settings (5)
CBM_CACHE_DIR optional
CBM_DIAGNOSTICS optional
CBM_DOWNLOAD_URL optional
CBM_LOG_LEVEL optional
CBM_WORKERS optional

This fork ships no prebuilt binaries and must be built from source. Run git clone https://github.com/win4r/codebase-memory-mcp-pro.git, enter the directory, and execute ./scripts/build.sh. Copy build/c/codebase-memory-mcp to PATH, then configure Claude Code with claude mcp add codebase-memory -s user -- ~/.local/bin/codebase-memory-mcp. A stdio MCP configuration may also be used with command set to the binary's absolute path. The first build compiles 158 tree-sitter grammars and may take several minutes.

.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

Run /mcp in the client — codebase-memory-mcp should appear with its 15 tools; or index a repo and run a query_graph call that returns non-empty results.

Troubleshooting

  1. If the server does not appear in the MCP list, verify that command uses the binary's absolute path and restart the client.
  2. If index_repository fails, provide an absolute repo_path.
  3. If trace_path returns no results, use search_graph first to find the exact qualified name.
  4. If queries mix projects, specify the project parameter or run list_projects first.
  5. If the binary is not found, add its directory to PATH.
  6. If the build fails, check the C/C++ compiler, zlib, Git, and macOS libgit2 environment.

Things to try

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

  • Index this project, then list all indexed projects with node and edge counts.
  • Who calls ProcessOrder? Show the full inbound call chain.
  • Find dead code — functions with zero callers, excluding entry points.
  • Run the Cypher query MATCH (f:Function)-[:CALLS]->(g) WHERE f.name = 'main' RETURN g.name

Tools 15

index_repository writes
Indexes a repository into the knowledge graph and enables subsequent automatic 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
Searches graph nodes using label, name-pattern, file-pattern, and degree filters.
trace_path read-only
Uses BFS to find callers and callees of a function, with depth from 1 to 5.
detect_changes read-only
Maps Git changes to impacted symbols and provides risk classification and caller blast radius.
query_graph read-only
Executes read-only Cypher-like graph queries.
Show 7 more tools
get_graph_schema read-only
Returns node and edge counts, relationship patterns, and property definitions.
get_code_snippet read-only
Reads source code for a function by qualified name.
get_architecture read-only
Returns architecture information including languages, packages, routes, hotspots, boundaries, layers, clusters, and ADRs.
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 edges.
explore read-only
Returns a matched symbol's caller blast radius, nearby neighbors, and line-numbered source grouped by file in one call, with a query_graph/Cypher escape hatch.

Use cases

Build a knowledge graph of repository structure and call relationships.
Trace function calls, analyze change impact, and identify possible dead code.
Explore large codebases with Cypher-like queries, structural search, or code search.
Retrieve architecture overviews, source snippets, and cross-service HTTP relationships.

Supported clients

Claude Code
Codex
Gemini CLI
Zed
OpenCode
Antigravity
AiderPartial support
KiloCode
VS Code
OpenClaw
Kiro

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

Overview

Codebase Memory is a community fork of DeusData/codebase-memory-mcp maintained by win4r. Built in pure C, it creates a code knowledge graph for 158 languages and provides structural queries, call tracing, change-impact analysis, code search, and architecture analysis. The fork adds the incremental-reindex CALLS-edge fix, Cypher fixes, Swift graph improvements, and the explore tool.

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 3ff76d29a639 Data synced 2026-10-19 Read the FMRS scoring method