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 — Cursor, VS Code Copilot, OpenAI Codex, Claude, Open WebUI + Ollama, ChatGPT, and any MCP client.
Live MCP | |
Docs | |
Catalog | ~37 Kroki-backed types · 5 MCP tools · URL + playground + chat PNG |
Quick start
Remote (recommended) — add to your MCP client:
"uml-mcp": {
"transport": "http",
"url": "https://uml-mcp.vercel.app/mcp"
}Use /mcp, not the site root. Repo defaults: .cursor/mcp.json · .vscode/mcp.json · .codex/config.toml.
Client | Config | Guide |
Cursor | ||
VS Code / Copilot | ||
OpenAI Codex | ||
Ollama / Open WebUI | ||
Claude Desktop |
All snippets: config/README.md
git clone https://github.com/antoinebou12/uml-mcp.git && cd uml-mcp
uv sync
uv run python server.pyConfigs: config/README.md (Cursor, VS Code, Codex, Claude, Open WebUI, Continue)
/plugin marketplace add https://github.com/antoinebou12/uml-mcp
/plugin install uml-mcp@uml-mcp-pluginsdocs/integrations/claude_code.md · Cursor skill: .skill/skills/uml-mcp-diagrams/SKILL.md
Related MCP server: MCP-GLSP
At a glance
Topic | What you get |
Diagrams | ~37 types via Kroki (UML, Mermaid, D2, TikZ, BPMN, C4, GoAT, UMLet, …) |
Tools |
|
Chat | Inline PNG + markdown |
Deploy |
Tool | Purpose |
| Render one diagram; tool text includes image markdown, URL, Playground. Use |
| Inline chat image (default PNG); fetches bytes even under hosted |
| Local checks; |
| Catalog (like |
| Many diagrams ( |
Smoke prompts: tests/prompts/chatgpt_mcp_smoke_test.md
Resource | Description |
| Types, backends, formats |
| Starters and samples |
| Formats and validation matrix |
| Version/tools and plan-then-generate |
Category | Examples |
UML | Class, Sequence, Activity, Use Case, State, Component, Deployment, Object |
General | Mermaid, D2, Graphviz, ERD, BlockDiag, BPMN, C4 |
Specialized | TikZ, Excalidraw, GoAT, UMLet, Nomnoml, Pikchr, Structurizr, SVGBob, WaveDrom, WireViz, … |
Remote (Vercel) | Local | |
Transport | HTTP MCP | stdio or HTTP |
File writes | No | Optional |
Chat images | PNG tools fetch bytes under URL-only | Same + optional disk |
Env | Server-side | Your |
Vercel — connect the repo; clients use https://<project>.vercel.app/mcp.
Smithery — paste that /mcp URL at smithery.ai/new. Guide: docs/integrations/vercel_smithery.md.
Docker
docker compose up -d
docker build -t uml-mcp . && docker run -p 8000:8000 uml-mcp
docker run -i uml-mcp python server.py --transport stdioVariable | Default |
|
|
|
|
|
|
|
|
| |
|
|
|
|
|
|
Full list: docs/configuration.md
Assistant → generate_uml / generate_uml_image → Kroki (+ fallbacks) → url, playground, optional image bytes.
server.py / app.py -- MCP + FastAPI (/mcp)
mcp_core/tools/ -- generate_uml, generate_uml_image, validate, batch
tools/kroki/ -- Kroki, PlantUML, Mermaid, D2AG-UI: POST /ag-ui/generate — docs/integrations/frontend.md
uv sync --all-groups
uv run pytest tests/ -v
uv run ruff check . && uv run ruff format --check .
make ciDocs locally: uv run mkdocs serve → http://127.0.0.1:8000
Links
Docs | Site · Cursor · Claude Code · Frontend |
Contribute | |
License |
Maintained by Antoine Boucher. Built on PlantUML, Kroki, Mermaid, and D2.
Available Tools
4 toolsgenerate_umlGenerate UmlAIdempotent
Generate any UML or diagram by type (class, sequence, mermaid, d2, etc.)
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | ||
| scale | No | ||
| theme | No | ||
| output_dir | No | ||
| diagram_type | Yes | ||
| output_format | No | svg |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already provide idempotent and non-destructive hints, so the bar for transparency is lower. The description adds the range of supported diagram types but does not disclose potential file output behavior (e.g., output_dir) or the meaning of the code parameter.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, front-loaded sentence with no filler. Every word contributes to stating the action, scope, and examples.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given 6 parameters and no parameter descriptions, the description is too terse to fully guide invocation. It explains what the tool does but not how to construct the required code input or what optional parameters control, though an output schema exists to mitigate return-value ambiguity.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the description must compensate for parameter meaning. It only gives examples for diagram_type but leaves code, scale, theme, output_dir, and output_format unexplained, relying on property names alone.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the verb 'Generate' and the resource 'any UML or diagram by type', with explicit examples (class, sequence, mermaid, d2). This distinguishes it from sibling tools like validate_uml, list_diagram_types, and generate_uml_batch.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies this is the primary single-generation tool, and sibling names suggest validation and batch alternatives. However, it does not explicitly state when not to use it or give direct comparisons to generate_uml_batch.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
generate_uml_batchGenerate Uml BatchAIdempotent
Generate multiple diagrams in one call. Each item is like generate_uml (diagram_type, code, output_format?, theme?, scale?). Optional shared output_dir for all items. Returns a list of per-index results or errors.
| Name | Required | Description | Default |
|---|---|---|---|
| items | Yes | ||
| output_dir | No |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already cover idempotent and non-destructive behavior. The description adds useful context about the return format ('list of per-index results or errors') and the optional shared output_dir. This goes beyond the annotations without contradicting them.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is two sentences, front-loaded with purpose, and includes the necessary parameter and return details without any waste. Every sentence earns its place.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The description covers batch behavior, item structure, return type, and shared directory. There is an output schema for detailed return values, so the description need not repeat that. It could mention edge cases like empty items, but overall it's complete for a tool of this complexity.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 0%, but the description compensates by outlining the item structure with fields and optionality (diagram_type, code, output_format?, theme?, scale?) and explaining that output_dir is shared for all items. This gives the agent a clear understanding of the parameters beyond bare schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states 'Generate multiple diagrams in one call', using a specific verb and resource that distinguishes it from the sibling tool generate_uml (single). It also mentions 'Each item is like generate_uml', reinforcing its role as the batch counterpart.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies batch usage by framing it as 'multiple diagrams in one call' and referencing generate_uml's parameter structure. It doesn't explicitly say when to choose this over repeated calls but conveys the benefit. No explicit exclusions, but sufficient guidance for typical use.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list_diagram_typesList Diagram TypesARead-onlyIdempotent
List supported diagram types with Kroki backend, description, and formats (same data as uml://types resource). Use when the client cannot read resources.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare read-only, idempotent, and non-destructive behavior. The description adds value by explaining the tool returns the same data as the 'uml://types resource' and enumerates the data fields (backend, description, formats), providing useful contextual insight beyond the annotations.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is concise and front-loaded: it states the action and resource in the first sentence, then gives a brief usage hint in the second. Every word earns its place, with no redundancy.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a parameterless list tool with a rich output schema and thorough annotations, the description covers purpose, data source equivalence, and when to use it. It is sufficiently complete for an agent to decide when to invoke it and what to expect.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The tool takes no parameters, so the baseline is 4. The description makes it clear there is nothing to configure, and the empty input schema confirms this. No additional parameter explanation is needed.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action ('List') and the specific resource ('supported diagram types'), adding detail on the data fields ('Kroki backend, description, and formats'). It distinguishes from sibling tools that validate or generate diagrams, making the purpose unambiguous.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides an explicit usage condition: 'Use when the client cannot read resources.' This gives clear context for when the tool is appropriate, though it does not explicitly mention alternatives or exclusions relative to sibling tools. The condition effectively implies that the uml://types resource is the preferred equivalent.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
validate_umlValidate UmlARead-onlyIdempotent
Validate diagram type, format, code length, and basic syntax locally before render (no Kroki call). Returns errors and suggestions.
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | ||
| strict | No | ||
| diagram_type | Yes | ||
| output_format | No | svg |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already indicate read-only, non-destructive, and idempotent behavior. The description adds meaningful behavioral context: it explicitly lists what is validated (type, format, code length, syntax) and that it returns 'errors and suggestions'. This goes beyond the annotations and clearly discloses the local nature (no remote call), without contradicting any annotations.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a model of conciseness: two sentences front-load the core purpose and context, followed by a clear statement of the return behavior. Every word contributes; there is no filler or redundancy.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a straightforward local validator, the description, combined with annotations and the presence of an output schema, is sufficiently complete. The tool's role is clearly delineated relative to siblings, and the description covers the essential behavior. Minor gaps about parameter behavior reduce it from a perfect score.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the description must compensate. It provides partial semantics by referencing 'diagram type' (diagram_type) and 'code length' (code), but omits any explanation for `strict` and `output_format`. The description does not fully substitute for the absence of schema descriptions.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states a specific action (validate) on a specific resource (UML diagram code) and enumerates what is validated: diagram type, format, code length, and basic syntax. It distinguishes itself from sibling generation tools by adding 'before render (no Kroki call)', clearly positioning this as a pre-render validation step.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The phrase 'before render (no Kroki call)' clearly indicates when to use this tool as a local pre-flight check, contrasting with the generation tools. However, it does not explicitly name alternatives or state when NOT to use it, leaving some implicit nuance.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
2 tool updates
v1.3.1- Changed
generate_uml6 fields changed- removed
Input schema / properties / code / descriptionRemoved value: -"Diagram code in the syntax for the chosen type" - removed
Input schema / properties / diagram_type / descriptionRemoved value: -"Type of diagram (class, sequence, activity, mermaid, d2, etc.)" - removed
Input schema / properties / output_dir / descriptionRemoved value: -"Directory to save the image. Omit or None for URL, playground,\nand content_base64 only (no file write; use in serverless / read-only)." - removed
Input schema / properties / output_format / descriptionRemoved value: -"svg, png, pdf, jpeg, txt, or base64 (default: svg). See uml://formats per type." - removed
Input schema / properties / scale / descriptionRemoved value: -"Scale factor for SVG only (default 1.0, min 0.1). Ignored for other formats." - removed
Input schema / properties / theme / descriptionRemoved value: -"PlantUML theme for UML diagrams (e.g. cerulean)"
- Changed
validate_uml4 fields changed- removed
Input schema / properties / code / descriptionRemoved value: -"Diagram source text." - removed
Input schema / properties / diagram_type / descriptionRemoved value: -"Same as generate_uml (see uml://types)." - removed
Input schema / properties / output_format / descriptionRemoved value: -"Intended output format (default svg); must be allowed for the type." - removed
Input schema / properties / strict / descriptionRemoved value: -"When True, apply extra Mermaid/D2 checks (no extra PlantUML rules)."
4 tool updates
v1.3.0- First observed
generate_uml - First observed
generate_uml_batch - First observed
list_diagram_types - First observed
validate_uml
TDQS
Each tool serves a distinct function: validation, listing supported types, single generation, and batch generation. There is no overlap or ambiguity between them, making it easy for an agent to select the right tool.
All tool names follow a consistent snake_case verb_noun pattern: validate_uml, list_diagram_types, generate_uml, generate_uml_batch. The two generate tools share a clear prefix, and the batch suffix differentiates them predictably.
With only 4 tools, the server is tightly scoped to its purpose of UML/diagram generation. Each tool earns its place, covering validation, type discovery, and both single and batch generation without unnecessary bloat.
The tool surface fully covers the core workflow: discover supported types, validate code, generate a diagram, and generate multiple at once. Since generation is stateless, there are no missing lifecycle operations; the set is complete for its stated purpose.
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 Connectors
Generate cloud architecture diagrams, flowcharts, and sequence diagrams.
Render, validate, encode/decode PlantUML diagram-as-code; 22 diagram types. Free, no auth.
Generate org charts, MCD/ERD data models, and C4 architecture diagrams — pilot OrgGen AI via MCP.
Render, verify, describe, and safely edit Mermaid diagrams through MCP.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceA powerful Model Context Protocol server that automatically generates Mermaid diagrams from code and provides SVG beautification features.1-
- FlicenseNot gradedqualityFmaintenanceEnables 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.26916ISC
- AlicenseAqualityDmaintenanceGenerates GCP architecture diagrams, sequence diagrams, flow charts, and class diagrams using Python diagrams DSL via MCP.31Apache 2.0
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