D2
v0.10.1Look 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 mcpAdd 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
- 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).
- Restart or reload the client so it starts the server.
- Verify: the server should expose these tools: guide, check, lint_motion, render, storyboard.
- 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