diagramzu-mcp is the MCP server for diagramzu.ai, used to read and write Mermaid diagrams in a shared workspace (Space), supporting Claude Code, Claude Desktop, Cursor, Windsurf, ChatGPT custom GPTs, and any MCP client. Users create diagrams in conversation, diagrams are stored in DiagramZu's Space, and team members can read them and publish public links. The project is registered in the official MCP Registry under the identifier ai.diagramzu/mcp.
How to use
Register and get a token: Register at diagramzu.ai, then create an API token at diagramzu.ai/app/settings/connections. The token looks like dz_live_…, is scoped to one Space, and no separate space-id is needed.
Connect a client
The hosted server is the simple path: no installation, no build, just paste the configuration.
Claude Desktop, Cursor, Windsurf, Cline: Add it in the client's MCP configuration (on macOS, Claude Desktop uses ~/Library/Application Support/Claude/claude_desktop_config.json, Cursor uses ~/.cursor/mcp.json, etc.).
ChatGPT custom GPT (Actions): Add an MCP server action in the GPT builder, pointing to https://mcp.diagramzu.ai/mcp,并设置 The Bearer-token authentication header is your dz_live_… token.
Local stdio (for clients that do not support remote MCP)
In the environment variables, DIAGRAMZU_SPACE_ID is optional. When not set, the server uses the token's own default workspace (the workspace selected when the token was minted). Setting it pins the process's default workspace to another workspace. Most users should prefer the remote HTTP transport described above; the stdio path is only for clients that do not support HTTP MCP.
Workspaces and tool behavior
When authorizing, a token can be scoped to one workspace (the Access radio button on the consent page, or Settings → API tokens), or to all workspaces its owner belongs to. Account-level tokens follow the owner's live memberships: joining a workspace adds it, and being removed closes it on the next call. list_spaces shows all workspaces this connection can operate on, which is the default workspace, and your role in each workspace. Every other tool can optionally take a space parameter—a workspace id, slug, or exact name (case-insensitive). If omitted, it operates on the default workspace. If a name matches multiple workspaces, it is rejected rather than guessed, and you must pass an id or slug. Every tool result shows the workspace it operated on at the end. Returned /app/... links carry a ?space= parameter, and when you are a member, opening the link switches the browser to that workspace.
Note on public links
Here "link" has two meanings, and only one works for people outside the Space: tools return /app/… URLs, so a link pasted directly from chat is a members-only link; sending it to someone outside the Space lands on the login page. To publish, open the diagram, presentation, or page in DiagramZu and use its Share button. This MCP server intentionally does not provide a tool for minting public links—not because the token cannot (a dz_live_… token can mint one via the REST API), but because publishing Space content should be a deliberate human action, not a side effect of conversation. Once a diagram has a public link, get_diagram and update_diagram report Share (public, read-only): on its own line. Markdown pages are shared in the same way. diagramzu.ai/s/pg/<slug> is their public read-only address, minted manually from the page's Share button, so get_page, create_page, and update_page print only the members-only /app/pages/<id> URL and point to that button for broader access. They do not look up the page's link: unlike get_diagram, they do not report a Share (public, read-only): line, so a page's public address is handed over manually, not discovered by the agent.
Local development
To develop diagramzu itself, build from source.
Limitations
This MCP server does not provide a tool to mint public links; public sharing must be done manually through the DiagramZu interface. A page's public link is not reported by tools and can only be provided manually.