The Diagrams.so MCP server exposes the API as Model Context Protocol tools, so an AI agent can generate, review, fix, edit, and export diagrams as part of a larger task without you writing any HTTP. It ships on npm and installs with a single command.

Install

Restart your client, then ask: “Generate an AWS 3-tier web app diagram and show me the warnings.” If this machine is not connected yet, the first tool call replies with a link. Open it, press Approve, and ask again. No terminal is needed, which is what makes this work in Claude Desktop.
Print ready-to-paste config for Claude Code, Claude Desktop, and Cursor:
Installing the package globally gives you a shorter command:
npx @diagrams-so/mcp@latest <command> works without installing anything, and the original diagrams-so-mcp name still works.

Commands

A one-click .mcpb bundle for Claude Desktop is distributed through the MCP registry and the Claude Desktop extensions directory. It does not ask for an API key: install it, then connect on first use. Until it is listed there, use the npx command above, which works in every MCP client from the public npm package.

Configuration

Prefer login. It stores a scoped, revocable, 90-day credential outside your client config. Never share a key or paste it into a chat.

What the agent can do

The server provides 23 tools covering the full API. Both plans are unlimited, and every task shows up in your usage history with source="mcp". On Free, the API sends no draw.io XML. The agent can still generate, edit and fix by id, and gets the picture through export_diagram with svg, which carries a watermark. On Paid the agent gets the draw.io XML and can export either format. See Plans & pricing. See the complete Tools reference for every tool and example prompts.

Next steps

Tools reference

All 23 tools, grouped, with example prompts.

Authentication

How keys and scopes work.