Skip to content
Grok

D2 for Grok

io.github.d2lang/d2

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

client:Grok transport:stdio runtime:pypi

Install D2 in Grok

.mcp.json (in your project root)

{
  "mcpServers": {
    "d2": {
      "type": "stdio",
      "command": "uvx",
      "args": [
        "d2lang"
      ]
    }
  }
}

Grok Build reads Claude Code's .mcp.json and Claude Desktop's config unchanged, so a server you have already set up there needs nothing new. The Grok web app and X integration do not take custom servers. Grok docs

D2 in other clients