UML-MCP: Diagram Generation via MCP

Generate UML and other diagrams through the Model Context Protocol.
At a glance
| Topic | What you get |
|---|
| Diagrams | 30+ types: UML (Class, Sequence, Activity, Use Case, State, Component, Deployment, Object), Mermaid, D2, Graphviz, TikZ, ERD, BlockDiag, BPMN, C4, and more via Kroki |
| MCP tools | generate_uml, validate_uml, list_diagram_types, generate_uml_batch |
| Outputs | SVG, PNG, PDF, JPEG, base64 (availability varies by diagram type) |
| Pipeline | Kroki first, then PlantUML or Mermaid.ink |
| Deployment | Local stdio, local HTTP, Docker, Vercel, Smithery |
Quick Start
Choose your mode
- Remote (recommended): Fast setup over HTTP MCP with Vercel serverless runtime
- Local: stdio process for file output and local debugging
Remote quick start (Vercel HTTP MCP)
Configuration for the public Vercel deployment:
"uml-mcp": {
"transport": "http",
"url": "https://uml-mcp.vercel.app/mcp"
}
Local quick start (stdio MCP)
git clone https://github.com/antoinebou12/uml-mcp.git && cd uml-mcp
uv sync
uv run python server.py
Example client configs:
config/cursor_config.json
config/claude_desktop_config.json
config/README.md for exact config file locations
- Claude Code: install the bundled plugin from the repo marketplace (see below) or read docs/integrations/claude_code.md
Claude Code plugin
Adds the hosted HTTP MCP server plus a diagram skill (no settings.json paste). In Claude Code:
/plugin marketplace add https://github.com/antoinebou12/uml-mcp
/plugin install uml-mcp@uml-mcp-plugins
Use a local path instead of the GitHub URL if you already cloned this repo. Custom endpoints and validation: docs/integrations/claude_code.md.
Remote vs Local
- Transport: Remote uses HTTP MCP, local uses stdio by default
- Runtime: Remote runs on Vercel, local runs in your Python environment
- File writes: Remote is read-only (no
output_dir), local supports output_dir
- Returned data: Both return URL + base64; local can also save files
- Environment variables: Remote is managed server-side; local reads your env config
MCP clients must call /mcp, not the site root.
Supported Diagram Types
| Category | Examples |
|---|
| UML (PlantUML) | Class, Sequence, Activity, Use Case, State, Component, Deployment, Object |
| General | Mermaid, D2, Graphviz, ERD, BlockDiag, BPMN, C4 |
| Specialized | TikZ, Excalidraw, Nomnoml, Pikchr, Structurizr, SVGBob, WaveDrom, WireViz, … |
Full list with supported formats: run python server.py --list-tools or query uml://types and uml://formats.
MCP Tools and Resources
Tools
| Tool | Purpose |
|---|
generate_uml | Render a diagram; omit output_dir for URL/base64 only |
validate_uml | Structural validation before render; strict enables extra Mermaid/D2 checks |
list_diagram_types | Same metadata as uml://types when resources are awkward |
generate_uml_batch | Multiple diagrams in one call (cap: MCP_BATCH_MAX_ITEMS) |
Resources (uml://)