UML-MCP¶
UML-MCP is an MCP server for diagram generation: AI assistants (Cursor, Claude Desktop, and any MCP-compatible client) can render UML, Mermaid, D2, TikZ, BPMN, C4, Graphviz, and 30+ other diagram types through Kroki, PlantUML, Mermaid, and D2.
sequenceDiagram
autonumber
participant U as User
participant A as AI Assistant
participant M as UML-MCP server
participant K as Kroki / PlantUML
U->>A: "Draw a sequence diagram of login"
A->>M: generate_uml(diagram_type, code)
M->>K: render diagram
K-->>M: SVG / PNG
M-->>A: { url, playground, content_base64 }
A-->>U: rendered diagram Get started in 5 minutes Browse the API reference Add to Cursor / Claude
Features¶
-
30+ diagram types
UML (Class, Sequence, Activity, Use Case, State, Component, Deployment, Object), Mermaid, D2, Graphviz, TikZ, ERD, BlockDiag, BPMN, C4, all in one tool call.
-
MCP-native tools
generate_uml,validate_uml,list_diagram_types, andgenerate_uml_batchare MCP tools with annotations (readOnlyHint,idempotentHint, etc.) and resource URIs underuml://. -
Multiple output formats
SVG, PNG, PDF, JPEG, TXT, and base64, depending on diagram type. Save to disk, return a URL, or stream as base64. Configurable themes and SVG scale.
-
Deployment options
Local stdio for IDE integration. HTTP for shared infra. Docker for offline. Vercel + Smithery for zero-install hosted MCP.
-
Rendering with fallbacks
Kroki first, with optional fallback to a local PlantUML server or Mermaid.ink. Each response includes a
sourcefield naming the backend that produced the image. -
Built-in tutorials
Step-by-step guides for connecting clients, generating your first diagram, validating, batching, theming, and converting between syntaxes.
Quick start¶
Add the published server to your client without managing any process:
npm install -g @smithery/cli@latest
smithery auth login
smithery mcp add antoinebou12/uml --client cursor
Or use the legacy one-liner: npx -y @smithery/cli install antoinebou12/uml --client claude.
Use the live deployment over Streamable HTTP:
The MCP route is /mcp, not the domain root.
Clone, install, run. Everything stays on your machine:
See Installation for Poetry/pip variants.
Run a self-contained stack with optional local Kroki/PlantUML:
See Docker for stdio mode and local backends.
Limitations¶
What UML-MCP is not
- Not a graphics editor. It renders diagrams from textual sources; it does not let you draw with a mouse or hand-edit the rendered SVG.
- Not a Kroki/PlantUML replacement. Rendering is delegated to Kroki, a PlantUML server, or Mermaid.ink. UML-MCP adds the MCP surface, validation, batching, and a fallback chain.
- Vercel runtime is read-only. The hosted endpoint cannot write files: responses include URL + base64 only. Use a local install when you need
output_dir.
Need an end-to-end stack?
Combine UML-MCP with your favourite MCP-aware editor. Cursor and Claude Desktop both work out of the box; see Cursor, Claude Desktop, and Claude Code (plugin + marketplace).
Citation¶
If UML-MCP helps your research, tooling, or product, please cite the project or star the repo:
@software{uml_mcp,
author = {Antoine Boucher and contributors},
title = {{UML-MCP: Diagram Generation via the Model Context Protocol}},
url = {https://github.com/antoinebou12/uml-mcp},
year = {2025}
}
License¶
UML-MCP is released under the MIT License. You can use, modify, and distribute it freely, including in commercial products, as long as you keep the original copyright and license notice. See the About page for acknowledgements.