Skip to content
MCP server

CGraph

Local MCP server serving a code graph: symbol search, callers, blast radius, impact

Runs locallyStatus and history
Install
Pricing
Open source
Platforms
CLI, self-hosted
Runs
Locally
Version
0.9.7
Listing updated
today

Similar MCP servers

About CGraph

CGraph is an open-source MCP server for developer tools. It runs locally on your machine and is started by your AI client.

CGraph precomputes the relationships inside a codebase so an agent can ask what calls a symbol or what breaks if it changes without reading dozens of files. A scan turns a source tree into a deterministic graph, with no LLM in extraction, and a resident daemon with file watching serves warm queries in about 10 ms. The README reports a 10,000-node graph building in about two seconds.

Extraction uses tree-sitter for many languages, with structured parsing for a few config formats, and community detection groups files into modules. Exports include JSON, interactive HTML, SVG, Obsidian markdown, Neo4j Cypher and Mermaid diagrams. It also reports retrieval benchmark results, with Recall@20 close to RepoMap and below Qwen3-Embedding-8B.

The engine is C++, and the MCP server runs over stdio from the npm package cgraph-mcp.

Install

Run in a terminal

claude mcp add cgraph -- npx -y cgraph-mcp

Add to claude_desktop_config.json

{
  "mcpServers": {
    "cgraph": {
      "command": "npx",
      "args": [
        "-y",
        "cgraph-mcp"
      ]
    }
  }
}
Install in CursorOpens Cursor, which asks you to confirm. Or add it by hand:

Add to ~/.cursor/mcp.json

{
  "mcpServers": {
    "cgraph": {
      "command": "npx",
      "args": [
        "-y",
        "cgraph-mcp"
      ]
    }
  }
}
Install in VS CodeOpens VS Code, which asks you to confirm. Or add it by hand:

Add to .vscode/mcp.json

{
  "servers": {
    "cgraph": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "cgraph-mcp"
      ]
    }
  }
}

Add to ~/.codeium/windsurf/mcp_config.json

{
  "mcpServers": {
    "cgraph": {
      "command": "npx",
      "args": [
        "-y",
        "cgraph-mcp"
      ]
    }
  }
}

Add to your client's MCP settings (most use this shape)

{
  "mcpServers": {
    "cgraph": {
      "command": "npx",
      "args": [
        "-y",
        "cgraph-mcp"
      ]
    }
  }
}

Using several servers? Build one config file with the MCP config generator.

Tools this server provides (1)

Taken from the project documentation; the running server may differ.

graph_impact
Returns every transitive dependent of a symbol.

What it does

Impact analysis
graph_impact lists every transitive dependent of a symbol.
Centrality-ranked search
Ranks search results by how load-bearing code is.
Token-budgeted bundles
Returns source bundles sized to a token budget.
Module clustering
Leiden and Louvain community detection groups code into modules.
Many export formats
Writes JSON, HTML, SVG, Obsidian, Cypher and Mermaid outputs.
Deterministic builds
The same input yields the same graph every time.

Good for

  • Find everything affected by changing a function
  • Let an agent navigate by graph instead of grep
  • Get an architecture overview of a large repository
  • Export a dependency diagram as Mermaid or SVG
  • Trace call flows from entry points

Pricing

Open source

Open source (licence badge in the repository); runs locally

CGraph FAQ

Does it use an LLM to build the graph?

No. The README says extraction is deterministic with no LLM involved.

How fast are queries?

About 10 ms warm from the daemon, according to the README.

What can it export?

JSON, HTML, SVG, Obsidian markdown, Cypher, Mermaid and design Markdown.

How is retrieval quality measured?

On Agent Retrieval Bench, with Recall@20 of 0.636 for version 0.9.1.

Is CGraph free?

Yes. CGraph is open source, so you can use and self-host it for free.

How do I add CGraph to Claude Code?

Run this command in your terminal: claude mcp add cgraph -- npx -y cgraph-mcp

What are the best alternatives to CGraph?

The closest alternatives to CGraph are REA, Context7, Chrome DevTools MCP, Codebase Memory and GitHub.

Where this comes from

  • Description: written from the project's README.
  • Install steps: from the official MCP Registry entry.

How AIPoweredBot checks servers