Sponsored by Deepsite.site

Diagrams

Created By
ByteOverDev22 days ago
MCP server for generating cloud architecture diagrams, flowcharts, sequence diagrams, and more — powered by mingrammer/diagrams, Mermaid, and PlantUML.
Content

diagrams-mcp-server

PyPI CI Railway

MCP server for generating cloud architecture diagrams, flowcharts, sequence diagrams, and more — powered by three rendering engines: mingrammer/diagrams, Mermaid, and PlantUML.

Example diagram

Getting Started

Connect to the public hosted server — no installation required. All rendering engines and dependencies are pre-installed.

Claude Desktop

Add to your claude_desktop_config.json (SettingsDeveloperEdit Config):

{
  "mcpServers": {
    "diagrams-mcp": {
      "url": "https://diagrams-mcp-production.up.railway.app/mcp"
    }
  }
}
Claude Code (CLI)

Run:

claude mcp add diagrams-mcp https://diagrams-mcp-production.up.railway.app/mcp

Or add to your .mcp.json:

{
  "mcpServers": {
    "diagrams-mcp": {
      "url": "https://diagrams-mcp-production.up.railway.app/mcp"
    }
  }
}
Cursor

Add to your .cursor/mcp.json:

{
  "mcpServers": {
    "diagrams-mcp": {
      "url": "https://diagrams-mcp-production.up.railway.app/mcp"
    }
  }
}
Windsurf

Add to your ~/.codeium/windsurf/mcp_config.json:

{
  "mcpServers": {
    "diagrams-mcp": {
      "serverUrl": "https://diagrams-mcp-production.up.railway.app/mcp"
    }
  }
}
VS Code

Add to your .vscode/mcp.json:

{
  "servers": {
    "diagrams-mcp": {
      "type": "http",
      "url": "https://diagrams-mcp-production.up.railway.app/mcp"
    }
  }
}

Local Installation

Prerequisites

Graphviz is required for the core diagram rendering engine. Mermaid CLI and PlantUML are optional — install them only if you need those specific rendering engines.

DependencyRequired forInstall
Graphvizrender_diagram (cloud architecture)brew install graphviz
Mermaid CLIrender_mermaid (flowcharts, sequence, etc.)npm install -g @mermaid-js/mermaid-cli
Java + PlantUMLrender_plantuml (UML diagrams)brew install openjdk + download plantuml.jar

Note: The hosted server has all dependencies pre-installed. Local prerequisites only apply if you're running the server yourself.

Install the server

Via uvx (recommended):

uvx diagrams-mcp-server

Via pip:

pip install diagrams-mcp-server

From source:

pip install git+https://github.com/ByteOverDev/diagrams-mcp.git

Configure your MCP client

Claude Desktop

Add to your claude_desktop_config.json (SettingsDeveloperEdit Config):

uvx (recommended):

{
  "mcpServers": {
    "diagrams-mcp": {
      "command": "uvx",
      "args": ["diagrams-mcp-server"]
    }
  }
}

pip:

{
  "mcpServers": {
    "diagrams-mcp": {
      "command": "diagrams-mcp-server"
    }
  }
}
Claude Code (CLI)

Run:

claude mcp add diagrams-mcp -- uvx diagrams-mcp-server

Or add to your .mcp.json:

uvx (recommended):

{
  "mcpServers": {
    "diagrams-mcp": {
      "command": "uvx",
      "args": ["diagrams-mcp-server"]
    }
  }
}

pip:

{
  "mcpServers": {
    "diagrams-mcp": {
      "command": "diagrams-mcp-server"
    }
  }
}
Cursor

Add to your .cursor/mcp.json:

uvx (recommended):

{
  "mcpServers": {
    "diagrams-mcp": {
      "command": "uvx",
      "args": ["diagrams-mcp-server"]
    }
  }
}

pip:

{
  "mcpServers": {
    "diagrams-mcp": {
      "command": "diagrams-mcp-server"
    }
  }
}
Windsurf

Add to your ~/.codeium/windsurf/mcp_config.json:

uvx (recommended):

{
  "mcpServers": {
    "diagrams-mcp": {
      "command": "uvx",
      "args": ["diagrams-mcp-server"]
    }
  }
}

pip:

{
  "mcpServers": {
    "diagrams-mcp": {
      "command": "diagrams-mcp-server"
    }
  }
}
VS Code

Add to your .vscode/mcp.json:

uvx (recommended):

{
  "servers": {
    "diagrams-mcp": {
      "type": "stdio",
      "command": "uvx",
      "args": ["diagrams-mcp-server"]
    }
  }
}

pip:

{
  "servers": {
    "diagrams-mcp": {
      "type": "stdio",
      "command": "diagrams-mcp-server"
    }
  }
}

Available Tools

Discovery

  • list_providers()list[str] — List all diagram providers (aws, gcp, k8s, azure, onprem, etc.)
  • list_services(provider)list[str] — List service categories within a provider (e.g. awscompute, database, network)
  • list_nodes(provider, service)list[dict] — List node classes for a provider.service pair with import paths
  • search_nodes(query)list[dict] — Search for nodes by keyword across all providers (e.g. "postgres", "lambda")

Rendering

  • render_diagram(code)Image (PNG) — Execute a Python script using mingrammer/diagrams in a sandboxed subprocess. Returns a rendered cloud architecture diagram.
  • render_mermaid(definition)Image (PNG/SVG) — Render a Mermaid diagram definition (flowcharts, sequence, class, ER, state, Gantt, and more).
  • render_plantuml(definition)Image (PNG) — Render a PlantUML diagram definition (sequence, class, component, activity, state, deployment).

Cross-Provider Equivalence

  • find_equivalent(node, target_provider?)dict — Find equivalent services across cloud providers (e.g. EC2ComputeEngine on GCP).
  • list_categories()list[dict] — List all 30 infrastructure role categories with mapped nodes across providers.

Resources

The server provides reference documentation accessible via MCP resource URIs:

URIDescription
diagrams://reference/diagramDiagram constructor parameters, defaults, and usage
diagrams://reference/edgeEdge operators, labels, styling, and chaining
diagrams://reference/clusterCluster nesting, styling, and graph attributes
diagrams://reference/mermaidMermaid syntax examples for 6 diagram types
diagrams://reference/plantumlPlantUML syntax examples for 6 diagram types

Examples

Cloud Architecture (mingrammer/diagrams)

"Draw an AWS architecture with an ALB routing to two ECS services, backed by RDS and ElastiCache"

from diagrams import Diagram, Cluster
from diagrams.aws.network import ALB
from diagrams.aws.compute import ECS
from diagrams.aws.database import RDS, ElastiCache

with Diagram("ECS Service", direction="LR"):
    lb = ALB("ALB")

    with Cluster("ECS Cluster"):
        services = [ECS("Web"), ECS("API")]

    lb >> services
    services[0] >> ElastiCache("Cache")
    services[1] >> RDS("Database")

Flowchart (Mermaid)

"Create a flowchart showing a CI/CD pipeline"

Mermaid flowchart

Sequence Diagram (PlantUML)

"Show the authentication flow between a client, API gateway, and auth service"

PlantUML sequence diagram

@startuml
Client -> "API Gateway": POST /login
"API Gateway" -> "Auth Service": Validate credentials
"Auth Service" --> "API Gateway": JWT token
"API Gateway" --> Client: 200 OK + token
Client -> "API Gateway": GET /data (Bearer token)
"API Gateway" -> "Auth Service": Verify token
"Auth Service" --> "API Gateway": Valid
"API Gateway" --> Client: 200 OK + data
@enduml

Development

# Clone and install
git clone https://github.com/ByteOverDev/diagrams-mcp.git
cd diagrams-mcp
pip install -e ".[dev]"

# Run tests
pytest

# Lint and format
ruff check .
ruff format .

# Run the MCP server locally (stdio mode)
diagrams-mcp-server

Supported Providers

The render_diagram tool supports all providers from the mingrammer/diagrams library, including:

AWS, GCP, Azure, Kubernetes, On-Premise, AlibabaCloud, OCI, OpenStack, DigitalOcean, Elastic, Outscale, Generic, and Custom nodes.

Use list_providers() and search_nodes(query) to discover available nodes.

License

MIT

Server Config

{
  "mcpServers": {
    "diagrams-mcp": {
      "command": "uvx",
      "args": [
        "diagrams-mcp-server"
      ]
    }
  }
}
Recommend Servers
TraeBuild with Free GPT-4.1 & Claude 3.7. Fully MCP-Ready.
MCP AdvisorMCP Advisor & Installation - Use the right MCP server for your needs
Y GuiA web-based graphical interface for AI chat interactions with support for multiple AI models and MCP (Model Context Protocol) servers.
EdgeOne Pages MCPAn MCP service designed for deploying HTML content to EdgeOne Pages and obtaining an accessible public URL.
BlenderBlenderMCP connects Blender to Claude AI through the Model Context Protocol (MCP), allowing Claude to directly interact with and control Blender. This integration enables prompt assisted 3D modeling, scene creation, and manipulation.
Zhipu Web SearchZhipu Web Search MCP Server is a search engine specifically designed for large models. It integrates four search engines, allowing users to flexibly compare and switch between them. Building upon the web crawling and ranking capabilities of traditional search engines, it enhances intent recognition capabilities, returning results more suitable for large model processing (such as webpage titles, URLs, summaries, site names, site icons, etc.). This helps AI applications achieve "dynamic knowledge acquisition" and "precise scenario adaptation" capabilities.
AiimagemultistyleA Model Context Protocol (MCP) server for image generation and manipulation using fal.ai's Stable Diffusion model.
MiniMax MCPOfficial MiniMax Model Context Protocol (MCP) server that enables interaction with powerful Text to Speech, image generation and video generation APIs.
DeepChatYour AI Partner on Desktop
Playwright McpPlaywright MCP server
RedisA Model Context Protocol server that provides access to Redis databases. This server enables LLMs to interact with Redis key-value stores through a set of standardized tools.
Serper MCP ServerA Serper MCP Server
ChatWiseThe second fastest AI chatbot™
Howtocook Mcp基于Anduin2017 / HowToCook (程序员在家做饭指南)的mcp server,帮你推荐菜谱、规划膳食,解决“今天吃什么“的世纪难题; Based on Anduin2017/HowToCook (Programmer's Guide to Cooking at Home), MCP Server helps you recommend recipes, plan meals, and solve the century old problem of "what to eat today"
WindsurfThe new purpose-built IDE to harness magic
Tavily Mcp
Baidu Map百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Amap Maps高德地图官方 MCP Server
Visual Studio Code - Open Source ("Code - OSS")Visual Studio Code
CursorThe AI Code Editor
Jina AI MCP ToolsA Model Context Protocol (MCP) server that integrates with Jina AI Search Foundation APIs.