diagrams-so
OfficialDiagram Creation & Modification:
Generate diagrams from natural language prompts (supports AWS, Azure, GCP, OCI, Kubernetes; diagram types: architecture, flowchart, sequence, data pipeline, etc.)
Edit diagrams with plain English descriptions (creates new versions)
Fix specific Well-Architected warnings without altering the rest of the diagram
Re-layout diagrams via AI for readability (async job)
Import existing draw.io XML to create new diagrams
Update diagram metadata: rename, set visibility (public/private), replace underlying XML
Revert to any earlier version
Soft-delete diagrams (requires confirmation)
Fork public gallery/library templates into your account
Inspection & Export:
Get diagram details (title, draw.io XML, Well-Architected score)
List your diagrams (cursor-paginated, newest first)
Retrieve Well-Architected warnings for a diagram (findings with type, component, message)
Export diagrams: .drawio (fully editable) or .svg (free, watermarked on free plan)
List and get version history of a diagram
Poll async re-layout job status and results
Search public gallery for community and curated templates
Prompt Assistance:
Enhance a rough prompt into a detailed generation prompt
Clarify vague prompts with 1-3 clarifying questions before generating
Account & Usage:
Check usage, remaining credits, and per-action cost estimates
View itemized credit consumption history (filter by action, date range, diagram, surface)
Identify account/plan (whoami)
List supported capabilities (diagram types, cloud providers, export formats)
Allows exporting cloud architecture diagrams in draw.io format that can be opened and edited in diagrams.net.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@diagrams-so Generate an AWS 3-tier web app diagram"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
@diagrams-so/mcp
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.
# 1. add the server to Claude Code
claude mcp add diagrams-so -- npx -y @diagrams-so/mcp
# 2. connect this machine (a browser opens, press Approve)
npx @diagrams-so/mcp loginRestart 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:
npm i -g @diagrams-so/mcp
diagrams-so loginThe server talks to production (
https://api.diagrams.so/api/v2) by default. Point it at a local or self-hosted API withDIAGRAMS_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).
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.
Related MCP server: fcp-drawio
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 |
| Create a diagram from a prompt → id + warnings + score + draw.io XML (Paid) or a watermarked image link (Free) |
| Apply a natural-language change (new version) |
| Resolve one Well-Architected warning |
| AI re-arrange the layout (async; asks for |
| Import existing draw.io XML as a new diagram |
| Rename / change visibility / replace XML |
| Revert to an earlier version |
| Soft-delete a diagram (destructive) |
| Copy a public/library diagram into your account (private) |
Read
Tool | What it does |
| Fetch a diagram's score + XML (Paid) or a watermarked image link (Free) |
| List your diagrams (cursor-paginated) |
| Well-Architected findings for a diagram |
| Raw |
| Version history (with |
| A specific version's score + XML (Paid) or a watermarked image link (Free) |
| Poll an async re-layout job |
| Search public community + curated library diagrams |
| Turn a rough idea into a detailed prompt |
| Get clarifying questions for a vague prompt |
| Your plan and usage |
| Past tasks (action, diagram, surface) with filters + a live session tally |
| Account, plan, scopes, live/test mode |
| Valid diagram types / providers / export formats |
Every tool is unlimited on every plan. delete is destructive, and relayout asks for confirm=true before it replaces the layout.
CLI
Commands
Installing the package puts diagrams-so on your PATH. The longer
diagrams-so-mcp name still works, and npx @diagrams-so/mcp <command> works
without installing anything.
npm i -g @diagrams-so/mcp
diagrams-so login # connect this machine (a browser opens, press Approve)
diagrams-so whoami # which account is this machine connected as
diagrams-so logout # remove the local credential
diagrams-so install # print client config to pasteEnvironment
Var | Required | Default |
| ❌ | — (CI and headless only; |
| ❌ |
|
| ❌ |
|
| ❌ | — ( |
| ❌ | — (set to any value to stop |
| ❌ | — (set to any value to disable in-tool connect; unauthenticated tools then just say to run |
| ❌ | — (address for in-tool connect: the one-time sign-in code is emailed there; without it, unauthenticated tools say to run |
Add it to your MCP client
The published package runs straight from npm, so there is no path to fill in and no key in the
config. Run npx @diagrams-so/mcp install to print these blocks for your client.
Claude Code (CLI)
claude mcp add diagrams-so -- npx -y @diagrams-so/mcp
npx @diagrams-so/mcp loginClaude Desktop / Cursor (claude_desktop_config.json / mcp.json)
{
"mcpServers": {
"diagrams-so": {
"command": "npx",
"args": ["-y", "@diagrams-so/mcp"]
// optional: "env": { "DIAGRAMS_API_BASE": "http://localhost:8000/api/v2" } for a local API
}
}
}Connect either by running npx @diagrams-so/mcp login once, or, with DIAGRAMS_LOGIN_EMAIL
set, by asking for a diagram and following the link the first tool call gives you (the sign-in
code arrives by email). Set DIAGRAMS_API_KEY instead only for CI and headless machines,
where no browser can open.
Restart the client, then ask: "Generate an AWS 3-tier web app diagram and show me the warnings."
One-click install (MCPB)
Download diagrams-so.mcpb from the
latest release and drag it into
Claude Desktop. No terminal, and it no longer asks for an API key: install it, then connect on first
use by clicking the link the first tool call gives you.
Building the bundle yourself is a contributor step, see Developing locally.
Smithery
The server is listed at smithery.ai/servers/diagrams-so/mcp, which installs it for you and lists all 23 tools with their parameters:
npx -y smithery mcp add diagrams-so/mcpSame package, same login step. It's the MCPB bundle Smithery installs, not the npm package, so the
version shown there follows releases rather than npm dist-tags.
Verify it works
DIAGRAMS_API_KEY=dgz_live_your_key node test-smoke.mjsRuns the full flow (connect → list tools → whoami → generate → warnings → fix → export → error handling).
Continuous integration & releases
Workflow | Trigger | What it does |
CI ( | every push / PR |
|
Live smoke ( | nightly + manual | the full end-to-end flow ( |
Release ( | tag | build → |
Cut a release:
# bump "version" in package.json + manifest.json to match, commit, then:
git tag v1.2.0 && git push origin v1.2.0The tag must match package.json's version (the workflow enforces this). The
.mcpb bundle appears on the GitHub Release; manual workflow_dispatch produces
it as a downloadable artifact without publishing (handy for testing a bundle).
Repo secrets/variables (optional): DIAGRAMS_API_KEY (live smoke),
NPM_TOKEN (npm publish), DIAGRAMS_API_BASE variable (non-prod live-smoke target).
Notes
stdout is the MCP channel — the server logs only to stderr.
Errors come back as clean MCP tool errors carrying the API's
code, HTTP status, andrequest_id.The server never talks to internal services or the database — only the public
/api/v2.Long-running tools stay alive past client timeouts.
generate/edit/fix/relayout/enhance_prompt/clarify_promptemit anotifications/progressevery 10s while running, so MCP clients that reset their request timeout on progress (resetTimeoutOnProgress) won't abort a slow generation at the SDK's 60s default. If your client doesn't reset on progress, raise its per-call timeout for these tools.
Developing locally
Only needed if you are changing the server itself. Users should install from npm, see Quick start.
git clone https://github.com/RedHold/diagrams-mcp-app-core.git
cd diagrams-mcp-app-core
npm install # installs deps and builds dist/ via the prepare hook
node scripts/ci-smoke.mjs # all 23 tools register; no API calls
# point a client at your working copy
claude mcp add diagrams-so-dev -- node "$(pwd)/dist/index.js"
# build the MCPB bundle
npm run build && npx @anthropic-ai/mcpb packLicense and legal
Code: Apache-2.0. See NOTICE.
Service: this server is a client for the Diagrams.so API. Use of the API is governed by the Terms of Service and Acceptable Use Policy; the code license grants no rights to the API itself.
Privacy: the server runs locally, connects only to
api.diagrams.so, and contains no telemetry. Credentials fromloginare stored at~/.diagrams-so/credentials.jsonwith owner-only permissions. See the Privacy Policy.Plans: every plan has unlimited diagrams and edits, with a per-minute rate limit. Paid adds no watermark and draw.io export; Free diagrams can be private. Test-mode keys act on your real account.
Trademarks: Diagrams.so and the Diagrams.so logo are trademarks of RedHold LLC. This license does not grant permission to use them, except to accurately describe the package's origin. See the Trademark Policy.
Security: report vulnerabilities to security@diagrams.so per SECURITY.md.
Available Tools
23 toolsclarify_promptClarify a vague promptARead-only
Get 1–3 clarifying questions (and a suggested diagram type) for a vague prompt, before generating. Free.
Inputs: prompt (required).
delete_diagramDelete a diagramADestructive
Delete (soft-delete) a diagram you own. It stops appearing in list_diagrams and can no longer be fetched. Confirm with the user before calling — this is destructive.
Inputs: diagram_id (required).
edit_diagramEdit a diagramA
Apply a natural-language change to an existing diagram (e.g. 'add a Redis cache'). Creates a new version and returns the updated XML. Costs credits. Confirm with the user before calling — it mutates the diagram.
Inputs: diagram_id (required), edit_prompt (required).
enhance_promptEnhance a promptCRead-only
Turn a rough idea into a detailed generation prompt. Free.
Inputs: prompt (required), cloud_provider.
export_diagramExport a diagramARead-only
Export a diagram as a raw file: drawio (open at app.diagrams.net) or svg. Returns the file content directly. Exports are free on every plan. Free-plan SVG exports carry a watermark.
Inputs: diagram_id (required), format.
fix_warningFix one warningA
Resolve a single Well-Architected warning (from get_warnings), leaving the rest of the diagram untouched. Creates a new version. Costs credits.
Inputs: message (required), diagram_id (required), component, warning_type.
fork_templateFork a public diagramA
Copy a PUBLIC gallery diagram or curated library template into your own account (private) so you can edit it. Returns the new diagram id.
Inputs: diagram_id (required).
generate_diagramGenerate a diagramA
Create a new cloud architecture diagram from a natural-language prompt. Returns the diagram id, its draw.io XML, Well-Architected warnings, score, and credits used. Costs credits.
Inputs: prompt (required), opinionated, diagram_type, cloud_provider.
get_diagramGet a diagramARead-only
Fetch a diagram by id — returns its title, draw.io XML, and Well-Architected score.
Inputs: diagram_id (required).
get_relayout_statusPoll a re-layout jobARead-only
Check the status of an async re-layout job started by relayout_diagram. Returns pending/done/failed; when done+applied it includes the re-laid XML + fresh warnings/score. Free.
Inputs: job_id (required), diagram_id (required).
get_usageGet usage & creditsARead-only
Show your current plan, credits remaining, and per-action cost estimates. Free.
Inputs: no named parameters.
get_usage_historyCredit consumption historyARead-only
List how much credit each past task (generate/edit/fix/relayout) charged — newest first, with the diagram it touched and the surface (api/sdk/mcp) that ran it. Use this to answer 'how much did each task cost?'. Also shows a running tally of tasks performed in THIS session. Free (read-only).
Inputs: limit, since, until, action, +3 more.
get_versionGet a diagram versionARead-only
Fetch a specific version's XML + Well-Architected score (e.g. to inspect before reverting). Free.
Inputs: diagram_id (required), version_id (required).
get_warningsGet Well-Architected warningsARead-only
List the Well-Architected findings for a diagram (each has type, component, message). Free.
Inputs: diagram_id (required).
import_diagramImport a diagramA
Import an existing draw.io (mxGraphModel/mxfile) XML document as a new diagram in your account. Validated and sanitized. Free (no AI).
Inputs: xml (required), title, diagram_type, cloud_provider.
list_capabilitiesList capabilitiesARead-only
Discover the valid diagram types, cloud providers, and export formats the API supports — so you pass valid values to generate_diagram / export_diagram. Free.
Inputs: no named parameters.
list_diagramsList my diagramsARead-only
List your diagrams (newest first, cursor-paginated). Returns id, title, cloud, type.
Inputs: limit, cursor.
list_versionsList diagram versionsARead-only
List a diagram's version history (ascending; is_current marks the live one). Use with revert_diagram / get_version.
Inputs: diagram_id (required), limit, cursor.
relayout_diagramRe-arrange layout with AIA
Automatically re-arrange a diagram's layout for readability (async). Starts the job and waits for it to finish, returning the re-laid XML + fresh warnings/score. Every re-layout costs credits based on the tokens it uses (like edit/fix) and requires confirm=true. If the job is still running when the wait elapses, returns a job_id you can poll with get_relayout_status.
Inputs: diagram_id (required), confirm.
revert_diagramRevert to a versionA
Revert a diagram to an earlier version (from list_versions). Pass either version_id or version_number. Free (no AI).
Inputs: diagram_id (required), version_id, version_number.
search_gallerySearch the galleryARead-only
Search public community diagrams and curated library templates to reuse as a starting point. Returns id, title, and source (community/library). Fork one with fork_template.
Inputs: q, limit, cursor, source, +2 more.
update_diagramUpdate a diagramA
Update a diagram's metadata or XML: rename it, change visibility (public/private — paid plans for private), or replace its XML. Pass only the fields you want to change. Free (no AI).
Inputs: diagram_id (required), xml, title, is_public.
whoamiWho am IARead-only
Show the account, plan, scopes, and live/test mode of the configured API key. Free.
Inputs: no named parameters.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 23 tools
Each tool targets a distinct object/action: diagram CRUD vs versioning vs warnings vs relayout vs gallery vs usage/prompt helpers. Although update_diagram and edit_diagram are near-synonyms, their descriptions distinguish direct metadata/XML changes from AI natural-language edits, so an agent should not confuse them.
Almost all names are snake_case verb_noun pairs (list_diagrams, get_version, fork_template, list_capabilities), with whoami as the only notable deviation from the object-bearing pattern. This is a minor exception to an otherwise consistent convention.
At 23 tools this sits in the 16-25 range that feels heavy; the API covers many subdomains (diagram lifecycle, AI generation, warnings, relayout, gallery, usage) but several helper tools (whoami, get_usage, get_usage_history, clarify_prompt, enhance_prompt) could arguably be consolidated. Still, most tools map to a distinct operation.
The set covers the full diagram lifecycle: create (generate/import/fork), read (get/list), update (update/edit), delete, revert, version history, export, and warnings. There are no obvious dead ends; prompt helpers and usage tracking round out the workflow.
Maintenance
Related MCP Connectors
Render, verify, describe, and safely edit Mermaid diagrams through MCP.
Immutable agent diagrams: create, edit, validate and render versioned diagrams over MCP.
Collaborative whiteboard MCP server — create objects, connectors, C4 diagrams, and manage boards
Screenshots, PDFs, image editing, QR codes, email validation and more through one hosted MCP server.
Related MCP Servers
- AlicenseAqualityDmaintenanceAn MCP server that generates professional infrastructure diagrams using the Python diagrams DSL, with first-class Azure support and GitHub Copilot integration for natural language diagram generation.4MIT
- AlicenseBqualityDmaintenanceMCP server that enables LLMs to create and edit draw.io diagrams using high-level intent commands, with automatic layout and styling.46 npm4MIT
- AlicenseAqualityAmaintenanceMCP server for creating and editing diagrams using draw.io. Allows generating diagrams from Mermaid or XML, searching shapes, and opening them in draw.io for export.20Apache 2.0
- AlicenseNot gradedqualityBmaintenanceMCP server for generating architecture diagrams with official vendor icons from natural language descriptions. Provides tools to validate specs, render diagrams, search icon catalog, and list available services.1MIT