# Codebase Memory

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.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed · ★ 47392
- Author: DeusData
- License: MIT · policy=link-only · description only; the file stays with the author
- Source: https://github.com/DeusData/codebase-memory-mcp
- Updated: 2026-10-24
- HTML: https://affpapa.org/en/nevibecode/mcp/codebase-memory

## What it 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.

## Requirements
- Needs: Node.js (commands run via npx)

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add codebase-memory-mcp -- npx -y codebase-memory-mcp
```

### Codex

**Platform CLI**
```bash
codex mcp add codebase-memory -- npx -y codebase-memory-mcp
```

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "codebase-memory": {
            "command": "npx",
            "args": [
                "-y",
                "codebase-memory-mcp"
            ]
        }
    }
}
```

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "codebase-memory": {
            "type": "stdio",
            "command": "npx",
            "args": [
                "-y",
                "codebase-memory-mcp"
            ]
        }
    }
}
```

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add codebase-memory npx -y codebase-memory-mcp
```

## When to use it
- 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
- 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

## Similar
- [GitHub](https://affpapa.org/en/nevibecode/mcp/github.md) — MCP server · ★ 33918
- [Netdata](https://affpapa.org/en/nevibecode/mcp/netdata.md) — MCP server · ★ 81115
- [browser-use](https://affpapa.org/en/nevibecode/mcp/browser-use.md) — MCP server · ★ 119160
- [AIHawk](https://affpapa.org/en/nevibecode/mcp/aihawk.md) — MCP server · ★ 32221
- [dbx](https://affpapa.org/en/nevibecode/mcp/dbx.md) — MCP server · ★ 27669
- [Next AI Draw.io](https://affpapa.org/en/nevibecode/mcp/next-ai-drawio.md) — MCP server · ★ 36398

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
