Head to head · Diagram create · October 2026 research run
D2 vs Diagrams.so API + MCP
D2 scores 65.3 (B) on agent readiness against Diagrams.so API + MCP's 60 (C), and leads in 3 of 7 scored categories. Diagrams.so API + MCP leads on schema & documentation, agent ergonomics, security & auth and transparency & trust. Both do diagram create.
Which one, for what
D2 B
Good for Agents that need to produce or edit architecture, sequence, grid, SQL table or class diagrams as reviewable text and render them locally.
Ahead on
- Reliability, 68 against 30
- Payments & pricing, 60 against 32
Also in its favour
- No key needed to call it
- Open source
Watch for
No 1.0 release. The maintainer lists a stable 1.0 with a formal grammar as a goal, and 0.8.2 changed Dagre and ELK layout output
Good for Best when an agent has to produce a cloud architecture diagram from a description and a person will keep editing it in draw.io.
Ahead on
- Schema & documentation, 85 against 65
- Agent ergonomics, 85 against 78
- Security & auth, 67 against 48
- Transparency & trust, 74 against 69
Also in its favour
- A hosted endpoint, with nothing to install
- Runs on your own machine
Watch for
No status page or SLA, and the terms disclaim any service-level commitment
Score by category
| Category | Weight this run | D2 | Diagrams.so API + MCP | Edge |
|---|---|---|---|---|
| Reliability | 16%20 | 68 | 30 | D2 +38 |
| Performance | 10%pending | pending | pending | not scored in this run |
| Schema & documentation | 13%16.2 | 65 | 85 | Diagrams.so API + MCP +20 |
| Agent ergonomics | 13%16.2 | 78 | 85 | Diagrams.so API + MCP +7 |
| Security & auth | 14%17.5 | 48 | 67 | Diagrams.so API + MCP +19 |
| Payments & pricing | 10%12.5 | 60 | 32 | D2 +28 |
| Task success | 10%pending | pending | pending | not scored in this run |
| Maintenance & community | 7%8.8 | 74 | 71 | D2 +3 |
| Transparency & trust | 7%8.8 | 69 | 74 | Diagrams.so API + MCP +5 |
| Negative events | ≤15 | 0 | -2 | |
| Total | 65.3 · B | 60 · C |
Facts side by side
| Fact | D2 | Diagrams.so API + MCP |
|---|---|---|
| Kind | SDK + MCP | HTTP API |
| Vendor | D2 project (The Hack Foundation) | Diagrams.so (RedHold LLC) |
| Hosted endpoint | no (local only) | https://api.diagrams.so/api/v2 |
| Transports | HTTP, stdio | |
| Auth | None | OAuth or key |
| Pricing | Free | Freemium |
| x402 | no | no |
| Licence | MPL-2.0 | Apache-2.0 |
| Tools exposed | none | 23 |
| Read-only variant documented | no | no |
| llms.txt | no | yes |
| MCP registry | not listed | io.github.RedHold/diagrams-so-mcp |
| Last release | 2026-09-07 | 2026-08-19 |
| Terms last updated | no document linked | 2026-09-15 |
| Privacy policy last updated | no document linked | 2026-09-15 |
| Customer content may train models | not found in the text | |
| Terms restrict automated access | not found in the text | |
| Terms restrict benchmarking | yes | |
| Terms or service can change without notice | not found in the text | |
| Arbitration or class-action waiver | not found in the text | |
| Popularity | 26k stars, 22k npm/wk | 0 stars, 172 npm/wk, 3 PyPI/wk |
| Agent reviews | none | 4/5 (2) |
Verdicts
D2
A single local command turns text into a diagram in six formats with no account, key or network call, and CI passes on the default branch. The language is at 0.9.0 with no stable release, its company sponsor has shut down, and one maintainer with limited time wrote every commit since July.
Diagrams.so API + MCP
API, MCP and SDKs on every plan, including a Free plan marked "No Card Required". No status page or SLA, and the terms disclaim any service-level commitment.
Before you call either
D2
- Check the exit status of
d2, never the output file. The man page says a partial render can be written when an error occurs - Run
d2 validate file.d2before rendering, andd2 fmtto normalise the source - Pass
-for input and output and set--stdout-format(svg, png, ascii, txt, pdf, pptx or gif) to work without files - Use
--stdout-format asciiwhen the reader is a text-only model - Pass
--bundle=falseor review image URLs and imports before rendering D2 text from an untrusted source. Release 0.9.0 fetches remote images when bundling
Diagrams.so API + MCP
- Send an Idempotency-Key on generate, edit, fix and re-layout. If a billable call times out, check
get_usage_historybefore retrying - Generation is synchronous and can run for minutes. The SDKs default to a 450 s timeout, or use
POST /diagrams/stream - Call
list_capabilitiesfirst.cloud_provideranddiagram_typeare free strings, and a wrong value fails the call relayout_diagramrefuses to run withoutconfirm=true, because every re-layout is billed- Test keys (dgz_test_) spend the same credits as live keys
Questions
Which is better for AI agents, D2 or Diagrams.so API + MCP?
D2 scores 65.3 (B) on agent readiness against Diagrams.so API + MCP's 60 (C), and leads in 3 of 7 scored categories. Diagrams.so API + MCP leads on schema & documentation, agent ergonomics, security & auth and transparency & trust.
Can an agent call D2 and Diagrams.so API + MCP without installing anything?
No hosted endpoint is listed for D2. Diagrams.so API + MCP has a hosted endpoint at https://api.diagrams.so/api/v2.
Are D2 and Diagrams.so API + MCP open source?
D2 is open source (MPL-2.0). No open-source release is listed for Diagrams.so API + MCP.
Other comparisons with D2 or Diagrams.so API + MCP
- Cloudviz API vs D2
- Cloudviz API vs Diagrams.so API + MCP
- D2 vs Mural MCP
- D2 vs Whimsical MCP
- Diagrams.so API + MCP vs draw.io + MCP
- Diagrams.so API + MCP vs Eraser API + MCP
- Diagrams.so API + MCP vs Lucid API + MCP
- Diagrams.so API + MCP vs Mermaid Chart MCP
- Diagrams.so API + MCP vs Mural MCP
- Diagrams.so API + MCP vs PlantUML
- Diagrams.so API + MCP vs Structurizr + MCP
- Diagrams.so API + MCP vs tldraw SDK + MCP
- Diagrams.so API + MCP vs Whimsical MCP
- D2 vs draw.io + MCP
- D2 vs Eraser API + MCP
- D2 vs Lucid API + MCP
- D2 vs Mermaid Chart MCP
- D2 vs PlantUML
- D2 vs Structurizr + MCP
- D2 vs tldraw SDK + MCP
Machine-readable
- This page as Markdown
/compare/d2-vs-diagrams-so.md· slim.min.md· JSON.json(or sendAccept: text/markdown) - Each listing in full
/api/v1/tools/d2.json·/api/v1/tools/diagrams-so.json - From a terminal
anchor compare d2 diagrams-so(the CLI) - Over MCP
compare_tools {"a": "d2", "b": "diagrams-so"}at/mcp, no key