Skip to main content
Glama

UML-MCP: Diagram Generation via MCP

Run Tests Build Package Deploy docs Deploy GitHub release GitHub stars GitHub forks GitHub issues License: MIT Python >=3.12,<3.15 Ruff uv MCP Hosted MCP status Lulu MCPs

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

https://uml-mcp.vercel.app/mcp

Docs

antoinebou12.github.io/uml-mcp

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.

All snippets: config/README.md

git clone https://github.com/antoinebou12/uml-mcp.git && cd uml-mcp
uv sync
uv run python server.py

Configs: 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-plugins

docs/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

generate_uml · generate_uml_image · validate_uml · list_diagram_types · generate_uml_batch

Chat

Inline PNG + markdown ![diagram](url) + Playground link

Deploy

Local · Docker · Vercel · Smithery

Tool

Purpose

generate_uml

Render one diagram; tool text includes image markdown, URL, Playground. Use png for ImageContent.

generate_uml_image

Inline chat image (default PNG); fetches bytes even under hosted MCP_URL_ONLY

validate_uml

Local checks; strict for Mermaid/D2 (rejects semicolon-packed sequenceDiagram)

list_diagram_types

Catalog (like uml://types)

generate_uml_batch

Many diagrams (MCP_BATCH_MAX_ITEMS, MCP_BATCH_CONCURRENCY)

Smoke prompts: tests/prompts/chatgpt_mcp_smoke_test.md

Resource

Description

uml://types

Types, backends, formats

uml://templates / uml://examples

Starters and samples

uml://formats / uml://capabilities

Formats and validation matrix

uml://server-info / uml://workflow

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, …

docs/diagrams/index.md

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 .env

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 stdio

docs/deploy/docker.md

Variable

Default

KROKI_SERVER

https://kroki.io

PLANTUML_SERVER

http://plantuml-server:8080

MCP_OUTPUT_DIR

./output

MCP_READ_ONLY

false

MCP_URL_ONLY

see docs/configuration.md

MCP_BATCH_MAX_ITEMS

20

MCP_BATCH_CONCURRENCY

4

MCP_RATE_LIMIT_PER_MINUTE

0

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, D2

AG-UI: POST /ag-ui/generatedocs/integrations/frontend.md

uv sync --all-groups
uv run pytest tests/ -v
uv run ruff check . && uv run ruff format --check .
make ci

Docs locally: uv run mkdocs servehttp://127.0.0.1:8000

Maintained by Antoine Boucher. Built on PlantUML, Kroki, Mermaid, and D2.

Available Tools

4 tools
generate_umlGenerate UmlA
Idempotent

Generate any UML or diagram by type (class, sequence, mermaid, d2, etc.)

ParametersJSON Schema
NameRequiredDescriptionDefault
codeYes
scaleNo
themeNo
output_dirNo
diagram_typeYes
output_formatNosvg

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A3.8/5.0
Behavior3/5

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.

Conciseness5/5

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.

Completeness3/5

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.

Parameters2/5

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.

Purpose5/5

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.

Usage Guidelines4/5

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 BatchA
Idempotent

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.

ParametersJSON Schema
NameRequiredDescriptionDefault
itemsYes
output_dirNo

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A4.5/5.0
Behavior4/5

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.

Conciseness5/5

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.

Completeness4/5

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.

Parameters5/5

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.

Purpose5/5

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.

Usage Guidelines4/5

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 TypesA
Read-onlyIdempotent

List supported diagram types with Kroki backend, description, and formats (same data as uml://types resource). Use when the client cannot read resources.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A4.5/5.0
Behavior4/5

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.

Conciseness5/5

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.

Completeness5/5

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.

Parameters4/5

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.

Purpose5/5

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.

Usage Guidelines4/5

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 UmlA
Read-onlyIdempotent

Validate diagram type, format, code length, and basic syntax locally before render (no Kroki call). Returns errors and suggestions.

ParametersJSON Schema
NameRequiredDescriptionDefault
codeYes
strictNo
diagram_typeYes
output_formatNosvg

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A4.2/5.0
Behavior4/5

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.

Conciseness5/5

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.

Completeness4/5

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.

Parameters3/5

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.

Purpose5/5

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.

Usage Guidelines4/5

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.

  1. 2 tool updatesv1.3.1
    • Changedgenerate_uml6 fields changed
      • removedInput schema / properties / code / description
        Removed value: -"Diagram code in the syntax for the chosen type"
      • removedInput schema / properties / diagram_type / description
        Removed value: -"Type of diagram (class, sequence, activity, mermaid, d2, etc.)"
      • removedInput schema / properties / output_dir / description
        Removed value: -"Directory to save the image. Omit or None for URL, playground,\nand content_base64 only (no file write; use in serverless / read-only)."
      • removedInput schema / properties / output_format / description
        Removed value: -"svg, png, pdf, jpeg, txt, or base64 (default: svg). See uml://formats per type."
      • removedInput schema / properties / scale / description
        Removed value: -"Scale factor for SVG only (default 1.0, min 0.1). Ignored for other formats."
      • removedInput schema / properties / theme / description
        Removed value: -"PlantUML theme for UML diagrams (e.g. cerulean)"
    • Changedvalidate_uml4 fields changed
      • removedInput schema / properties / code / description
        Removed value: -"Diagram source text."
      • removedInput schema / properties / diagram_type / description
        Removed value: -"Same as generate_uml (see uml://types)."
      • removedInput schema / properties / output_format / description
        Removed value: -"Intended output format (default svg); must be allowed for the type."
      • removedInput schema / properties / strict / description
        Removed value: -"When True, apply extra Mermaid/D2 checks (no extra PlantUML rules)."
  2. 4 tool updatesv1.3.0
    • First observedgenerate_uml
    • First observedgenerate_uml_batch
    • First observedlist_diagram_types
    • First observedvalidate_uml

TDQS

A4.4/5.0
Disambiguation5/5

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.

Naming Consistency5/5

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.

Tool Count5/5

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.

Completeness5/5

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

ActivityMaintained
ResponsivenessSlow

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

Related MCP Servers

Latest Blog Posts

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