See it as a diagram
Everything below, as a diagram you can edit. Describe yours and see it in seconds.
No account needed · Editable canvas, not a picture
The three fields that connect it
Add an MCP Client Tool node and attach it to an AI Agent node as a tool. Set the transport to HTTP Streamable rather than SSE: SSE is the legacy option, and the Datadef endpoint speaks streamable HTTP. Set the endpoint to https://datadef.io/mcp. For authentication, pick bearer and store a Datadef API key in the credential rather than typing it into the node, so it does not travel in an exported workflow.
The node fetches the tool list from the server, which works because listings on this endpoint are anonymous: initialize, ping and tools/list answer with no credentials, so the node can populate its tool selector even before the credential is right. Tool calls are the part that needs the key.
Then narrow the selection. An agent given all 36 tools in a workflow context will happily spend a run exploring canvas primitives. For an automation, expose the two or three tools the workflow actually needs and leave the rest off.
MCP Client Tool node Transport HTTP Streamable Endpoint https://datadef.io/mcp Authentication Bearer Credential Datadef API key (dd_live_...) Tools repo_status, repo_refresh, export_diagram
The timing problem, and the shape that solves it
Generation is not instant. create_diagram waits about 35 seconds and returns a finished diagram if it lands inside that window. When it does not, the call returns a diagram_id immediately with the diagram still being produced, and the correct next move is to wait roughly a minute and call get_diagram with that id, polling every 30 seconds. Calling create_diagram again instead produces a duplicate diagram and spends a second credit.
In n8n that maps onto a familiar shape: the create call, a Wait node, then a get call, with a loop back to the wait while the status is still running. Building it as one impatient node is what turns a working setup into an intermittent one, because fast generations succeed and slow ones look like failures.
Repository sync has its own limit. Refreshes share a bucket of ten per ten minutes per account, so a workflow that loops over many linked projects should pace itself rather than fan out. A refresh also regenerates the diagram from the repository, which replaces manual canvas edits, so it belongs in a workflow only for projects whose diagram is meant to be generated rather than hand-tuned.
Workflows that are worth building
A post-merge freshness check is the highest-value one. On a merge webhook, call repo_status for the linked project, and only if the last sync predates the merge, call repo_refresh. Datadef already syncs connected repositories daily on its own, so the workflow exists to close the gap between a merge and the next scheduled run, not to replace it.
A second good one is documentation delivery. export_diagram takes a viewport width from 600 to 4000 and a height from 400 to 4000, defaulting to 1600 by 1000, and returns three things: the rendered PNG or JPEG, a signed download link valid for 15 minutes that serves the file with an attachment header and needs no API key, and, when the project is shared publicly, a permanent image URL with a ready-made markdown line. The download link is what a workflow attaches to a message. The permanent URL is what it writes into a wiki page, because that one keeps matching the canvas instead of freezing on the day the workflow ran.
A third is intake. A form or an issue template describing a proposed system, passed to create_diagram, gives a reviewer a picture instead of a paragraph. Keep the scope at overview, since a dense diagram from a one-paragraph description is rarely what anyone wanted.
Every call is attributed
FAQ
Which n8n node calls an external MCP server?
Which transport should the node use for this server?
Why does the tool list load before the credential is valid?
How should a workflow handle a diagram that takes minutes to generate?
Is there a rate limit on repository refreshes?