How to Set Up Codebase Memory MCP for Claude Desktop
2026-08-07 · by bixzell
How to Set Up Codebase Memory MCP for Claude Desktop
Codebase Memory MCP turns your codebase into a persistent knowledge graph your agent can query — symbol-level answers with sub-ms lookups, without dumping files into context. Here’s how to wire it into Claude Desktop.
37,718⭐ stars and a single static binary — claim to be zero-dependency.
Step 1 — One-line install
The project ships a single static binary (macOS, Linux, Windows) with zero dependencies. The recommended install is a one-liner:
macOS / Linux:
curl -fsSL https://raw.githubusercontent.com/DeusData/codebase-memory-mcp/main/install.sh | bash
Windows (PowerShell):
Invoke-WebRequest -Uri https://raw.githubusercontent.com/DeusData/codebase-memory-mcp/main/install.ps1 -OutFile install.ps1
Unblock-File .\install.ps1
.\install.ps1
The installer downloads the binary, sets it up, and configures detected agents. Add --ui for the optional 3D graph visualization (served at localhost:9749). If you’d rather install manually, download the archive for your platform from the releases page and run its install.sh / install.ps1.
Step 2 — Restart and index
- Fully quit and reopen Claude Desktop.
- In a new conversation, ask the server to index a repository: “Index /path/to/my/repo”.
- The first index of a large monorepo can take a while — it’s a one-time cost. Small repos are fast.
Step 3 — Query
Now you can ask things like:
- “Where is the retry logic defined?”
- “What calls this function?”
- “Summarize the data flow from the API layer to the DB.”
37,718⭐-scale precision, without pasting source files.
Troubleshooting
| Symptom | Fix |
|---|---|
| Binary won’t start | Check macOS Gatekeeper (xattr -d com.apple.quarantine ./codebase-memory) or download the correct architecture. |
| First index is slow | Narrow the working directory or filter by language; the graph persists so you pay the cost once. |
| No tools in Claude Desktop | Confirm the server shows as connected in Settings → Developer → MCP; restart Claude after editing config. |
| Wrong language coverage | Check the repo’s current tree-sitter grammar list — coverage varies by version. |
Next steps
- See the full client matrix (Cursor, VS Code, Codex, Windsurf) on the Codebase Memory compatibility page.
- Compare it against embedding-based alternatives on the Codebase Memory alternatives page.