Install the MCP server, mint a token (or use the Claude connector), then your agent writes Mermaid to a URL your team can open. Quickstart, tool reference, and REST.
Drop the snippet below into your Claude / Cursor / ChatGPT config.
02
MCP setup
DiagramZu exposes fourteen tools over HTTP transport — search, create, read, and update diagrams, browse folders, trace version history, build decks, leave comments, and analyze a diagram for issues. Install once, then your agent works them all directly.
One-click connect — Claude
In Claude, open Settings → Connectors → Add custom connector, paste https://mcp.diagramzu.ai/mcp, and authorize with your DiagramZu account. No API token to copy.
Using Cursor, ChatGPT, a script, or another MCP client? Use the API-token setup below — it works everywhere.
Install
Sign in and your token is filled into every snippet below.
Claude Code
Run this in your terminal. Replace dz_live_xxx with your API token.
Bash
claude mcp add --scope user --transport http diagramzu https://mcp.diagramzu.ai/mcp \
--header "Authorization: Bearer dz_live_xxx"
Claude Desktop
Edit your Claude config (macOS: ~/Library/Application Support/Claude/claude_desktop_config.json, Windows: %APPDATA%\Claude\claude_desktop_config.json) and restart the app.
When Call before create_diagram to avoid duplicating an existing named diagram — pass q to search title, description, or code. After creating, list again to land on the latest match.
Example
{
"q": "DB schema",
"sort": "relevance"
}
list_folders
List folders in the Space.
When Call when you might place a new diagram somewhere specific. If a folder named "Infra" or "Schema" exists, prefer it over the root.
Example
{}
get_diagram
Fetch one diagram by id, including the description.
When Read the description as the brief before deciding what to change.
Example
{
"id": "dgm_abc123"
}
list_versions
List a diagram's manual snapshots, newest first.
When Use before a risky overwrite to know what restore points exist.
Example
{
"diagramId": "dgm_abc123"
}
get_version
Fetch one historical version of a diagram.
When Read a past snapshot to understand how the diagram evolved or to recover content the live version no longer has.
Return a structural critique of a diagram — orphan nodes, high-degree hubs, cycles, disconnected components.
When Use before simplifying a complex diagram, or as a sanity check that your generated code produces a clean graph.
Example
{
"id": "dgm_abc123"
}
DECKS
list_decks
List presentation decks in the Space, newest-edited first.
When Call before create_deck to extend an existing deck instead of duplicating it.
Example
{}
get_deck
Fetch one deck by id, with its ordered slides.
When Read the slide order and titles before reordering or adding slides with update_deck.
Example
{
"id": "dck_abc123"
}
create_deck
Assemble existing diagrams into an ordered slideshow deck.
When Create the slide diagrams first, collect their ids, then pass them in slide order. The URL it returns opens the deck for space members only — to show it to anyone outside the Space, open the deck and create a public link from its Share button.
Example
{
"title": "System architecture walkthrough",
"description": "Read in order: context → data flow → deploy.",
"slides": ["dgm_context", "dgm_dataflow", "dgm_deploy"]
}
update_deck
Change a deck's title, description, or slide order.
When slides is declarative — send the complete desired list of diagram ids; any id you omit is removed, new ids are appended.
Post a comment on a diagram, optionally pinned to a node.
When Leave structured review findings a human will see on the diagram. Pin to a node with nodeId, or reply to a thread with parentId.
Example
{
"diagramId": "dgm_abc123",
"nodeId": "PaymentService",
"body": "This should call the retry queue, not the DB directly."
}
03
REST API
Every request authenticates with a Bearer token. The base URL is https://diagramzu.ai. Replace $SPACE_ID with your space's ID (visible in the URL when you're inside the app).
Endpoints
curl · list
# List diagrams in your Space
curl -H "Authorization: Bearer $DIAGRAMZU_TOKEN" \
https://diagramzu.ai/api/spaces/$SPACE_ID/diagrams
curl · create
# Create a new diagram
curl -X POST -H "Authorization: Bearer $DIAGRAMZU_TOKEN" \
-H "Content-Type: application/json" \
-d '{"title":"My diagram","code":"graph TD; A-->B"}' \
https://diagramzu.ai/api/spaces/$SPACE_ID/diagrams