UML-MCP
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| KROKI_SERVER | No | Kroki server URL | https://kroki.io |
| MCP_READ_ONLY | No | Disable file writes | false |
| MCP_OUTPUT_DIR | No | Diagram output directory | ./output |
| PLANTUML_SERVER | No | PlantUML server URL | http://plantuml-server:8080 |
| USE_LOCAL_KROKI | No | Use local Kroki instance | false |
| USE_LOCAL_PLANTUML | No | Use local PlantUML instance | false |
| MCP_BATCH_MAX_ITEMS | No | Max items per generate_uml_batch | 20 |
| MCP_MAX_CODE_LENGTH | No | Max diagram code length | 500000 |
| MCP_RATE_LIMIT_PER_MINUTE | No | HTTP rate limit per IP for diagram/MCP routes (0 = off) | 0 |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
UML-MCP renders diagrams (UML via PlantUML, Mermaid, D2, Graphviz, C4, BPMN and ~30 more Kroki formats) through five workflow tools—not one tool per format. Progressive discovery: 1) list_diagram_types or resources/read uml://types (and uml://formats) when unsure; 2) validate_uml (prefer strict: true for Mermaid sequence) before expensive retries; 3) generate_uml for a URL/playground link, generate_uml_image for an inline chat image, or generate_uml_batch for several diagrams. Prefer these workflow tools over inventing per-format Kroki calls. Show the returned markdown image and link to the user. Use the diagram Skill (skills/list / skill://uml-mcp-diagrams/SKILL.md), prompts (uml_diagram, algorithm_explainer, paper_concept_diagram, architecture_report), per-type agent skills under .skill/skills/<diagram_type>/, and uml://workflow.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
| logging | {} |
| prompts | {
"listChanged": true
} |
| resources | {
"subscribe": false,
"listChanged": true
} |
| completions | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| list_diagram_typesA | Find types by text, backend or format. Returns diagram_type keys with backend, description and formats. |
| generate_umlA | 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. |
| generate_uml_imageB | 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. |
| validate_umlA | 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. |
| generate_uml_batchA | 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. |
| rerender_diagramA | 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. |
| download_diagramC | Download source, SVG, PNG, PDF or HTML chunks. Repeat sha256 on follow-ups. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
| uml_diagram | Plan-then-generate any catalog diagram_type. context: diagram_type?, thinking=false? |
| algorithm_explainer | Algorithm diagram with Big-O labels; uml://recipes algorithm_flowchart. |
| paper_concept_diagram | Paper/concept diagram with clickable citations (SVG); uml://recipes paper_concept. |
| diagram_theme | Pick a generate_uml theme for light, dark/black, or B&W backgrounds. context: background?, diagram_type? |
| architecture_report | Markdown architecture report with generate_uml diagrams and TOC. |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
| get_diagram_types | Get available diagram types |
| get_diagram_templates | Get diagram templates for different diagram types |
| get_diagram_examples | Get diagram examples for different diagram types |
| get_output_formats | Get supported output formats for each diagram type |
| get_capabilities | Type → backend → formats matrix for tooling and clients. |
| get_server_info | Get MCP server information |
| get_diagram_recipes | Return curated starter recipes that map a use case to a ready-to-edit source body. |
| get_recommended_workflow | Return the recommended workflow: plan first, then call generate_uml. |
| read_viewer | Interactive diagram viewer: zoom, edit source, switch themes and export SVG, PNG, HTML or PDF. |
| read_skill | Diagram workflow instructions for UML-MCP. |
TDQS
Scored across 7 tools
generate_uml, generate_uml_image, and generate_uml_batch all render diagrams, distinguished mainly by return channel and batching rather than a clearly separate purpose. Descriptions help, but an agent could easily choose the wrong rendering variant.
Names are consistently snake_case verb_noun and follow a readable pattern. Minor inconsistency between 'uml' and 'diagram' as the noun, plus the compound generate_uml_image/batch names, but no chaotic mixing.
Seven tools is well-scoped for a UML rendering server, covering discovery, validation, rendering, and download without bloat. Each tool has a plausible place in the workflow.
The set covers type discovery, local validation, single/batch/inline rendering, and download, so the core render lifecycle is complete. It lacks persistent diagram management or a source-editing/update operation, though that may be outside the server's scope.