MCP server for Diagrams.so. 23 tools that let an AI agent generate, edit and review cloud architecture diagrams as native draw.io files.
@diagrams-so/mcp
以下摘录自该仓库的 README(片段) · 在 GitHub 读完整 README →
The **Diagrams.so MCP server** — generate, edit, and manage cloud architecture diagrams from any MCP client (Claude Desktop, Claude Code, Cursor). It's a thin stdio client over the public Diagrams.so API (/api/v2); every tool is one REST call.
Quick start
Needs **Node ≥ 18**. No API key to copy: you connect by approving in a browser.
Restart your client, then ask: *"Generate an AWS 3-tier web app diagram and show me the warnings."*
Run /mcp if you want to confirm all 23 tools registered first.
Using it a lot? Install once and the command gets shorter:
> The server talks to production (https://api.diagrams.so/api/v2) by default. Point it at a
> local or self-hosted API with DIAGRAMS_API_BASE.
Using Claude Desktop or Cursor instead of the CLI? See Add it to your MCP client. Prefer a one-click, no-terminal install? See One-click install (MCPB).
No terminal at all (Claude Desktop)
Add the server to your client config (below) with DIAGRAMS_LOGIN_EMAIL set to your email,
then just ask for a diagram. Because the machine isn't connected yet, the first tool call
emails you a one-time sign-in code and replies with a link. Open it, enter the code, press
**Approve**, and ask again. Nothing to install or type.
Generating a diagram from Claude
login only connects the machine. It never generates anything itself, so there is no
generate command to type in a terminal. You write the prompt **in your assistant's normal
chat box** and it calls the tools for you.
| Client | Where you type the prompt |
|---|---|
| Claude Code | the terminal chat, same place you ask anything else |
| Claude Desktop | the normal message box |
| Cursor | the chat or composer panel |
**MCP servers load at startup, so restart your client after adding it.** Then run /mcp and
confirm diagrams-so shows 23 tools.
Now just ask, in plain English:
> Generate an AWS three-tier web app with an ALB, EC2 Auto Scaling and RDS Multi-AZ.
> Show me the design warnings, then export it as draw.io.
Behind that one sentence the assistant calls generate_diagram, then get_warnings, then
export_diagram. You never name a tool or write JSON.
More things worth asking, once you have a diagram:
> The warnings mention no encryption in transit. Fix that one and show me the new score.
> Add a CloudFront distribution in front of the ALB.
> Re-export it as SVG so I can drop it in the README.
Every plan has unlimited diagrams and edits. Nothing is metered; there is only a per-minute rate
limit. The Paid plan adds no watermark and draw.io export. Free diagrams can be private.
On the Paid plan the .drawio file the assistant saves opens at app.diagrams.net
or in the desktop app, fully editable: it is real draw.io XML, not a picture. On the Free plan the
tools return a watermarked image (SVG) instead, and say so; the editable draw.io file needs the Paid plan.
**Prefer not to use an assistant at all?** diagrams.so/create has
the same thing as a web page: type the prompt in the box. No install, no login, no MCP.
Tools (23)
**Create & change (mutating)**
| Tool | What it does |
|---|---|
| generate_diagram | Create a diagram from a prompt → id + warnings + score + draw.io XML (Paid) or a watermarked image link (Free) |
| edit_diagram | Apply a natural-language change (new version) |
| fix_warning | Resolve one Well-Architected warning |
| relayout_diagram | AI re-arrange the layout (async; asks for confirm=true) |
| import_diagram | Import existing draw.io XML as a new diagram |
| update_diagram | Rename / change visibility / replace XML |
| revert_diagram | Revert to an earlier version |
| delete_diagram | Soft-delete a diagram (destructive) |
| fork_template | Copy a public/library diagram into your account (private) |
**Read**
| Tool | What it does |