Purpose
Diagrams.so MCP server is used to let AI agents generate, edit, and manage cloud architecture diagrams. It acts as a lightweight stdio client between MCP clients (such as Claude Desktop, Claude Code, Cursor) and the Diagrams.so public API, with each tool corresponding to one REST call.
Main capabilities
Provides 23 tools, covering generating, editing, reviewing, and exporting cloud architecture diagrams. Specifically including:
- Generate diagrams (generate_diagram)
- Get design warnings (get_warnings)
- Export diagrams (export_diagram)
- Fix warnings, relayout (relayout, requires confirm=true), enhance prompts (enhance_prompt), clarify prompts (clarify_prompt), etc. Supports generating diagrams from prompts, Terraform, or Kubernetes manifests, checking Well-Architected warnings and fixing them, and exporting as SVG or native draw.io files.
Usage
Requires Node ≥ 18. No need to manually copy an API key; connect by approving in the browser.
Installation:
- After installing the package,
diagrams-sowill be added to PATH. The longerdiagrams-so-mcpname is still available,npx @diagrams-so/mcp <command>can be run without installation. - Run
npx @diagrams-so/mcp installto print the configuration block suitable for your client.
Connection:
- Run
npx @diagrams-so/mcp loginonce, or setDIAGRAMS_LOGIN_EMAILin the configuration, then request diagram generation. The first tool call will send a one-time login code to your email and return a link. Open the link, enter the code, and click Approve. - For CI and headless machines only, you can set
DIAGRAMS_API_KEY.
Configuration example (claude_desktop_config.json / mcp.json for Claude Desktop / Cursor):
{
"mcpServers": {
"diagrams-so": {
"command": "npx",
"args": ["@diagrams-so/mcp"]
}
}
}
After adding it, restart the client, then run /mcp to confirm that diagrams-so shows 23 tools. After that, ask questions in natural language in the chat box, for example:
"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."
The assistant will automatically call tools such as generate_diagram, get_warnings, export_diagram, etc.
Other available example questions:
- "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."
One-click installation (MCPB): Download diagrams-so.mcpb from the latest release and drag it into Claude Desktop. No terminal is needed; on first use, click the link provided by the first tool call to connect.
It can also be installed via smithery.ai/servers/diagrams-so/mcp, which lists all 23 tools and their parameters.
When not using the assistant, you can visit the diagrams.so/create web version and enter a prompt, with no installation, login, or MCP required.
Suitable scenarios
- Quickly generate and iterate cloud architecture diagrams in natural language within an AI assistant.
- Generate architecture diagrams from Terraform or Kubernetes manifests.
- Review architecture designs and fix Well-Architected warnings.
- Export diagrams for documentation (such as SVG in a README) or further editing (draw.io files).
Limitations
- Requires Node ≥ 18.
- All plans have unlimited diagrams and edits, with only a per-minute rate limit.
- Paid plans add watermark-free and draw.io export; freeThe paid plan returns SVG images with watermarks; editable draw.io files require a paid plan. Free diagrams can be set to private.
- Long-running tools (generate / edit / fix / relayout / enhance_prompt / clarify_prompt) emit notifications/progress every 10 seconds; if the client does not support resetTimeoutOnProgress, the per-call timeout needs to be increased.
- The server only connects to the public /api/v2 and does not access internal services or databases.
- Credentials are stored in ~/.diagrams-so/credentials.json, with owner-only permissions.
- The code is licensed under Apache-2.0; API usage is subject to the Terms of Service and Acceptable Use Policy.
- Test mode keys act on real accounts.
- The Diagrams.so trademark and Diagrams.so logo are owned by RedHold LLC.
- Report security vulnerabilities to security@diagrams.so.