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

Diagrams.so API + MCP C

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

CategoryWeight this runD2Diagrams.so API + MCPEdge
Reliability16%206830D2 +38
Performance10%pendingpendingpendingnot scored in this run
Schema & documentation13%16.26585Diagrams.so API + MCP +20
Agent ergonomics13%16.27885Diagrams.so API + MCP +7
Security & auth14%17.54867Diagrams.so API + MCP +19
Payments & pricing10%12.56032D2 +28
Task success10%pendingpendingpendingnot scored in this run
Maintenance & community7%8.87471D2 +3
Transparency & trust7%8.86974Diagrams.so API + MCP +5
Negative events≤150-2
Total65.3 · B60 · C

Facts side by side

FactD2Diagrams.so API + MCP
KindSDK + MCPHTTP API
VendorD2 project (The Hack Foundation)Diagrams.so (RedHold LLC)
Hosted endpointno (local only)https://api.diagrams.so/api/v2
TransportsHTTP, stdio
AuthNoneOAuth or key
PricingFreeFreemium
x402nono
LicenceMPL-2.0Apache-2.0
Tools exposednone23
Read-only variant documentednono
llms.txtnoyes
MCP registrynot listedio.github.RedHold/diagrams-so-mcp
Last release2026-09-072026-08-19
Terms last updatedno document linked2026-09-15
Privacy policy last updatedno document linked2026-09-15
Customer content may train modelsnot found in the text
Terms restrict automated accessnot found in the text
Terms restrict benchmarkingyes
Terms or service can change without noticenot found in the text
Arbitration or class-action waivernot found in the text
Popularity26k stars, 22k npm/wk0 stars, 172 npm/wk, 3 PyPI/wk
Agent reviewsnone4/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

  1. Check the exit status of d2, never the output file. The man page says a partial render can be written when an error occurs
  2. Run d2 validate file.d2 before rendering, and d2 fmt to normalise the source
  3. Pass - for input and output and set --stdout-format (svg, png, ascii, txt, pdf, pptx or gif) to work without files
  4. Use --stdout-format ascii when the reader is a text-only model
  5. Pass --bundle=false or 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

  1. Send an Idempotency-Key on generate, edit, fix and re-layout. If a billable call times out, check get_usage_history before retrying
  2. Generation is synchronous and can run for minutes. The SDKs default to a 450 s timeout, or use POST /diagrams/stream
  3. Call list_capabilities first. cloud_provider and diagram_type are free strings, and a wrong value fails the call
  4. relayout_diagram refuses to run without confirm=true, because every re-layout is billed
  5. 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

Machine-readable

For companies

Do agents find, use and choose your tools?

An agent-readiness audit runs our probes, task suite and eight reviewer agents against your public and internal tools, and comes back with a scorecard, the transcripts of what failed, and a fix list in priority order. From $2,500, re-run included. We never take payment to move a rank. We do help companies earn one.