MCP Directory

How to add codebase-memory-mcp to Cursor

Code intelligence engine that indexes repos into a persistent knowledge graph for AI coding agents. Paste the config into ~/.cursor/mcp.json and restart Cursor.

Last updated June 14, 2026 · 16k · stdio · no auth

Cursor config for codebase-memory-mcp

curl -fsSL https://raw.githubusercontent.com/DeusData/codebase-memory-mcp/main/install.sh | bash
{
  "mcpServers": {
    "codebase-memory-mcp": {
      "command": "/path/to/codebase-memory-mcp",
      "args": []
    }
  }
}

Setup steps

  1. 1Open Cursor → Settings → MCP → Add new MCP server (or edit ~/.cursor/mcp.json directly).
  2. 2Paste the codebase-memory-mcp config below into the "mcpServers" object.
  3. 3Fill in placeholder secrets, then save.
  4. 4Cursor reloads MCP servers automatically — check Settings → MCP for a green status dot.
  5. 5Ask Cursor to use one of codebase-memory-mcp's tools to confirm it's connected.

Before you start

  • A supported platform: macOS (arm64/amd64), Linux (arm64/amd64), or Windows (amd64)
  • An MCP-compatible coding agent (e.g. Claude Code, Cursor, Windsurf, Codex CLI, Gemini CLI, Zed, etc.)
  • No runtime dependencies, Docker, or API keys required for the pre-built binary
  • To build from source: a C and C++ compiler (gcc/clang) plus zlib and git

What codebase-memory-mcp can do in Cursor

index_repository

Index a repository into the graph. Auto-sync keeps it fresh afterward.

list_projects

List all indexed projects with node/edge counts.

delete_project

Remove a project and all its graph data.

index_status

Check indexing status of a project.

search_graph

Structured search by label, name pattern, file pattern, and degree filters, with limit/offset pagination.

trace_path

BFS traversal showing who calls a function and what it calls (alias: trace_call_path), depth 1-5.

detect_changes

Map a git diff to affected symbols and blast radius with risk classification.

query_graph

Execute read-only Cypher-like graph queries (openCypher read subset).

Security

Reads your codebase and writes to your agent configuration files by design; all processing happens 100% locally and code never leaves your machine. Every release binary is statically linked with zero runtime dependencies, signed with Sigstore cosign, SLSA Level 3 provenance, SHA-256 checksummed, CodeQL-scanned, and scanned by 70+ antivirus engines via VirusTotal (zero detections required to publish). Verify provenance with `gh attestation verify <file> --repo DeusData/codebase-memory-mcp`.

codebase-memory-mcp + Cursor FAQ

Where is the Cursor config file?

Cursor reads MCP servers from ~/.cursor/mcp.json. Paste the codebase-memory-mcp config there under the "mcpServers" key and restart the client.

Is codebase-memory-mcp safe to use with Cursor?

Reads your codebase and writes to your agent configuration files by design; all processing happens 100% locally and code never leaves your machine. Every release binary is statically linked with zero runtime dependencies, signed with Sigstore cosign, SLSA Level 3 provenance, SHA-256 checksummed, CodeQL-scanned, and scanned by 70+ antivirus engines via VirusTotal (zero detections required to publish). Verify provenance with `gh attestation verify <file> --repo DeusData/codebase-memory-mcp`.

Does it require an API key or send my code anywhere?

No. It has zero API keys and runs 100% locally — all indexing and querying happens on your machine, and your code never leaves it. Bundled embeddings for semantic search are compiled into the binary, so no Ollama or external service is needed.

Does it include its own LLM?

No. It is a structural analysis backend that builds and queries the knowledge graph. It relies on your MCP client (the agent you're already talking to) to translate natural language into graph queries, avoiding extra API keys, cost, and configuration.

How many languages and tools does it support?

It parses 158 languages via vendored tree-sitter grammars and exposes 14 MCP tools. Eleven of those languages additionally get Hybrid LSP semantic type resolution for more accurate call-graph edges.

View repo Full codebase-memory-mcp page