D2 Diagramming

Integrates with Terrastruct's D2 diagramming language to generate technical diagrams, flowcharts, and architectural visualizations

i2y 28
Claude CodeClaude DesktopGeneric
View source ↗

This D2MCP server by Yasushi Itoh provides AI assistants with direct access to D2 diagram creation and rendering capabilities, integrating with Terrastruct's D2 declarative diagramming language to generate SVG, PNG, and PDF outputs. The implementation supports 20+ built-in themes, programmatic diagram creation with in-memory storage, and file-based operations for persistent diagram management, using external tools like rsvg-convert or ImageMagick for non-SVG format conversion. Built with clean architecture patterns and comprehensive error handling, it enables natural language diagram generation workflows where users can create technical diagrams, flowcharts, and architectural visualizations through conversational interfaces without directly writing D2 syntax.

Source

Repository: https://github.com/i2y/d2mcp

Maintain D2 Diagramming?

Let people know it's listed here — add the badge (live metrics, light/dark aware) or a plain link to your README or docs.

[D2 Diagramming on getagentictools](https://getagentictools.com/mcp/i2y-d2mcp?ref=badge)