# Quick Start
> Build a graph, run the daemon, and register CGraph with a coding agent.
[Source](https://open.nxtsoft.io/docs/cgraph/quick-start)

This walks from a built checkout to an agent that can query your graph. If you
have not built the tools yet, start with [Installation](/docs/cgraph/installation).

## Build a graph

**extract**

```bash
build/default/src/cli/cgraph --root . --out cgraph-out
```

`--root` is the source tree to scan; `--out` is where the graph and its exports
are written.

```text
cgraph [--root PATH] [--out PATH]
```

| Flag | Meaning |
| --- | --- |
| `--root` | Source tree to scan (defaults to the current directory). |
| `--out` | Directory for the graph and exports. |

## Run the daemon

Keep the graph warm so queries don't re-scan the tree:

**serve**

```bash
build/default/src/daemon/graphd --root .
```

The daemon accepts `--idle-timeout SECONDS` and `--no-watch` if you want to bound
its lifetime or disable file watching.

## Register with a coding agent

Expose the graph over MCP. For Claude Code, point the MCP server at the built
binary:

**register**

```bash
claude mcp add cgraph -- "$PWD/build/default/src/mcp/cgraph-mcp"
```

Use the absolute path to `cgraph-mcp` unless the binary is on your `PATH`.

## What the agent can do

Once registered, the agent has eight tools over the graph:

- `graph_query`, `graph_explain`, `graph_impact`, `graph_path`, `graph_context`
- `graph_update`, `graph_status`, `graph_shutdown`

See [MCP Integration](/docs/cgraph/mcp) for what each tool does.
