Skip to main content
MCP server CX Codex

Codebase Memory — Claude Code MCP server: code graph for agents

A local MCP server that maps your repo's code, docs and infrastructure into a graph. Gives the agent structural context without re-reading files.

Install into Claude Code · Platform CLI All methods and platforms ↓
claude mcp add codebase-memory-mcp -- npx -y codebase-memory-mcp
Open on GitHub

What Codebase Memory does

Codebase Memory indexes a repository and keeps the links between source, documentation, config and infrastructure in a persistent graph on your machine. Your agent talks to it over MCP and gets structural answers: which function calls which, what depends on a file, where a symbol lives. Queries run against the graph instead of re-reading the whole project, so fewer tokens go to file reads.

The backend is written in C, ships its own parsers and exposes 17 MCP tools; Hybrid LSP adds type resolution for some languages. The installer can write client configuration, skills, agent profiles and hooks. No hosted service or API key is involved — source analysis and graph storage stay local.

Alongside the server there is CBM Lens, a visual layer that renders the graph as maps, a hierarchy and a 3D view, opens sources and offers a local chat over the code. It is still in open beta, so treat it as an experiment rather than a daily driver. The MCP server itself is the main piece.

What it helps with

  • locate an unfamiliar function and its callers in a new repo
  • follow a call across service boundaries
  • trace a deployment back to its source
  • see which parts of a project a change touches
  • cut repeated file reads by the agent

Example prompts for the agent

  • Find where this function is called from and show the call path
  • Which files depend on arena.c?
  • Show the module structure and its dependencies

How to install Codebase Memory

Platform CLI

claude mcp add codebase-memory-mcp -- npx -y codebase-memory-mcp

Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more

Questions about Codebase Memory

How do I install Codebase Memory in Claude Code?

Run claude mcp add codebase-memory-mcp -- npx -y codebase-memory-mcp.

What does Codebase Memory do?

It builds a local graph of code, docs and infrastructure and serves it to your agent over MCP: symbol search, callers, dependencies, source snippets.

Does it need an API key or a hosted service?

No. Indexing and graph queries run on your machine.

Similar MCP servers

All MCP servers for Agent setup: memory, context, orchestration →

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor