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 · 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

  • 46 diagram types. 37 through Kroki (UML, Mermaid, D2, Graphviz, C4, BPMN, ERD, TikZ...) and 9 interactive ones: cloud and stack diagrams with real logos, archify-style architecture, workflow and sequence diagrams, and 2D/3D LLM visualisations.

  • 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.

Interactive diagrams

These plugins ship with UML-MCP and are on by default. Each type renders to an interactive HTML 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

{
  "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 DiagramB
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: Structured output for diagram generation tools. The first MCP Apps response is…

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 ImageA
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: Structured output for diagram generation tools. The first MCP Apps response is…

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: Structured output for diagram generation tools. The first MCP Apps response is…

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.7/5.0

    Scored across 7 tools

    Disambiguation4/5

    Most tools target distinct steps in the diagram workflow: listing types, validating, generating, batch rendering, rerendering, and downloading. The main overlap is between generate_uml, generate_uml_image, and generate_uml_batch, which all render diagrams but differ by output channel or multiplicity; descriptions clarify this, though an agent could still hesitate.

    Naming Consistency4/5

    All names use snake_case with a verb-first pattern (generate_uml, validate_uml, download_diagram, list_diagram_types, rerender_diagram). The generate_uml / generate_uml_image / generate_uml_batch family varies in specificity, but the convention remains predictable.

    Tool Count5/5

    Seven tools is well-scoped for a UML/diagram rendering server, with each tool covering a distinct part of the workflow. There is no obvious padding or missing operational layer.

    Completeness5/5

    The surface covers diagram type discovery, local validation, single and batch rendering, UI rerendering, and multi-format download. No major lifecycle gap is apparent for the stated rendering and validation purpose.

    Maintenance

    ActivityActive
    ResponsivenessLimited data

    Related MCP Connectors

    Related MCP Servers