D2

v0.10.1
io.github.d2lang/d2 Checked 2 hours ago Published 17 hours ago

Look up D2 syntax, render diagrams locally, and review animations with storyboards and motion lint.

PyPI (uvx) verified

Requires uv (https://docs.astral.sh/uv/)

Run in a terminal
claude mcp add d2 -- uvx d2lang==0.10.1 mcp
Add to claude_desktop_config.json
{
  "mcpServers": {
    "d2": {
      "args": [
        "d2lang==0.10.1",
        "mcp"
      ],
      "command": "uvx"
    }
  }
}
Add to ~/.cursor/mcp.json
{
  "mcpServers": {
    "d2": {
      "args": [
        "d2lang==0.10.1",
        "mcp"
      ],
      "command": "uvx"
    }
  }
}
Add to .vscode/mcp.json
{
  "servers": {
    "d2": {
      "args": [
        "d2lang==0.10.1",
        "mcp"
      ],
      "command": "uvx",
      "type": "stdio"
    }
  }
}
Add to ~/.codex/config.toml
[mcp_servers.d2]
command = "uvx"
args = ["d2lang==0.10.1", "mcp"]

For AI agents

  1. Pick the user's MCP client and apply the matching config from the first install method (it is the one verified by the smoke test when available).
  2. Restart or reload the client so it starts the server.
  3. Verify: the server should expose these tools: guide, check, lint_motion, render, storyboard.
  4. If it fails, check that the required runtime is installed (uv (https://docs.astral.sh/uv/)) and that the values above are set.

Machine-readable: install.md · manifest.json