Spec Driven Development
MCP Server that facilitates spec-driven development workflows, not just Vibe Coding.
Description from the maker (original English)
Create, edit, validate, render, and export D2 diagrams with confined workspace access.
These three are never merged into one score: opinions, measurements and popularity are different things.
We have not written a plain-language summary for this one yet. Below are the facts we read from the registry.
Pick the AI app you use, then copy the settings.
You need
Which app do you use?
Pick your app above. We remember it, so next time the button says “Install in …”.
Open Claude Desktop → Settings → Developer → Edit Config, and paste this into claude_desktop_config.json
{
"mcpServers": {
"d2mcp": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"ghcr.io/recursivefunctions/d2mcp:0.5.0"
]
}
}
}Run this in your terminal
claude mcp add d2mcp -- docker run -i --rm ghcr.io/recursivefunctions/d2mcp:0.5.0Paste into .cursor/mcp.json in your project, or ~/.cursor/mcp.json
{
"mcpServers": {
"d2mcp": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"ghcr.io/recursivefunctions/d2mcp:0.5.0"
]
}
}
}Your browser asks to open the app, then the app shows the settings and asks you to confirm. Key values are left empty for you to fill in.
Paste into .vscode/mcp.json in your project
{
"servers": {
"d2mcp": {
"type": "stdio",
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"ghcr.io/recursivefunctions/d2mcp:0.5.0"
]
}
}
}Your browser asks to open the app, then the app shows the settings and asks you to confirm. Key values are left empty for you to fill in.
This one runs on your computer, and ChatGPT can only connect to servers on the internet. Pick another app.
Your choice stays on this device in a cookie; no account needed.
These settings are generated from the maker’s registry entry. If the README says otherwise, follow the README.
Runs on your computer; the tool list appears in your AI app after you install it.
We check information anyone can see; we have not read the code. Checks that do not apply are left out of the count. · Checked Nov 6, 2026
The registry name was verified with the GitHub account recursivefunctions, which owns the repo
We have not read this repo from GitHub yet
We have not read this repo from GitHub yet
This one runs on your computer; there is no internet endpoint
Runs on your computer and uses local settings instead
Runs on your computer; we can only read tool lists from internet endpoints
Compared with every active server in this category in the registry. Stars count only when the publisher owns the repo.
It passed 1 of 1 applicable basic checks. We have not read the code. Before adding a key or token, see what access the server asks for and use a key with only the permissions you need.
The registry does not list a required key, though some servers ask you to sign in on first use.
It runs on your computer. Your AI app starts it when needed, and data does not pass through the maker’s servers (unless it calls an online service itself).
The GitHub repo last changed –, and the latest version (0.5.0) reached the registry 40 days ago.
Apps that support MCP, such as Claude Desktop, Claude Code, Cursor and VS Code. You also need Docker on your computer.
In the same category: Spec Driven Development, Remote Desktop Commander, Safe Fetch
Servers in the same category from other makers, sorted by stars.
Reading a card:★ GitHub starsiThree pillars: reviews · checks · usageiUpdated = latest version published to the registryi
MCP Server that facilitates spec-driven development workflows, not just Vibe Coding.
Remote Desktop Commander: use files, terminal and processes on your own computers from any AI app.
MCP server for fetching URLs, safe against SSRF, DNS rebinding, and redirect-to-internal attacks.
Copied from the maker’s repo as written. PopNx MCP has not reviewed or endorsed it. HTML, images and scripts are removed. Links lead off this site.
A Model Context Protocol (MCP) server that provides D2 diagram generation and manipulation capabilities.
D2 is a modern diagram scripting language that turns text to diagrams. This MCP server allows AI assistants like Claude to create, render, export, and save D2 diagrams programmatically.
The server provides 16 MCP tools for complete-source authoring, validation, rendering, embedded D2 guidance, and incremental Oracle editing.
With the new Oracle API integration, AI assistants can now build and modify diagrams incrementally, making it perfect for:
d2mcp/
├── cmd/ # Application entry point ├── internal/ │ ├── domain/ # Business entities and interfaces │ │ ├── entity/ # Domain entities │ │ └── repository/ # Repository interfaces │ ├── usecase/ # Business logic │ ├── infrastructure/ # External implementations │ │ ├── d2/ # D2 library integration │ │ └── mcp/ # MCP server implementation │ └── presentation/ # MCP handlers │ └── handler/ # Tool handlers └── pkg/ # Public packages
All export formats use bundled Go renderers; no rsvg-convert, ImageMagick, or Chromium installation is required.
The embedded capability catalog is based on the official D2 language tour, D2 API documentation, and D2 v0.9.0 release.
# Clone the repository
git clone https://github.com/recursivefunctions/d2mcp.git cd d2mcp
make build
make build-all
go install github.com/recursivefunctions/d2mcp/cmd@latest
docker run --rm -i \
--mount type=bind,src="$PWD",dst=/workspace \ ghcr.io/recursivefunctions/d2mcp:0.5.0
The image defaults to STDIO transport and confines local imports, assets, and exports to the mounted /workspace directory. The container runs as a non-root user, so the mounted directory must be writable by that user when saving exports.
Release tags publish the server as io.github.RecursiveFunctions/d2mcp in the official MCP Registry. Registry publication and editor-gallery indexing are separate, so a newly published version might not appear immediately in an editor's search results.
Compatible clients can also use the portable .mcp.json configuration in this repository. It requires Docker and mounts the current workspace at /workspace.
Client configurations are generated from server.json, so they always use the same immutable container version.
| Client | Installation |
|---|---|
| VS Code | Use the installation URL, Official MCP Registry, or companion extension |
| VSCodium and Positron | Install the RecursiveFunctions.d2mcp companion extension from Open VSX |
| Cursor | Use the generated MCP configuration |
| Windsurf | Use the generated MCP configuration |
| Trae | Use the generated install URL or project configuration |
| Antigravity | Use the generated MCP configuration |
| Zed | Use the generated manual configuration while Zed completes Official Registry integration |
| Kilo Code | Install from Kilo Marketplace after its catalog PR is accepted, or use the portable configuration |
| Cline | Install from Cline Marketplace after curator approval, or follow the Docker instructions above |
Run make generate-adapters after changing release metadata. CI runs make verify-adapters and rejects stale client configurations.
# Simple build
make build
make run
make build-all
Add to your Claude Desktop configuration file:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json Windows: %APPDATA%\Claude\claude_desktop_config.json Linux: ~/.config/Claude/claude_desktop_config.json
For STDIO transport (recommended for Claude Desktop):
{
"mcpServers": { "d2mcp": { "command": "/path/to/d2mcp", "args": ["-transport=stdio"] } } }
For SSE transport:
{
"mcpServers": { "d2mcp": { "command": "/path/to/d2mcp", "args": ["-transport=sse", "-addr=:3000"] } } }
Replace /path/to/d2mcp with the actual path to your built binary.
# Run the MCP server (stdio transport)
./d2mcp -transport=stdio
./d2mcp
./d2mcp -transport=sse
./d2mcp -transport=streamable
d2mcp now supports multiple transport protocols:
The traditional stdio transport for direct process communication:
./d2mcp -transport=stdio
HTTP-based transport that allows network connectivity:
# Basic SSE mode (defaults to :3000)
./d2mcp -transport=sse
./d2mcp -transport=sse \ -addr=:8080 \ -base-url=http://localhost:8080 \ -base-path=/mcp \ -keep-alive=30
SSE Configuration Options:
-addr: Address to listen on (default: ":3000")-base-url: Base URL for SSE endpoints (auto-generated if not specified)-base-path: Base path for SSE endpoints (default: "/mcp")-keep-alive: Keep-alive interval in seconds (default: 30)SSE Endpoints: When running in SSE mode, the following endpoints are available:
http://localhost:3000/mcp/ssehttp://localhost:3000/mcp/messageThe modern HTTP-based transport that simplifies bidirectional communication:
# Basic Streamable HTTP mode
./d2mcp -transport=streamable
./d2mcp -transport=streamable \ -addr=:8080 \ -endpoint-path=/mcp \ -heartbeat-interval=30 \ -stateless
Streamable HTTP Configuration Options:
-addr: Address to listen on (default: ":3000")-endpoint-path: Endpoint path for Streamable HTTP (default: "/mcp")-heartbeat-interval: Heartbeat interval in seconds (default: 30)-stateless: Enable stateless mode (default: false)Streamable HTTP Endpoint: When running in Streamable HTTP mode, a single endpoint handles all communication:
http://localhost:3000/mcpThe server confines imports, local images, and saved files to named workspace roots. The default root is the server's current working directory.
./d2mcp -transport=stdio \
-workspace-root=docs=/workspace/docs \ -workspace-root=diagrams=/workspace/diagrams \ -remote-asset-max-bytes=10485760 \ -remote-asset-timeout=30s
-workspace-root is repeatable. Local path traversal and symlink escapes are rejected. Remote assets require HTTPS and are subject to DNS/IP, redirect, timeout, MIME, and response-size checks; loopback and private-network destinations are rejected.
Create a new diagram with optional initial content (unified approach):
Empty diagram (for Oracle API workflow):
{
"id": "my-diagram" }
With initial D2 content and a named workspace for imports/assets:
{
"id": "my-diagram", "content": "a -> b: Hello\nserver: {shape: cylinder}", "workspace_root": "diagrams" }
Export a diagram using a bundled renderer and layout engine:
{
"diagramId": "my-diagram", "format": "png", "layout": "tala", "themeId": 200, "scale": 1.5, "maxPixels": 33554432 }
Formats are svg, png, pdf, pptx, gif, and ascii (txt is an alias). Layouts are dagre, elk, and tala. Typed options cover engine spacing, themes and overrides, bundled fonts, padding, scale, sketch mode, animation, board selection, and resource limits.
PDF, PPTX, GIF, and optionally animated SVG compose bounded descendant boards. PNG and ASCII produce one board; use boardPath to select one from a composition.
Save a diagram inside a configured workspace root:
{
"diagramId": "my-diagram", "format": "pdf", "workspace_root": "diagrams", "path": "exports/output.pdf" }
If path is omitted, output is written below d2mcp_output/ in the selected root.
Validate raw D2 source or the current source of a stored diagram. Supply exactly one input:
{
"content": "a: {\n b" }
{
"diagram_id": "my-diagram" }
Invalid D2 returns a successful structured result with valid: false and compiler diagnostics. Simple, unambiguous terminator errors may also include repaired_content; validation never modifies a stored diagram.
Complete D2 source is canonical, so every bundled v0.9 language feature can be authored without waiting for a specialized structured tool.
{"diagram_id": "my-diagram"}
{
"diagram_id": "my-diagram", "content": "direction: right\nclient -> api -> database" }
Updates compile first and replace atomically. Invalid drafts return structured diagnostics and leave stored source unchanged.
{"content": "api:{db}"}
Returns formatted source without creating or changing a diagram.
{"query": "sequence diagrams", "limit": 5}
d2_help searches the embedded v0.9.0 reference or returns an exact topic by ID. d2_capabilities lists its categories and MCP resource URIs. Embedded resources cover the core language, connections, reusable definitions, visuals, rich text, structured/sequence/grid diagrams, composition, layouts, and exports.
The Ora
Only the beginning is shown; read the rest in the repo