diagramzu

Documentation

Wire itinto your AI

Three sections. A minute or two of reading. You'll have Claude, ChatGPT, or Cursor reading and writing diagrams in your space.

01

Quickstart

  1. 1

    Sign up

    Create your space and invite teammates.

    Create account →
  2. 2

    Create an API token

    Open /app/settings/tokens and generate one. Copy it immediately — you won't see it again.

  3. 3

    Add to your AI tool

    Drop the snippet below into your Claude / Cursor / ChatGPT config.

02

MCP setup

diagramzu speaks the Model Context Protocol. Any MCP client — Claude Code, Cursor, custom GPTs — can read and write your diagrams.

Find your Space ID — Open the API tokens page once you've signed in — your active space's ID appears next to the heading, ready to copy.

Claude Code

Run this in your terminal. Replace the dz_live_ and org_ values.

Bash
claude mcp add diagramzu \
  --env DIAGRAMZU_BASE_URL=https://diagramzu.ai \
  --env DIAGRAMZU_API_TOKEN=dz_live_xxx \
  --env DIAGRAMZU_SPACE_ID=org_xxx \
  -- node /absolute/path/to/packages/mcp-diagramzu/dist/index.js

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.

JSON
{
  "mcpServers": {
    "diagramzu": {
      "command": "node",
      "args": ["/absolute/path/to/packages/mcp-diagramzu/dist/index.js"],
      "env": {
        "DIAGRAMZU_BASE_URL": "https://diagramzu.ai",
        "DIAGRAMZU_API_TOKEN": "dz_live_xxx",
        "DIAGRAMZU_SPACE_ID": "org_xxx"
      }
    }
  }
}

Cursor

Edit ~/.cursor/mcp.json and restart Cursor.

JSON
{
  "mcpServers": {
    "diagramzu": {
      "command": "node",
      "args": ["/absolute/path/to/packages/mcp-diagramzu/dist/index.js"],
      "env": {
        "DIAGRAMZU_BASE_URL": "https://diagramzu.ai",
        "DIAGRAMZU_API_TOKEN": "dz_live_xxx",
        "DIAGRAMZU_SPACE_ID": "org_xxx"
      }
    }
  }
}
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).

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
curl · update
# Update a diagram
curl -X PATCH -H "Authorization: Bearer $DIAGRAMZU_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"code":"graph LR; A-->B-->C"}' \
  https://diagramzu.ai/api/spaces/$SPACE_ID/diagrams/<DIAGRAM_ID>

Endpoints.

MethodPathDescription
GET/api/spaces/[spaceId]/diagramsList diagrams in the space.
POST/api/spaces/[spaceId]/diagramsCreate a diagram.
GET/api/spaces/[spaceId]/diagrams/[id]Fetch a single diagram.
PATCH/api/spaces/[spaceId]/diagrams/[id]Update title or code.
DELETE/api/spaces/[spaceId]/diagrams/[id]Delete a diagram.
GET/api/spaces/[spaceId]/tokensList API tokens (no secrets).
POST/api/spaces/[spaceId]/tokensCreate token — secret returned ONCE.
DELETE/api/spaces/[spaceId]/tokens/[id]Revoke a token.