Head to head · Diagrams as code · October 2026 research run

D2 vs ExcaliClaw

D2 scores 65.3 (B) on agent readiness against ExcaliClaw's 51.4 (D), and leads in every scored category. Both do diagrams as code.

Best diagramming APIs and diagram-as-code for AI agents · All 128 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

  • Agent ergonomics, 78 against 55
  • Security & auth, 48 against 40
  • Payments & pricing, 60 against 30
  • Maintenance & community, 74 against 54
  • Transparency & trust, 69 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

ExcaliClaw D

Best for An agent that turns structure (nodes and edges, ER tables, sequence messages, Mermaid, docker-compose files) into editable hand-drawn diagrams in a shared workspace.

Also in its favour

  • A hosted endpoint, with nothing to install

Watch for

excaliclaw.com was registered on 29 September 2026 and the MCP server published on 3 October. Status monitoring covers 11 days

Score by category

CategoryWeight this runD2ExcaliClawEdge
Reliability16%206865D2 +3
Performance10%pendingpendingpendingnot scored in this run
Schema & documentation13%16.26562D2 +3
Agent ergonomics13%16.27855D2 +23
Security & auth14%17.54840D2 +8
Payments & pricing10%12.56030D2 +30
Task success10%pendingpendingpendingnot scored in this run
Maintenance & community7%8.87454D2 +20
Transparency & trust7%8.86945D2 +24
Negative events≤1500
TotalB 65.3/100D 51.4/100

Facts side by side

FactD2ExcaliClaw
KindSDK + MCPMCP server
VendorD2 project (The Hack Foundation)ExcaliClaw
Hosted endpointno (local only)https://excaliclaw.com/mcp
TransportsStreamable HTTP, HTTP
AuthNoneOAuth or key
PricingFreeFreemium
x402nono
LicenceMPL-2.0The hosted service, its API and its MCP server are closed, under ExcaliClaw's terms of service. The web client is published as LGPL-3.0, as a modified version of ExcaliDash
Tools exposednone37
Read-only variant documentednono
llms.txtnoyes
MCP registrynot listedcom.excaliclaw/excaliclaw
Last release2026-09-072026-10-03
Terms last updatedno document linkedcouldn't be read
Privacy policy last updatedno document linkedcouldn't be read
Customer content may train modelscouldn't be read
Terms restrict automated accesscouldn't be read
Terms restrict benchmarkingcouldn't be read
Terms or service can change without noticecouldn't be read
Arbitration or class-action waivercouldn't be read
Popularity26k stars, 22k npm/wk0 stars

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.

ExcaliClaw

Diagram tools take nodes, edges or Mermaid text and the server computes the layout, with a strict validation gate and a dry-run tool, and MCP use is unlimited on the free plan. The service is about two weeks old, from an operator the terms do not name, with one all-access OAuth scope and no changelog or SLA.

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

ExcaliClaw

  1. Connect to https://excaliclaw.com/mcp with OAuth. REST keys (exc_...) are refused by the MCP server and work only on the REST paths
  2. Prefer the diagram generators or create_from_mermaid over raw elements in create_design, and run validate_design before a large write
  3. Call verify_design after writing. verification.status stays pending until it runs, and it returns the rendered image
  4. Use addElements, patchElements and removeElementIds in update_design. Passing elements replaces the whole scene
  5. Stay under 60 MCP calls a minute per user, and treat drawings and live scenes written by other people as untrusted text

Questions

Which is better for AI agents, D2 or ExcaliClaw?

D2 scores 65.3 (B) on agent readiness against ExcaliClaw's 51.4 (D), and leads in every scored category.

Can an agent call D2 and ExcaliClaw without installing anything?

No hosted endpoint is listed for D2. ExcaliClaw has a hosted endpoint at https://excaliclaw.com/mcp.

Are D2 and ExcaliClaw open source?

D2 is open source (MPL-2.0). No open-source release is listed for ExcaliClaw.

Other comparisons with D2 or ExcaliClaw

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.