graph mcp serve runs graph as an MCP server over stdio. Any MCP client can then call your plans as tools.
Add graph to a client
Point the client atgraph mcp serve, and pass --dir with the project that holds your .graph/ directory. Clients start servers in a directory of their own choosing, so without --dir graph may not find your plans.
What the client sees
- One tool per plan, named
plan_<identifier>and titled with the plan’sname. Its input schema is the plan’sinput_schema, and its description is the plan’sdescriptionwith theexemplarsadded. A plan whoserequires_serversaren’t configured isn’t offered. - What a plan tool returns: the plan’s result when it succeeds, or
{error, kind?, step?, cause?}when it fails. Seefinish. - Tools for writing and testing plans, listed in MCP server tools. When the client changes a plan with them, graph tells the client to reload its tool list, so a new plan can be called right away.
During a run
- Progress. When the client asks for progress, graph reports each step as it starts and the tokens spent so far.
- Cancellation. When the client cancels the call, graph stops the plan before its next step.
- Questions. An
askstep becomes an elicitation request, so the client’s user answers it. If the client doesn’t support elicitation, or nobody answers within 10 minutes, the step’swhenUnansweredsetting applies. - Long runs. A plan can take longer than a client’s default tool-call timeout. Raise the timeout in the client if long plans are cut off.