D2 MCP Server

Official registry Productivity

Create, edit, validate, render, and export D2 diagrams with confined workspace access.

Install

Add this to your client's MCP configuration (Claude Desktop: claude_desktop_config.json; Cursor: .cursor/mcp.json; VS Code and others use the same "mcpServers" shape).

OCI package ghcr.io/recursivefunctions/d2mcp:0.5.0
Claude Code
claude mcp add d2-mcp-server -- docker run -i --rm ghcr.io/recursivefunctions/d2mcp:0.5.0
JSON configuration (Claude Desktop, Cursor, VS Code)
{
    "mcpServers": {
        "d2-mcp-server": {
            "command": "docker",
            "args": [
                "run",
                "-i",
                "--rm",
                "ghcr.io/recursivefunctions/d2mcp:0.5.0"
            ]
        }
    }
}

Frequently asked questions

What is D2 MCP Server?

Create, edit, validate, render, and export D2 diagrams with confined workspace access.

How do I install D2 MCP Server?

It runs on your machine. In Claude Code: claude mcp add d2-mcp-server -- docker run -i --rm ghcr.io/recursivefunctions/d2mcp:0.5.0. For other clients, paste the JSON configuration from this page into their MCP settings.

Does D2 MCP Server need an API key?

Its registry entry lists no required key or secret. Some features may still need an account with the service it connects to.

Is D2 MCP Server open source?

Its code is public on GitHub, but the repository does not declare a standard license.

Who maintains D2 MCP Server?

It is published by recursivefunctions. AI.tn lists it but does not maintain or endorse it.

From the official MCP Registry. Listing is not an endorsement: review a server's code and permissions before giving it access to your data.