Diagrams MCP

io.github.mskryPublished by GitHub account mskryv0.1.2Updated Nov 2, 2026

Generate cloud architecture diagrams, flowcharts, and sequence diagrams.

VerifiedStreamable HTTPWeb executableCloud & InfrastructureMedia & Design

Overview

AI-generated overview

Generates cloud architecture diagrams, flowcharts, sequence and UML diagrams as images using mingrammer/diagrams, Mermaid and PlantUML.

What you can do
  • Discover diagram nodes: list providers, service categories and node classes, and search nodes by keyword across clouds.
  • Render cloud architecture diagrams from Python code using the mingrammer/diagrams library.
  • Render Mermaid definitions such as flowcharts, sequence, class, ER, state and Gantt charts.
  • Render PlantUML definitions such as sequence, class, component, activity and deployment diagrams.
  • Compare services across clouds: find equivalent nodes and list infrastructure role categories.
  • Read reference resources on diagram, edge, cluster, Mermaid and PlantUML syntax.
When to use it
Useful when you want an assistant to turn a described system into a picture: AWS, GCP, Azure or Kubernetes architecture, flowcharts, sequence diagrams or UML, without drawing them by hand.
Requirements
Either the hosted remote endpoint or a local install via uvx or pip (Python). Local rendering needs Graphviz; Mermaid CLI (Node.js) and Java plus PlantUML are optional for those engines. No accounts or API keys are declared.
Before you install
The render_diagram tool executes a Python script in a sandboxed subprocess, so review generated code before running it. The hosted endpoint receives your diagram code and definitions; use the local mode if that content is sensitive.

Installation

In SourceWeft

  1. Open Diagrams MCP in the dashboard and add it to a workspace.
  2. Enable the server for the chats that should use its tools.

Web executable via Streamable HTTP. Remote servers run from the web runtime once configured in a workspace.

Use with an agent

Paste this prompt into Claude Code, Codex, Cursor or another agent — or into SourceWeft chat. The agent reads this server's install guide, shows you its publisher, endpoint and sign-in, and adds it to your client once you agree. Keys never go into a command.

Read https://sourceweft.com/mcp/io.github.mskry%2Fdiagrams-mcp-server/install.md and connect the MCP server it describes to my client. Before changing any config, show me its publisher, endpoint and sign-in method and wait for my OK. Never put an API key in a command or in a file I would commit; ask me where it should come from.

Read the install guide the agent follows

Other MCP clients

Add this to your client's mcpServers config.

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

README

diagrams-mcp-server

[PyPI] [CI]

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

Local Installation

Prerequisites

Graphviz is required for the default local/in-process rendering mode. Mermaid CLI and PlantUML are optional — install them only if you need those specific rendering engines locally.

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
Install the server

Via uvx (recommended):

bash
uvx diagrams-mcp-server

Via pip:

bash
pip install diagrams-mcp-server

From source:

bash
pip install git+https://github.com/ByteOverDev/diagrams-mcp.git
Configure your MCP client
Claude Desktop

Add to your claude_desktop_config.json (Settings → Developer → Edit Config):

uvx (recommended):

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

pip:

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

Run:

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

Or add to your .mcp.json:

uvx (recommended):

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

pip:

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

Add to your .cursor/mcp.json:

uvx (recommended):

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

pip:

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

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

uvx (recommended):

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

pip:

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

Add to your .vscode/mcp.json:

uvx (recommended):

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

pip:

json
{  "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. aws → compute, 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. EC2 → ComputeEngine 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"

python
from diagrams import Diagram, Clusterfrom diagrams.aws.network import ALBfrom diagrams.aws.compute import ECSfrom 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]

plantuml
@startumlClient -> "API Gateway": POST /login"API Gateway" -> "Auth Service": Validate credentials"Auth Service" --> "API Gateway": JWT token"API Gateway" --> Client: 200 OK + tokenClient -> "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

bash
# Clone and installgit clone https://github.com/ByteOverDev/diagrams-mcp.gitcd diagrams-mcppip install -e ".[dev]"
# Run testspytest
# Lint and formatruff check .ruff format .
# Run the MCP server locally (stdio mode)diagrams-mcp-server

Split Facade/Renderer Mode

For hosted deployments, the MCP server can run as a lightweight facade that delegates render work to a separate renderer service. This keeps the always-on MCP process small while Graphviz, Chromium, Mermaid CLI, Java, and PlantUML live only in the renderer image.

bash
# Terminal 1: renderer serviceRENDERER_HOST=0.0.0.0 RENDERER_PORT=8001 diagrams-renderer-server
# Terminal 2: HTTP MCP facade delegating to the rendererFASTMCP_TRANSPORT=http \FASTMCP_HOST=0.0.0.0 \FASTMCP_PORT=8000 \DIAGRAMS_RENDERER_MODE=remote \DIAGRAMS_RENDERER_URL=http://127.0.0.1:8001 \diagrams-mcp-server

Docker/Railway examples are included:

FilePurpose
Dockerfile.facadeSlim MCP facade image without renderer-only binaries
Dockerfile.rendererRenderer image with Graphviz, Chromium, Mermaid CLI, Java, and PlantUML
railway.facade.tomlExample Railway facade service config
railway.renderer.tomlExample Railway renderer service config

Key environment variables:

VariablePurpose
DIAGRAMS_RENDERER_MODE=remoteMakes the facade use the HTTP renderer service
DIAGRAMS_RENDERER_URLRenderer base URL, for example http://diagrams-renderer.railway.internal:8080
DIAGRAMS_IMAGE_STORE_DIROptional file-backed temporary image store directory
BASE_URLOptional public base URL used when returning absolute download links

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

Source: README.md at commit 121aa4b

Tools

0
SourceWeft has not read this server's tools yet.

Version history

1
  1. v0.1.2LatestSep 16, 2026

Score

75% of the applicable checks met

How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.

  • Reached in the last 30 daysRequired25 pts
  • Auth declaredRequired10 pts
  • Tools listedRequired15 pts

    Answer tools/list without a credential, or ship a package that starts in a sandbox without one.

  • DescriptionRequired15 pts
  • Logo10 pts
  • Documentation15 pts
  • License10 pts

    Declare a license in the repository or the registry entry.