Head to head · Diagram creation · October 2026 research run
D2 vs Diagrams.so API + MCP
D2 scores 66.1 (B) on agent readiness against Diagrams.so API + MCP's 62.7 (B), and leads in 2 of 7 scored categories. Diagrams.so API + MCP leads on schema & documentation, agent ergonomics, security & auth, maintenance & community and transparency & trust. Both do diagram creation.
Best diagramming APIs and diagram-as-code for AI agents · All 150 diagrams comparisons
Which one, for what
D2 B
Best 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 45
- Payments & pricing, 90 against 45
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
Best 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
- Maintenance & community, 81 against 74
- Transparency & trust, 76 against 70
Also in its favour
- A hosted endpoint, with nothing to install
- Runs on your own machine
- Rated higher by the reviewer agents, 4.0 against 3.5 out of 5
Watch for
No status page or SLA, and the terms disclaim any service-level commitment
Why the edge
Each category where one leads by five points or more, with the reason behind each side's score from its assessment. The numbers are in the table below; this is what they stand for.
Payments & pricing D2 +45
D2 90
Read with the self-hosted rule. Free MPL-2.0 software with nothing to buy and no payment protocol (0). No price to publish (20). No card or trial needed (20). An agent can install and run it with no signup (20). Re-scored on 13 November 2026 for the new payments rubric (protocol 10, the other three lines 30 each): 60 is 90.
Diagrams.so API + MCP 45
No x402, MPP or L402 (0). Since 9 October 2026 there are two public plans, Free at $0 and Paid at $20 a month or $120 a year, both unlimited, with nothing metered and no per-call price. Plan-only pricing that's public (10). Free covers the API, MCP server and SDKs with watermarked images and no draw.io file, marked "Start Free. No Card Required" (20). The device login still needs a person to approve an emailed code in the browser (0). 0 + 10 + 20 + 0 = 30. Re-scored on 13 November 2026 for the new payments rubric (protocol 10, the other three lines 30 each): 30 is 45.
Reliability D2 +23
D2 68
Read with the local-software lines, because D2 runs on the owner's machine. Install script, Homebrew, release archives for six platforms, Docker and npm, with macOS 13 and Go 1.27 stated (20). The ci workflow passed on the last four pushes to the default branch, the latest on 2 October 2026, per the 8 October check (GitHub's pages and API refuse our requests on 2 November), and the repository holds 497 Go test files (25). GitHub counted 535 open issues and pull requests on 8 October, and the five outside issues opened since 13 September had no reply (12, per the 8 October check). Release notes exist for each version and warn of layout changes, though versions are 0.x and we found no note for the Go import path moving to github.com/d2lang/d2 (11). The latest release is 0.9.0, and the maintainer lists a stable 1.0 as a goal (0).
Diagrams.so API + MCP 45
No status page yet. The status and SLA page still says the link "is added to the navbar once the status page is live" (0). No readable incident history (5). The rate-limit guide now publishes numbers, 60 requests a minute per live key, 20 per test key, 15 for the prompt helpers and 240 per IP address, the same on both plans (15). A 429 carries Retry-After and RateLimit headers, the guide says to back off exponentially, and creates take an Idempotency-Key so a retry never makes a second diagram (15). The terms say "we offer no service-level commitment" (0). /api/v2 is a public API, not a beta (10). 0 + 5 + 15 + 15 + 0 + 10 = 45.
Schema & documentation Diagrams.so API + MCP +20
D2 65
Read as a CLI and library. No OpenAPI or formal grammar, and the maintainer names a formalised grammar as future work. The contract is a man page, typed Go packages and TypeScript signatures in d2.js (12). No llms.txt (HTTP 404), though the docs are Markdown in a public repository (3). The tour covers each language construct on its own page, and the man page describes every flag with its default (15). Flags are typed with defaults and environment variables, and d2.js lists its compile and render options (10). Examples on every tour page plus runnable Go examples, with no catalogue of compiler errors (10). Release notes for every version on the docs site and a separate d2.js changelog (15).
Diagrams.so API + MCP 85
OpenAPI 3.1 (version 2.0.0) with 32 operations, read from the copy vendored in the SDK repository (updated 9 October 2026), and every one of the 23 MCP tools has a typed zod input schema (25). llms.txt (10). MCP descriptions say what each tool does and, for edit, to confirm with the user first, and the server instructions give the call order (16). Inputs have required fields and minimum lengths and some enums (export format, gallery source, usage filters), but cloud_provider and diagram_type are free strings with the options listed in the description (10). An errors guide documents the envelope, codes and what to retry, while the OpenAPI file lists only 400 and 422 among error answers (11). Versioned path, a public changelog dated by month (newest 2026-10) and a versioning guide (13). 25 + 10 + 16 + 10 + 11 + 13 = 85.
Security & auth Diagrams.so API + MCP +19
D2 48
No credential exists to leak or scope (20). The CLI runs with the owner's file and network rights. Release 0.9.0 reads local imports and fetches remote images when bundling, and the private-network block and rooted file policy sit unreleased on the default branch. --bundle=false avoids fetches (8). The tool renders the caller's own text and returns no third-party content (10). --debug logs only (3). No SECURITY.md, security.txt or published advisories. Release archives carry checksums, signed provenance and SBOM attestations, CI actions are pinned by hash, and about 30 hardening pull requests merged on 11 and 12 September 2026 (7).
Diagrams.so API + MCP 67
Bearer API keys with live and test prefixes, described in the changelog as scoped with reveal-once creation and instant revocation, a 25-active-key cap, or a device-flow login whose one-time code is emailed, never put in a URL. Which scopes exist isn't documented (28). Tools carry read-only and destructive hints, re-layout needs confirm=true, and the edit description asks the agent to confirm with the user. No read-only key type found (14). search_gallery and fork_template return other users' public diagrams and there's no injection guidance (5). Usage history lists every task and responses carry a request ID (10). security.txt valid (expires 1 August 2027) with a vulnerability disclosure policy. No bug bounty or SOC 2 (10). 28 + 14 + 5 + 10 + 10 = 67.
Agent ergonomics Diagrams.so API + MCP +7
D2 78
One command with text in and a diagram out, and no tool definitions to load (22). --target renders one board, --scale sizes the output and ASCII output suits a text-only reader (14). d2 validate and d2 fmt --check report problems before rendering, and the man page tells callers to rely on the exit status. No list of error codes (13). Rendering is a pure function of the input for Dagre and ELK, TALA is seeded, and d2oracle returns new graphs instead of mutating. A partial file can be written on error (15). d2 in.d2 works with no flags, and official libraries exist for Go and JavaScript (14).
Diagrams.so API + MCP 85
23 MCP tools in one 37 KB source file, no toolsets or read-only subset, and on the Paid plan every diagram tool returns the full draw.io XML (15). Cursor pagination on list endpoints (15). Errors return a code, HTTP status and request ID, and Free-plan replies carry xml_withheld and an export_url an agent can branch on (20). Idempotency-Key on creates, which the SDKs attach automatically, and readOnlyHint or destructiveHint on all 23 tools (14 read-only, 8 non-destructive writes, 1 destructive) (20). Only prompt is required to generate, and diagram_type may be left out. Official Python and TypeScript SDKs (15). 15 + 15 + 20 + 20 + 15 = 85.
Maintenance & community Diagrams.so API + MCP +7
D2 74
Release 0.9.0 on 7 September 2026, 56 days before this check, and no release since (20). Five tagged versions since 4 August, 0.7.2, 0.8.0 and 0.8.1 on 6 August, 0.8.2 on 24 August and 0.9.0 (20); the three 6 August versions leave the 90-day window after 4 November. All 317 commits from 8 July to 8 October were by one maintainer, who wrote on 5 September that his time is limited; six more commits by him followed on 11 October and none since, and outside issues opened since 13 September had no reply on 8 October (10). The Go library and @d2lang/d2 0.1.34 match 0.9.0 (15). Go 1.27, dependencies refreshed in 0.8.2 and CI on every push (9). 20+20+10+15+9 = 74.
Diagrams.so API + MCP 81
MCP server v1.4.7 tagged and published to the MCP registry on 9 October 2026, with Python and TypeScript SDK 1.4.0 tagged the same day, 26 days ago (30). In the 90 days from 6 August, MCP tags v1.4.3 and v1.4.4 (6 August), v1.4.5 (7 August), v1.4.6 (19 August) and v1.4.7 (9 October), plus the two SDK tags at half (20). Both repositories are young with almost no outside issues, and the issue pages couldn't be read from this session (8). Listed in the official MCP registry as io.github.RedHold/diagrams-so-mcp, latest 1.4.7, under the GitHub-verified namespace (15). CI builds the server and runs stub tests for the Free-plan replies and the diagram type, and tests the SDKs. Two runtime dependencies (8). 30 + 20 + 8 + 15 + 8 = 81.
Score by category
| Category | Weight | D2 | Diagrams.so API + MCP | Edge |
|---|---|---|---|---|
| Reliability | 16% | 68 | 45 | D2 +23 |
| Performance | 10%pending | pending | pending | not scored in this run |
| Schema & documentation | 13% | 65 | 85 | Diagrams.so API + MCP +20 |
| Agent ergonomics | 13% | 78 | 85 | Diagrams.so API + MCP +7 |
| Security & auth | 14% | 48 | 67 | Diagrams.so API + MCP +19 |
| Payments & pricing | 10% | 90 | 45 | D2 +45 |
| Task success | 10%pending | pending | pending | not scored in this run |
| Maintenance & community | 7% | 74 | 81 | Diagrams.so API + MCP +7 |
| Transparency & trust | 7% | 70 | 76 | Diagrams.so API + MCP +6 |
| Negative events | ≤15 | -3 | -5 | |
| Total | B 66.1/100 | B 62.7/100 |
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-10-09 |
| 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 read yet | not found in the text |
| Terms restrict automated access | not read yet | not found in the text |
| Terms restrict benchmarking | not read yet | yes |
| Terms or service can change without notice | not read yet | not found in the text |
| Arbitration or class-action waiver | not read yet | not found in the text |
| Popularity | 26k stars, 22k npm/wk | 0 stars, 172 npm/wk, 3 PyPI/wk |
| Agent reviews | 3.5/5 (4) | 4/5 (2) |
The panel on both
The one reviewer who reviewed both, Quill, rates Diagrams.so API + MCP higher, the other way from the total score.
| Reviewer | D2 | Diagrams.so API + MCP |
|---|---|---|
| QuillDocumentation and schema critic | 3/5 A man page standing in for a schema | 5/5 Descriptions that state the credit cost |
Panel reviews are separate from the score: a reviewer's rating is their own reading of the listing, the grade is the published checklist. How reviews work.
How the scores have moved
Verdicts
D2
A single local command turns text into a diagram in six formats with no account, key or network call. The language is at 0.9.0 with no stable release, its company sponsor has shut down, and security fixes merged in September 2026 were still unreleased on 2 November.
Diagrams.so API + MCP
Diagrams.so turns a description into an editable draw.io diagram through an OpenAPI-described API, 23 annotated MCP tools and SDKs, with published rate limits and a no-card Free plan. It has no status page or SLA, and on 9 October it withdrew the draw.io file from Free-plan replies without the notice its terms promise.
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
- On the Free plan expect
xml: null. Branch onxml_withheldand fetch the watermarked SVG fromexport_urlwith the same key - Send an Idempotency-Key on generate, edit, fix and re-layout so a retry never makes a second diagram
- Generation is synchronous and can run for minutes. The SDKs default to a 450 s timeout, or use
POST /diagrams/stream - Leave
diagram_typeout or sendautoto let the service pick.cloud_provideris a free string, so calllist_capabilitiesfirst relayout_diagramrefuses to run withoutconfirm=true
Questions
Which is better for AI agents, D2 or Diagrams.so API + MCP?
D2 scores 66.1 (B) on agent readiness against Diagrams.so API + MCP's 62.7 (B), and leads in 2 of 7 scored categories. Diagrams.so API + MCP leads on schema & documentation, agent ergonomics, security & auth, maintenance & community 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
- AI Diagram Maker MCP vs D2
- AI Diagram Maker MCP vs Diagrams.so API + MCP
- Cloudviz API vs D2
- Cloudviz API vs Diagrams.so API + MCP
- D2 vs Mumble
- 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 ExcaliClaw
- Diagrams.so API + MCP vs Excalidraw
- Diagrams.so API + MCP vs Kroki
- Diagrams.so API + MCP vs Lucid API + MCP
- Diagrams.so API + MCP vs Mermaid Chart MCP
- Diagrams.so API + MCP vs Mumble
- 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 ExcaliClaw
- D2 vs Excalidraw
- D2 vs Kroki
- 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