Skip to main content
graph consumes any Model Context Protocol server. Each [mcp.<name>] entry in config becomes a set of <name>__* tools.
This page is graph as an MCP client. For the other direction — serving your plans to another agent — see graph as an MCP server.

Transports

stdio — graph spawns and manages the process:
Streamable HTTP — for hosted servers:
command and url are mutually exclusive; ${VAR} in env/headers values resolves from your environment at load time. If a variable is unset, the server refuses to connect — naming the variable — rather than starting with an empty secret; the rest of the config (and every other server) keeps working.
Auth is static headers/env — servers requiring an interactive OAuth flow aren’t supported directly. Many hosted servers (Linear included) accept API keys as bearer tokens.

Lifecycle

Servers connect lazily on first use and are cached for the process. stdio children are shut down cleanly on exit — and force-killed as a backstop on abnormal exits — so nothing lingers attached to your terminal. Server stderr is silenced.
The tool listing prints one section per server — a header with the tool count, then each tool’s name (with a [read-only] marker when the server annotates it) over its one-line description:
graph tools list renders the full catalog in the same format, one section per source.

Filtering and overrides

Result handling

Tool results prefer MCP structuredContent when the server provides it; otherwise text content that parses as JSON is used as-is; otherwise the text is wrapped as {"text": …}. Server-side errors (isError) come back as structured tool errors — visible in traces, recoverable by the agent, and replan fuel for plan_and_execute.