Configuration
CGraph is configured mostly through flags (see the CLI Reference) and a small set of environment variables. This page collects the environment and the resolution rules that decide what runs against what.
Environment variables
| Variable | Used by | Meaning |
|---|---|---|
VCPKG_ROOT | build | Path to vcpkg for the CMake build. |
CLAUDE_PROJECT_DIR | cgraph-mcp | Project root when no --root is given (set by Claude Code). |
CGRAPH_DAEMON_PATH | cgraph-mcp | Explicit path to the graphd binary. |
Root resolution
When cgraph-mcp needs the project root, it resolves in priority order:
--root flag > CLAUDE_PROJECT_DIR > working directoryDaemon discovery
When cgraph-mcp needs the daemon, it resolves in priority order:
--daemon <path> > CGRAPH_DAEMON_PATH > graphd next to the binary > build-tree layoutThis layered resolution is why an agent usually needs no configuration: with the
binaries built side by side and CLAUDE_PROJECT_DIR set, the defaults resolve
correctly.
Output location
The graph and its exports are written to the directory given by --out
(conventionally cgraph-out/), which is also where the daemon re-persists
incremental state.
CGraph does not have a documented configuration file in the public README — behavior is driven by flags, the enrichment drop directory, and the environment variables above. If a config-file format exists in the source, it is intentionally not documented here until it can be verified. This section will be expanded from the real configuration surface, not invented.