Skip to content

Codebase Memory MCP

High-performance code intelligence MCP server. Indexes codebases into a persistent knowledge graph — average repo in milliseconds. 158 languages, sub-ms queries, 99% fewer…

Install

$npx -y codebase-memory-mcp
Claude Code
claude mcp add codebase-memory-mcp -- npx -y codebase-memory-mcp
Cursor / Claude Desktop (mcp.json)
{
  "mcpServers": {
    "codebase-memory-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "codebase-memory-mcp"
      ]
    }
  }
}

Install command taken from the project's README or registry entry. Always review code before running it.

codebase-memory-mcp: local MCP server for code search, lower token usage and visualization

Search your code, follow call graphs, and explore software architecture in your browser. codebase-memory-mcp is a local Model Context Protocol (MCP) server that gives Claude Code, Codex, and other coding agents a persistent code knowledge graph. It indexes functions, classes, imports, HTTP routes, and their relationships across 162 languages. Hybrid LSP adds semantic type resolution for Python, TypeScript, JavaScript, JSX/TSX, PHP, C#, Go, C, C++, Java, Kotlin, Rust, and Perl.

About 120× fewer tokens in the project's reported five-query comparison: ~3,400 vs ~412,000 with file-by-file exploration. Published backend benchmarks also report Linux kernel indexing in ~3 minutes (28M lines of code) and Cypher relationship queries under 1 ms on an Apple M3 Pro. Benchmark details.

CBM Lens Beta helps you understand unfamiliar code and stay in control as it grows. Use it to get up to speed in a new codebase, tackle rescue engineering on an inherited project, or make sense of 50,000 lines of AI-generated code from a single day. Its IDE-style source reader, local code chat, 3D architecture map, and Galaxy graph let you see how the code fits together and follow dependencies and call paths back to the source. Use that context to review changes, investigate fragile areas, and keep code quality high. Architecture decisions stay alongside the project's index.

The native C backend exposes 17 MCP tools and supports 45 automatic or conditional client integrations. Indexing and graph queries need no hosted service or API key.

CBM Lens Beta is new on main: it arrived with PR #2068 and is not part of the current v0.11.0 release, whose installer still ships the previous graph UI. To run the interface shown below now, build from source.

Quick start · Explore CBM Lens · Chat with your codebase locally · MCP tools · Build from source

Research: The preprint compares agents across 31 repositories, reporting 10× lower token use and 2.1× fewer tool calls, with answer-quality scores of 83% for CBM versus 92% for file-by-file exploration. These backend results are separate from the five-query comparison above and from CBM Lens.

Local processing: Source analysis and graph storage run on your machine. CBM Lens can optionally download a model for browser AI after you enable it; inference stays on the device. The installer writes agent configuration for the clients you select. See Security for release verification and SECURITY.md for reporting issues.

Architecture overview. Folders become nested platforms, files and symbols become selectable blocks, and arrows show indexed relationships. The recording zooms into the map of this repository, selects src/pipeline, opens the area, selects artifact.c and opens its source. Height can show source size; hotspot gravity reflects static fan-in. Still image.

Similar plugs

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

Java 面试 & 后端通用面试指南,覆盖计算机基础、数据库、分布式、高并发、系统设计与 AI 应用开发

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype…

A cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Grok Build & Hermes Agent. Only official website: ccswitch.io