Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/DeusData/codebase-memory-mcp/llms.txt

Use this file to discover all available pages before exploring further.

Codebase Memory MCP installs as a single static binary, auto-configures every coding agent it finds on your machine, and is ready to index your first project the moment you restart your agent. The entire flow — download, verify, install, configure — takes under two minutes on any platform.

Get Up and Running

1

Install Codebase Memory MCP

Run the one-line installer for your platform. The script downloads the binary, verifies its SHA-256 checksum, installs it to ~/.local/bin (macOS/Linux) or %LOCALAPPDATA%\Programs\codebase-memory-mcp (Windows), and automatically configures every coding agent it detects.
Standard install:
curl -fsSL https://raw.githubusercontent.com/DeusData/codebase-memory-mcp/main/install.sh | bash
With graph visualization UI (opens at http://localhost:9749):
curl -fsSL https://raw.githubusercontent.com/DeusData/codebase-memory-mcp/main/install.sh | bash -s -- --ui
The installer prints which agents it detected and configured. If ~/.local/bin is not in your PATH, it will tell you exactly which line to add to your shell config.
2

Restart your coding agent

The installer automatically writes MCP server entries, instruction files, and pre-tool hooks for every agent it detects — including Claude Code, Codex CLI, Gemini CLI, Zed, VS Code, OpenCode, Aider, KiloCode, Antigravity, OpenClaw, and Kiro.Restart your agent now so it picks up the new MCP configuration. In Claude Code you can verify the connection with /mcp — you should see codebase-memory-mcp listed with 14 tools.
3

Index your first project

Open your agent inside (or pointed at) a project directory and say:
“Index this project”
Your agent will translate that into the index_repository tool call:
{
  "tool": "index_repository",
  "arguments": {
    "repo_path": "/absolute/path/to/your/project"
  }
}
Indexing runs entirely in memory (LZ4-compressed, in-memory SQLite). An average repository completes in seconds. The Linux kernel — 28M lines of code across 75K files — indexes in 3 minutes. After the first index, a background watcher detects file changes and re-indexes automatically.
Always pass an absolute path to index_repository. If trace_path returns zero results, use search_graph first to find the exact symbol name in the graph.
4

Run your first query

Once indexed, ask questions about your codebase in plain English. Your agent maps natural language to MCP tool calls and returns structured answers.Trace who calls a function:
{
  "tool": "trace_path",
  "arguments": {
    "function_name": "ProcessOrder",
    "direction": "inbound",
    "depth": 3
  }
}
Search for all HTTP route handlers:
{
  "tool": "search_graph",
  "arguments": {
    "label": "Route",
    "name_pattern": ".*"
  }
}
Get a full architecture overview:
{
  "tool": "get_architecture",
  "arguments": {}
}

First Queries to Try

These four queries cover the most common code intelligence tasks and are a great way to immediately see the value of the knowledge graph.

”What calls ProcessOrder?”

“What calls ProcessOrder?”
{
  "tool": "trace_path",
  "arguments": {
    "function_name": "ProcessOrder",
    "direction": "inbound"
  }
}
Returns every function in the inbound call chain — across files, packages, and inheritance hierarchies — using BFS traversal. Set direction to "outbound" to see what ProcessOrder calls, or "both" for the full tree.

”Find all HTTP handlers”

“Find all HTTP handlers in the codebase”
{
  "tool": "search_graph",
  "arguments": {
    "label": "Route",
    "name_pattern": ".*"
  }
}
REST endpoints are first-class Route nodes in the graph. You can also filter by name_pattern (regex), file_pattern, minimum/maximum node degree, and paginate with limit/offset.

”Get architecture overview”

“Give me an architecture overview”
{
  "tool": "get_architecture",
  "arguments": {}
}
Returns languages, packages, entry points, HTTP routes, hotspots (highest-degree nodes), boundaries, layers, and community clusters in a single call — ideal as a first query on an unfamiliar codebase.

Cypher query

“Find all functions that are never called”
{
  "tool": "query_graph",
  "arguments": {
    "query": "MATCH (f:Function) WHERE NOT EXISTS { (f)<-[:CALLS]-() } RETURN f.name, f.file LIMIT 20"
  }
}
query_graph accepts an openCypher read subset. Full Cypher support includes MATCH, WHERE, WITH, RETURN, ORDER BY, LIMIT, variable-length paths ([*1..3]), and aggregates (count, collect, sum).
Orient yourself on any new project with two calls: list_projects (shows all indexed projects with node/edge counts) and get_graph_schema (shows node labels, relationship types, and property definitions). These two tools tell you exactly what is in the graph before you start querying.
Graph visualization UI — if you installed with --ui, start the server with codebase-memory-mcp --ui=true --port=9749 and open http://localhost:9749 in your browser. You will see a 3D interactive graph of your entire codebase. The UI runs as a background thread alongside the MCP server and is available whenever your agent is connected.

Build docs developers (and LLMs) love