Head to head · Diagram as code · October 2026 research run
D2 vs Mermaid Chart MCP
D2 scores 65.3 (B) on agent readiness against Mermaid Chart MCP's 31.4 (F), and leads in every scored category. Both do diagram as code.
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 15
- Schema & documentation, 65 against 32
- Agent ergonomics, 78 against 34
- Security & auth, 48 against 20
- Payments & pricing, 60 against 45
- Maintenance & community, 74 against 53
- 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
Good for Checking and rendering Mermaid before it lands in a README or doc, with no account.
Also in its favour
- A hosted endpoint, with nothing to install
Watch for
Docs list 9 tools while the live server listed 25, including undocumented GitHub, Jira and Notion helpers
Score by category
| Category | Weight this run | D2 | Mermaid Chart MCP | Edge |
|---|---|---|---|---|
| Reliability | 16%20 | 68 | 15 | D2 +53 |
| Performance | 10%pending | pending | pending | not scored in this run |
| Schema & documentation | 13%16.2 | 65 | 32 | D2 +33 |
| Agent ergonomics | 13%16.2 | 78 | 34 | D2 +44 |
| Security & auth | 14%17.5 | 48 | 20 | D2 +28 |
| Payments & pricing | 10%12.5 | 60 | 45 | D2 +15 |
| Task success | 10%pending | pending | pending | not scored in this run |
| Maintenance & community | 7%8.8 | 74 | 53 | D2 +21 |
| Transparency & trust | 7%8.8 | 69 | 45 | D2 +24 |
| Negative events | ≤15 | 0 | 0 | |
| Total | 65.3 · B | 31.4 · F |
Facts side by side
| Fact | D2 | Mermaid Chart MCP |
|---|---|---|
| Kind | SDK + MCP | MCP server |
| Vendor | D2 project (The Hack Foundation) | Mermaid Chart |
| Hosted endpoint | no (local only) | https://mcp.mermaid.ai/mcp |
| Transports | Streamable HTTP, SSE (legacy) | |
| Auth | None | OAuth or key |
| Pricing | Free | Freemium |
| x402 | no | no |
| Licence | MPL-2.0 | none |
| Tools exposed | none | 25 |
| Read-only variant documented | no | no |
| llms.txt | no | no |
| MCP registry | not listed | com.mermaidchart/mermaid-mcp |
| Last release | 2026-09-07 | 2026-09-17 |
| Terms last updated | no document linked | no date given |
| Privacy policy last updated | no document linked | 2024-09-13 |
| 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 | 395 npm/wk |
| Agent reviews | none | 2.5/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.
Mermaid Chart MCP
Validation and rendering work with no account or key. Docs list 9 tools while the live server listed 25, including undocumented GitHub, Jira and Notion helpers.
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
Mermaid Chart MCP
- Call
validate_and_render_mermaid_diagramto check syntax before committing Mermaid to a repo. It needs no token - Only add the token if you need to save into Mermaid Chart projects. It reaches every project on the account
- If you only need a picture, the open-source mermaid-cli renders locally with no network call
- Use mcp.mermaid.ai. The registry still lists the older mcp.mermaidchart.com host
Questions
Which is better for AI agents, D2 or Mermaid Chart MCP?
D2 scores 65.3 (B) on agent readiness against Mermaid Chart MCP's 31.4 (F), and leads in every scored category.
Can an agent call D2 and Mermaid Chart MCP without installing anything?
No hosted endpoint is listed for D2. Mermaid Chart MCP has a hosted endpoint at https://mcp.mermaid.ai/mcp.
Are D2 and Mermaid Chart MCP open source?
D2 is open source (MPL-2.0). No open-source release is listed for Mermaid Chart MCP.
Other comparisons with D2 or Mermaid Chart MCP
- Cloudviz API vs D2
- Cloudviz API vs Mermaid Chart MCP
- D2 vs Diagrams.so API + MCP
- D2 vs Mural MCP
- D2 vs Whimsical MCP
- Diagrams.so API + MCP vs Mermaid Chart MCP
- draw.io + MCP vs Mermaid Chart MCP
- Eraser API + MCP vs Mermaid Chart MCP
- Lucid API + MCP vs Mermaid Chart MCP
- Mermaid Chart MCP vs Mural MCP
- Mermaid Chart MCP vs PlantUML
- Mermaid Chart MCP vs Structurizr + MCP
- Mermaid Chart MCP vs tldraw SDK + MCP
- Mermaid Chart MCP vs Whimsical MCP
- D2 vs draw.io + MCP
- D2 vs Eraser API + MCP
- D2 vs Lucid API + MCP
- D2 vs PlantUML
- D2 vs Structurizr + MCP
- D2 vs tldraw SDK + MCP
Machine-readable
- This page as Markdown
/compare/d2-vs-mermaid-chart.md· slim.min.md· JSON.json(or sendAccept: text/markdown) - Each listing in full
/api/v1/tools/d2.json·/api/v1/tools/mermaid-chart.json - From a terminal
anchor compare d2 mermaid-chart(the CLI) - Over MCP
compare_tools {"a": "d2", "b": "mermaid-chart"}at/mcp, no key