Create, validate, and render diagrams from D2 (Declarative Diagramming) code into SVG and PNG formats.
A Model Context Protocol (MCP) server for working with D2: Declarative Diagramming, enabling seamless integration of diagram creation and validation into your development workflow.
Tools:
go
go install github.com/h0rv/d2-mcp@latest
git clone https://github.com/h0rv/d2-mcp.git
cd d2-mcp
go build .
docker build . -t d2-mcp
# Run in stdio mode (default - for MCP clients)
docker run --rm -i d2-mcp
# Run in stdio mode with filesystem access
docker run --rm -i -v $(pwd):/data d2-mcp
# Run in SSE mode (HTTP server)
docker run --rm SSE_MODE=true -p 8080:8080 -e d2-mcp
# Run in SSE mode with filesystem access
docker run --rm -e SSE_MODE=true -p 8080:8080 -v $(pwd):/data d2-mcp
# Run in stdio mode (default - for MCP clients)
docker run --rm -i ghcr.io/h0rv/d2-mcp:main
# Run in stdio mode with filesystem access
docker run --rm -i -v $(pwd):/data ghcr.io/h0rv/d2-mcp:main
# Run in SSE mode (HTTP server)
docker run --rm -e SSE_MODE=true -p 8080:8080 ghcr.io/h0rv/d2-mcp:main
# Run in SSE mode with filesystem access
docker run --rm -e SSE_MODE=true -p 8080:8080 -v $(pwd):/data ghcr.io/h0rv/d2-mcp:main
MacOS:
# Claude Desktop
$EDITOR ~/Library/Application\ Support/Claude/claude_desktop_config.json
# OTerm:
$EDITOR ~/Library/Application\ Support/oterm/config.json
Add the d2
MCP server to your respective MCP Clients config:
Using Binary:
{
"mcpServers": {
"d2": {
"command": "/YOUR/ABSOLUTE/PATH/d2-mcp",
"args": ["--image-type", "png"]
}
}
}
Using Binary with file output:
{
"mcpServers": {
"d2": {
"command": "/YOUR/ABSOLUTE/PATH/d2-mcp",
"args": ["--image-type", "png", "--write-files"]
}
}
}
Using Docker:
{
"mcpServers": {
"d2": {
"command": "docker",
"args": ["run", "--rm", "-i", "d2-mcp"]
}
}
}
Using Docker with filesystem access:
{
"mcpServers": {
"d2": {
"command": "docker",
"args": ["run", "--rm", "-i", "-v", "./:/data", "d2-mcp"]
}
}
}
npx @modelcontextprotocol/inspector /YOUR/ABSOLUTE/PATH/d2-mcp/d2-mcp
Enable AI Agents to fix build failures from CircleCI.
A platform-agnostic server for scalable mobile automation and development across iOS, Android, simulators, and emulators.
A demonstration tool showcasing potential security attack vectors against the Model Control Protocol (MCP).
A universal control plane for managing MCP servers and providing intelligent tool discovery for AI agents.
An unofficial MCP server plugin for remote control of Unreal Engine using AI tools.
A knowledge management tool for code repositories using vector embeddings, powered by a local Ollama service.
Interacting with Phabricator API
Provides local access to Cursor chat history for AI analysis and insights, with no external services or API keys required.
Advanced computer vision and object detection MCP server powered by Dino-X, enabling AI agents to analyze images, detect objects, identify keypoints, and perform visual understanding tasks.
Perform advanced memory forensics analysis using Volatility3 via a conversational interface. Requires user-specified memory dump files.