Skip to main content
Glama

UML-MCP

Diagrams for AI assistants. A Model Context Protocol server that turns a description or diagram source into a rendered diagram, inside the chat.

Run Tests Deploy docs GitHub release License: MIT Python >=3.12,<3.16 GitHub stars Contributors Last commit

Docs · Quick start · Kroki diagrams · Interactive diagrams · Changelog · Contributing

It works as an MCP App

In clients that support MCP Apps, diagrams open in a viewer inside the chat (ui://uml-mcp/diagram-viewer): zoom, edit the source, switch theme and format, re-render, step through a batch, and export SVG, PNG, HTML or PDF. Clients without MCP Apps get the same diagram as an inline PNG and SVG.

Related MCP server: Draw.io MCP Server

Why UML-MCP

  • 52 diagram types. 37 through Kroki (UML, Mermaid, D2, Graphviz, C4, BPMN, ERD, TikZ...) and 15 interactive ones, including cloud and stack diagrams with real logos, architecture, workflow and sequence diagrams, 2D/3D LLM visualisations, database schemas, dependency graphs, statecharts, agent traces, C4 models and timelines.

  • Shows up in the chat. Every client gets an inline image plus links to the rendered file and an editable playground. Clients with MCP Apps also get an interactive viewer.

  • Ready to run. Hosted endpoints, or local with Docker or Helm; optional Entra ID / OAuth 2.1 SSO, audit logs and metrics. It scores 95/100 on the Manufact publishing checklist.

Quick start

Add the hosted server to your MCP client:

"uml-mcp": {
  "transport": "http",
  "url": "https://uml-mcp.vercel.app/mcp"
}

Then ask, for example, "Draw a sequence diagram of a user logging in through an API gateway."

Endpoint

URL

Primary (Vercel)

https://uml-mcp.vercel.app/mcp

Mirror (Manufact)

https://uml-mcp.antoineboucher.info/mcp

Ready-made configs: Cursor · VS Code / Copilot · Codex · Claude Desktop · Open WebUI · all clients. To run it yourself:

uv tool install uml-mcp && uml-mcp setup

The installation guide covers Docker, Helm and running from source.

To explore all 15 interactive types from a checkout, use the local viewer preview. Its compact example picker changes diagrams automatically and keeps export controls in the viewer.

Kroki diagrams

37 types through Kroki: UML (PlantUML), Mermaid, D2, Graphviz, C4, BPMN, ERD, TikZ and more. Call generate_uml / generate_uml_image with the diagram_type under each thumbnail. Source examples live in examples/ and at uml://examples; notation guides are in Diagram types. Regenerate this gallery with uv run python scripts/build_kroki_gallery.py.

classclass

sequencesequence

activityactivity

usecaseusecase

statestate

componentcomponent

deploymentdeployment

objectobject

plantumlplantuml

mermaidmermaid

d2d2

graphvizgraphviz

erderd

c4plantumlc4plantuml

bpmnbpmn

blockdiagblockdiag

seqdiagseqdiag

actdiagactdiag

nwdiagnwdiag

packetdiagpacketdiag

rackdiagrackdiag

dbmldbml

structurizrstructurizr

tikztikz

ditaaditaa

nomnomlnomnoml

svgbobsvgbob

goatgoat

pikchrpikchr

excalidrawexcalidraw

bytefieldbytefield

wavedromwavedrom

wirevizwireviz

symbolatorsymbolator

umletumlet

vegavega

vegalitevegalite

wirevizwireviz

Interactive diagrams

The plugins below ship with UML-MCP and are on by default. Each type renders to an interactive HTML page in the viewer and to a static SVG and PNG everywhere else.

Plugin

Types

What you get

D3

d3_force · d3_architecture · d3_topology

Force graphs and cloud diagrams with real provider and brand logos, routed with A*

Stack diagram

stack_diagram

Icon tiles, nested vendor and region groups, numbered request steps

Archify

archify_architecture · archify_workflow · archify_sequence

Colour-coded groups, legend, three presets, click to focus and trace the shortest path

LLM visualizer

llm_2d · llm_3d

Layer maps, autoencoder and GAN shapes, N× blocks and a rotatable 3D scene

Database schema

db_schema

ER diagrams from SQL DDL or JSON: column cards, crow's-foot keys at the column rows, search

Dependency graphs

dependency_graph

A project's dependency tree from package.json, pyproject.toml, requirements.txt or a lock file

Statechart

state_machine

XState-like machines as statecharts, and a simulator that fires events, with a step log and Undo

Agent traces

agent_trace

An agent run as a waterfall and a flow: LLM, tool and retrieval steps with tokens, cost, retries and the critical path

C4 model

c4_model

One model, three C4 levels: click a system to open its containers, a container for its components

Timeline

timeline

Roadmaps with swimlanes, phases, milestones, releases and dependency arrows; zoom from quarters to days

Each image links to the plugin guide. The complete smoke-test prompt covers every type, both themes, browser interactions and file exports.

D3 force graphd3_force

D3 cloud architectured3_architecture

D3 network topologyd3_topology

Stack diagramstack_diagram

Archify architecturearchify_architecture

Archify workflowarchify_workflow

Archify sequencearchify_sequence

LLM layer map in 2Dllm_2d

LLM layers in 3Dllm_3d

Database schemadb_schema

Project dependency graphdependency_graph

Statechartstate_machine

Agent trace waterfallagent_trace

C4 system contextc4_model

Project timelinetimeline

{
  "title": "SaaS stack",
  "groups": [{"id": "vercel", "name": "Vercel", "icon": "vercel"}],
  "nodes": [
    {"id": "user", "name": "User", "icon": "user"},
    {"id": "web", "name": "Next.js", "icon": "browser", "group": "vercel"},
    {"id": "db", "name": "Neon", "icon": "database"},
    {"id": "ci", "name": "GitHub Actions"}
  ],
  "edges": [
    {"from": "user", "to": "web", "label": "HTTPS", "step": 1},
    {"from": "web", "to": "db", "label": "SQL", "step": 2},
    {"from": "ci", "to": "web", "label": "deploy", "style": "dashed"}
  ]
}

Send that as stack_diagram and you get the GitHub and Vercel logos, two numbered steps and a dashed deploy edge. The plugins guide has example prompts for every type and shows how to write your own.

Tools

Tool

Purpose

generate_uml

Render one diagram: image, URL and playground link

generate_uml_image

The same as an inline chat image (PNG by default)

validate_uml

Check source before rendering; errors say how to fix it

list_diagram_types

The live catalog, including plugin types

generate_uml_batch

Many diagrams in one call

Resources (uml://types, uml://examples, uml://templates...), prompts and skills (skill://uml-mcp-diagrams/SKILL.md plus focused guides) are listed in the reference.

Documentation

Topic

Where

Getting started and tutorials

Tutorials

Diagram types and notation

Diagram types

Clients, Docker, Helm, Vercel

Deploy

MCP App viewer and publishing

MCP App

Configuration (uml-mcp.yaml)

Configuration

Enterprise SSO, audit, metrics

Enterprise

Plugins

Plugins

Admin console

Admin

Development

uv sync --all-groups
uv run pytest
uv run ruff check . && uv run ty check
uv run uml-mcp lint --strict --min-grade A

About 1,800 tests, including browser tests of every interactive page inside the MCP App viewer. See Testing and CONTRIBUTING.md.

License

MIT. Maintained by Antoine Boucher. Built on PlantUML, Kroki, Mermaid, D2 and D3. Brand logos come from LobeHub Icons (MIT) and remain trademarks of their owners.

Available Tools

7 tools
download_diagramDownload DiagramC
Read-onlyIdempotent

Download source, SVG, PNG, PDF or HTML chunks. Repeat sha256 on follow-ups.

Inputs: code (required), diagram_type (required), theme, offset, +2 more. Returns: chunk, total, offset, sha256, +3 more

generate_umlGenerate DiagramA
Idempotent

Render diagram source into an image. Returns url (render link), playground (source editor), display_markdown (chat embed), content_base64/mime_type when bytes are fetched and local_path for a saved file. Prefer SVG in MCP Apps.

Inputs: code (required), diagram_type (required), scale, theme, +2 more. Returns: Diagram render result.

generate_uml_batchGenerate Diagram BatchA
Idempotent

Render several diagrams in one call; a failed item does not stop the others. Inline previews share one 48k budget; later items load when opened.

Inputs: items (required), output_dir. Returns: Structured output for generate_uml_batch.

generate_uml_imageGenerate Diagram ImageB
Idempotent

Render a diagram as MCP ImageContent for chat with a bounded inline preview. Returns content_base64, mime_type, render and playground links. Fetches bytes even under URL-only. Large images use a PNG thumbnail in MCP Apps.

Inputs: code (required), diagram_type (required), scale, theme, +1 more. Returns: Diagram render result.

list_diagram_typesList Diagram TypesA
Read-onlyIdempotent

Find types by text, backend or format. Returns diagram_type keys with backend, description and formats.

Inputs: limit, query, backend, output_format. Returns: Dynamic diagram type map returned by list_diagram_types.

rerender_diagramRe-render DiagramA
Read-onlyIdempotent

Render the viewer’s diagram source again with the selected theme and format. Returns content_base64, mime_type, url, playground, and display_markdown. Hidden from the model; callable from ui://uml-mcp/diagram-viewer via tools/call.

Inputs: code (required), diagram_type (required), scale, theme, +1 more. Returns: Diagram render result.

validate_umlCheck Diagram SourceA
Read-onlyIdempotent

Validate diagram type, format, and syntax locally (no render). Returns valid, errors, warnings, suggestions, and diagnostics; prepared_code is normalized source and changes explains normalization. Set strict=true for extra Mermaid/D2 checks.

Inputs: code (required), diagram_type (required), strict, output_format. Returns: Structured output for validate_uml.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.5/5.0

    Scored across 7 tools

    Disambiguation3/5

    generate_uml, generate_uml_image, and generate_uml_batch all render diagrams, distinguished mainly by return channel and batching rather than a clearly separate purpose. Descriptions help, but an agent could easily choose the wrong rendering variant.

    Naming Consistency4/5

    Names are consistently snake_case verb_noun and follow a readable pattern. Minor inconsistency between 'uml' and 'diagram' as the noun, plus the compound generate_uml_image/batch names, but no chaotic mixing.

    Tool Count5/5

    Seven tools is well-scoped for a UML rendering server, covering discovery, validation, rendering, and download without bloat. Each tool has a plausible place in the workflow.

    Completeness4/5

    The set covers type discovery, local validation, single/batch/inline rendering, and download, so the core render lifecycle is complete. It lacks persistent diagram management or a source-editing/update operation, though that may be outside the server's scope.

    Maintenance

    ActivityActive
    ResponsivenessLimited data

    Related MCP Connectors

    Related MCP Servers