Overview
CGraph is a native C++ graph analysis engine for source trees. It scans a project, extracts its structure into a deterministic graph, writes portable exports, and exposes the same graph through a local daemon, a thin client, and an MCP server — so coding agents navigate your code instead of grepping it.
Why it exists
A coding agent that reads code by grepping sees text, not the graph of files, symbols, and references that the text encodes. Every request re-derives that structure from scratch, imperfectly, and the answer is only as good as the search terms. There is no persistent, queryable model of the codebase for the agent to reason over.
What problem it solves
CGraph extracts the structure once and keeps it. Instead of "find every line
that mentions parseConfig", an agent asks "what calls parseConfig, and what
breaks if I change its signature" — and gets a precise answer from the graph
rather than a page of string matches.
How it works
Extraction, a warm daemon, and an MCP server form a pipeline.
Repository -> Parser -> Resolver -> Graph -> Querycgraph— a one-shot CLI that scans a source tree into a deterministic graph and writes portable exports.graphd— a daemon that keeps the graph warm and can watch the tree.cgraph-client— a thin client for talking to the daemon.cgraph-mcp— an MCP server that exposes the graph to coding agents.
What it does
When to use it
Reach for CGraph when an agent (or a developer) needs to reason about how a codebase fits together — call relationships, impact of a change, paths between symbols — rather than just find where a string appears. It complements, rather than replaces, full-text search.
Where to go next
Continue to Getting Started for the shortest path to a working graph, or Installation for the full build.