d2mcp

i2y/d2mcp

3.4

If you are the rightful owner of d2mcp and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.

The D2 MCP Server is a Model Context Protocol server that facilitates the creation and manipulation of D2 diagrams through AI assistants.

Tools

Functions exposed to the LLM to take actions

d2_create

Create new diagrams with optional initial content

d2_export

Export diagrams to various formats (SVG, PNG, PDF)

d2_save

Save existing diagrams to files

d2_oracle_create

Create shapes and connections incrementally

d2_oracle_set

Set attributes on existing elements

d2_oracle_delete

Delete specific elements from diagrams

d2_oracle_move

Move shapes between containers

d2_oracle_rename

Rename diagram elements

d2_oracle_get_info

Get information about shapes, connections, or containers

d2_oracle_serialize

Get the current D2 text representation of the diagram

Prompts

Interactive templates invoked by user choice

No prompts

Resources

Contextual data attached and managed by the client

No resources