Codebase Memory
High-performance code intelligence MCP server. Indexes codebases into a persistent knowledge graph — average repo in milliseconds. 155 languages, sub-ms queries, 99% fewer tokens. Single static binary, zero dependencies.
What is Codebase Memory?
Codebase Memory is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to high-performance code intelligence mcp server. indexes codebases into a persistent knowledge graph — average repo in milliseconds. 155 languages, sub-ms queries, 99% fewer tokens. single static binary...
High-performance code intelligence MCP server. Indexes codebases into a persistent knowledge graph — average repo in milliseconds. 155 languages, sub-ms queries, 99% fewer tokens. Single static binary, zero dependencies.
This server falls under the Developer Tools category on MCPgee, the world's largest MCP server directory with 33,000+ servers.
Features
- High-performance code intelligence MCP server. Indexes codeb
Use Cases
Maintainer
Works with
Installation
Manual Installation
npx codebase-memoryConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
How to Set Up and Use Codebase Memory
Codebase Memory MCP is a high-performance code intelligence server that indexes an entire repository into a persistent knowledge graph in milliseconds and then answers structural queries in under one millisecond, reducing token usage by roughly 99% compared to sending raw files to an LLM. It supports 158 programming languages via tree-sitter, exposes 14 MCP tools for searching symbols, tracing call paths, running Cypher-like graph queries, detecting changes, and managing architecture decision records, and integrates automatically with 11 coding agents including Claude Code, Cursor, and Gemini CLI. Teams use it to give AI assistants deep, accurate context about large codebases without blowing token budgets.
Prerequisites
- macOS, Linux, or Windows (the installer downloads a pre-built static binary — no runtime required)
- curl and bash (macOS/Linux) or PowerShell (Windows) for the one-line installer
- At least one supported MCP client: Claude Code, Cursor, Zed, Aider, Gemini CLI, or VS Code with MCP extension
- Git installed if you want change detection via git diff integration
Install codebase-memory-mcp
Run the one-line installer. It downloads the correct binary for your platform, auto-detects installed coding agents, and configures MCP entries for each.
curl -fsSL https://raw.githubusercontent.com/DeusData/codebase-memory-mcp/main/install.sh | bashVerify the installation
Confirm the binary is on your PATH and check the current configuration.
codebase-memory-mcp --version
codebase-memory-mcp config listEnable automatic indexing on session start
Turn on auto-indexing so the knowledge graph is always up to date when an agent session begins.
codebase-memory-mcp config set auto_index true
codebase-memory-mcp config set auto_index_limit 50000Index your first repository
Index a codebase manually. The server stores the graph in the cache directory and keeps it in sync on subsequent runs.
codebase-memory-mcp cli index_repository '{"repo_path": "/path/to/your/repo"}'Add to Claude Desktop configuration
If the auto-installer did not configure Claude Desktop, add the server entry manually.
{
"mcpServers": {
"codebase-memory": {
"command": "codebase-memory-mcp",
"args": [],
"env": {
"CBM_CACHE_DIR": "~/.cache/codebase-memory-mcp",
"CBM_LOG_LEVEL": "info"
}
}
}
}Launch the optional graph UI
Start the 3D interactive graph browser to visually explore the code knowledge graph.
codebase-memory-mcp --ui=true --port=9749
# Then open: http://localhost:9749Codebase Memory Examples
Client configuration
Claude Desktop configuration to run codebase-memory-mcp as an MCP server subprocess.
{
"mcpServers": {
"codebase-memory": {
"command": "codebase-memory-mcp",
"args": [],
"env": {
"CBM_CACHE_DIR": "/Users/you/.cache/codebase-memory-mcp",
"CBM_LOG_LEVEL": "info",
"CBM_WORKERS": "4"
}
}
}
}Prompts to try
Example prompts to use with Claude once codebase-memory is connected and a repository is indexed.
- "Index the repository at /Users/me/projects/myapp and give me an architectural overview."
- "Search for all functions whose names contain 'Handler' and show me where they are defined."
- "Trace the call path from the 'processPayment' function — what does it call and what calls it?"
- "Run a Cypher query to find all Functions that CALL more than 10 other Functions."
- "Which files changed in the last git diff and which symbols are at risk of being broken?"Troubleshooting Codebase Memory
Indexing completes but queries return no results
Confirm the repo_path passed to index_repository is the absolute path to the repository root (not a subdirectory). Run 'codebase-memory-mcp cli list_projects' to verify the project appears in the index.
Auto-indexing is skipped because the codebase exceeds the limit
Increase the threshold: 'codebase-memory-mcp config set auto_index_limit 200000'. For very large monorepos, index specific subdirectories instead of the full root.
The binary is not found after installation
The installer places the binary in ~/.local/bin (Linux) or /usr/local/bin (macOS). Ensure that directory is on your PATH: 'export PATH="$HOME/.local/bin:$PATH"' and add it to your shell profile.
Frequently Asked Questions about Codebase Memory
What is Codebase Memory?
Codebase Memory is a Model Context Protocol (MCP) server that high-performance code intelligence mcp server. indexes codebases into a persistent knowledge graph — average repo in milliseconds. 155 languages, sub-ms queries, 99% fewer tokens. single static binary, zero dependencies. It connects AI assistants to external tools and data sources through a standardized interface.
How do I install Codebase Memory?
Follow the installation instructions on the Codebase Memory GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.
Which AI clients work with Codebase Memory?
Codebase Memory works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.
Is Codebase Memory free to use?
Yes, Codebase Memory is open source and available under the MIT license. You can use it freely in both personal and commercial projects.
Codebase Memory Alternatives — Similar Developer Tools Servers
Looking for alternatives to Codebase Memory? Here are other popular developer tools servers you can use with Claude, Cursor, and VS Code.
Ecc
★ 188.2kThe agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.
Javaguide
★ 155.8kJava 面试 & 后端通用面试指南,覆盖计算机基础、数据库、分布式、高并发、系统设计与 AI 应用开发
Gemini CLI
★ 104.5kA secure MCP server that wraps the Google Gemini CLI, allowing clients to query Gemini models using local OAuth sessions without requiring an API key. It provides tools for model interaction and diagnostics with built-in protection against command in
Awesome MCP Servers
★ 87.3k⭐ Curated list of Model Context Protocol (MCP) servers - tools that extend Claude Desktop, Cursor, Windsurf, and other MCP clients with custom capabilities.
MCP Servers
★ 86.0kModel Context Protocol Servers
CC Switch
★ 77.5kA cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Gemini CLI & Hermes Agent. Only official website: ccswitch.io
Browse More Developer Tools MCP Servers
Explore all developer tools servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.
Set Up Codebase Memory in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
Ready to use Codebase Memory?
Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.