UML-MCP
The UML-MCP server lets you generate, validate, and manage 30+ types of diagrams via the Model Context Protocol (MCP). It offers the following capabilities:
Generate single diagrams (
generate_uml): Create diagrams (e.g., UML, Mermaid, D2, Graphviz, ERD, BPMN, C4) from code. Specify type, code, output format (SVG, PNG, PDF, JPEG, base64), theme, scale, and optionally save to a local output directory. Results returned as URLs or base64.Generate diagrams in batches (
generate_uml_batch): Submit multiple diagram generation requests in a single call, each with its own settings, with an optional shared output directory. Returns per-index results or errors.Validate diagrams locally (
validate_uml): Check diagram type, format, code length, and basic syntax before rendering—no external calls. Optional strict mode provides deeper Mermaid/D2 checks. Returns errors and suggestions.List supported diagram types (
list_diagram_types): Retrieve metadata about all supported types, including backends (Kroki, PlantUML, etc.), descriptions, and supported output formats.Access resources (
uml://URIs): Query server resources for diagram type listings, templates, examples, output format details, backend capability matrices, server info, and recommended workflows.Robust backend and deployment: Renders through Kroki (supporting 30+ diagram types, multiple output formats). Use remotely via HTTP (Vercel), locally via stdio, Docker, or Smithery, with configurable rate limits, batch caps, code length limits, and read‑only mode.
Generates Excalidraw diagrams as part of the supported specialized diagram types, rendered via Kroki.
Generates Mermaid diagrams as part of the supported diagram types, rendered via Kroki.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@UML-MCPDraw a UML sequence diagram for user registration"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
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 |
|
Outputs | SVG, PNG, PDF, JPEG, base64 (availability varies by diagram type) |
Pipeline | Kroki first, then PlantUML or Mermaid.ink |
Deployment |
Source | URL |
Live MCP (HTTP) | |
Smithery catalog |
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.pyExample client configs:
config/cursor_config.jsonconfig/claude_desktop_config.jsonconfig/README.mdfor exact config file locationsClaude 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-pluginsUse a local path instead of the GitHub URL if you already cloned this repo. Custom endpoints and validation: docs/integrations/claude_code.md.
Related MCP server: MCP-GLSP
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 supportsoutput_dirReturned 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 |
| Render a diagram; omit |
| Structural validation before render; |
| Same metadata as |
| Multiple diagrams in one call (cap: |
Resources (uml://)
Resource | Description |
| Diagram types, backends, supported formats per type |
| Starter templates per type; see BPMN 2.0.2 guide for element and flow reference (docs) |
| Example diagrams per type; Mermaid documents named samples (sequence API, Gantt) alongside |
| Output formats per type |
| Type → backend → formats matrix used for validation |
| Server name, version, tools, prompts, Kroki/PlantUML URLs |
| Recommended plan-then-generate workflow |
Deployment
Vercel
This repo includes vercel.json for serverless deployment.
Connect the repo to Vercel
Use
https://<project>.vercel.app/mcpKeep
/mcpin all MCP client URLs
Smithery
Open smithery.ai/new, choose URL
Enter
https://<project>.vercel.app/mcpConfigure display name, description, and homepage
Detailed guide: docs/integrations/vercel_smithery.md
Docker
Default image serves FastAPI on port 8000 with MCP HTTP at http://127.0.0.1:8000/mcp.
# Full local stack (local Kroki + mermaid + blockdiag)
docker compose up -d
# API + MCP only (public Kroki)
docker build -t uml-mcp . && docker run -p 8000:8000 uml-mcp
# stdio MCP subprocess mode
docker run -i uml-mcp python server.py --transport stdioConfiguration (Local runtime)
These variables apply to local/self-hosted runs. Remote Vercel endpoint settings are managed server-side.
Variable | Description | Default |
| Kroki server URL |
|
| PlantUML server URL |
|
| Diagram output directory |
|
| Disable file writes |
|
| Max diagram code length |
|
| Max items per |
|
| HTTP rate limit per IP for diagram/MCP routes ( |
|
| Use local Kroki instance |
|
| Use local PlantUML instance |
|
Full options: docs/configuration.md
Architecture
Typical flow when a user asks an MCP-enabled assistant for a diagram: the assistant calls generate_uml, the server renders via Kroki, then returns URLs and optional base64 to the assistant for the user.
server.py -- MCP entry point (stdio/HTTP)
app.py -- FastAPI REST API + MCP HTTP at /mcp
api/app.py -- legacy re-export of root app (Vercel FastAPI preset uses root app.py)
mcp_core/
core/ -- config, server, CLI, utilities, diagram pipeline
tools/ -- generate_uml, validate_uml
prompts/ -- diagram generation prompts
resources/ -- uml:// resource handlers
tools/kroki/ -- Kroki, PlantUML, Mermaid, D2 clientsDevelopment
# Install dev dependencies
uv sync --all-groups
# Run tests
uv run pytest tests/ -v
# Lint
uv run ruff check . && uv run ruff format --check .
# Local CI
make ciDocumentation
Online: antoinebou12.github.io/uml-mcp
Local:
uv run mkdocs servethen open http://127.0.0.1:8000
Contributing
License
Acknowledgements
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Flicense-qualityDmaintenanceA powerful Model Context Protocol server that automatically generates Mermaid diagrams from code and provides SVG beautification features.1
- Flicense-qualityFmaintenanceEnables AI-driven graphical diagram creation and manipulation using natural language, with support for BPMN workflows, analysis, and manual editing via the Model Context Protocol.1
- AlicenseCqualityDmaintenanceEnables AI models to create and manage various types of diagrams (flowcharts, UML, network diagrams, etc.) via the Model Context Protocol.26896ISC
- AlicenseAqualityDmaintenanceGenerates GCP architecture diagrams, sequence diagrams, flow charts, and class diagrams using Python diagrams DSL via MCP.31Apache 2.0
Related MCP Connectors
Generate cloud architecture diagrams, flowcharts, and sequence diagrams.
Generate dynamic Mermaid diagrams and charts with AI assistance. Customize styles and export diagr…
Official Miro MCP server - Supports context to code and creating diagrams, docs, and data tables.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/antoinebou12/uml-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server