← Back to directory
C

Codebase Memory

Community
A persistent code knowledge graph for AI coding agents.
GitHub source repository ↗
★ 34.6k Stars Category · Dev Tools Very popular
63FMRS · C
Reliability
10/20
Security and permissions
11/20
Maintenance
14/20
Documentation
15/20
Setup experience
13/20

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.

Read the FMRS scoring method →

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.

Tools

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

Setup

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.

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

Fit and risk

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

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

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 CodeFull support
Codex CLIFull support
Gemini CLIFull support
ZedPartial support
OpenCodeFull support
CursorPartial support
WindsurfPartial support
AiderPartial support
KiloCodeFull support
VS CodeFull support
GitHub Copilot CLIFull support
OpenHandsPartial support
ClinePartial support
Qwen CodeFull support
Factory DroidFull support
GoosePartial support
Mistral VibeFull support
Qoder CLIFull support
Kimi Code CLIFull support
Rovo Dev CLIPartial support