PlantUML MCP Server
Provides PlantUML diagram generation capabilities, including tools for creating and encoding diagrams, generating embeddable SVG/PNG URLs, and creating various diagram types like sequence diagrams, class diagrams, and C4 architecture diagrams.
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., "@PlantUML MCP Servergenerate a sequence diagram for user login flow"
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.
PlantUML MCP Server
A Model Context Protocol (MCP) server that provides PlantUML diagram generation capabilities for Claude Desktop and Claude Code.
Available Tools
generate_plantuml_diagram- Generate diagrams and get embeddable URLs (SVG/PNG), optionally save locallyencode_plantuml- Encode PlantUML code for URL sharingdecode_plantuml- Decode PlantUML from encoded strings
Available Prompts
plantuml_error_handling- Guidelines for handling PlantUML syntax errors and implementing auto-fix workflows
This prompt provides Claude instances with comprehensive instructions on how to:
Detect PlantUML syntax errors using native server validation
Implement intelligent auto-fix workflows for common syntax issues
Parse structured error responses and apply appropriate corrections
Handle validation failures gracefully with retry logic
The prompt enables Claude to automatically detect and fix common PlantUML errors like missing tags, invalid arrow syntax, typos in keywords, and missing quotes, making PlantUML diagram generation more reliable and user-friendly.
Quick Setup
For Claude Code
# Using default PlantUML server
claude mcp add plantuml --scope user --env PLANTUML_SERVER_URL=https://www.plantuml.com/plantuml -- npx plantuml-mcp-serverFor Claude Desktop
Add this to your Claude Desktop MCP configuration (~/Library/Application Support/Claude/claude_desktop_config.json on macOS):
{
"mcpServers": {
"plantuml": {
"command": "npx",
"args": ["plantuml-mcp-server"],
"env": {
"PLANTUML_SERVER_URL": "https://www.plantuml.com/plantuml"
}
}
}
}To use your own PlantUML server, change the PLANTUML_SERVER_URL environment variable.
Then restart Claude Desktop/Code to activate the MCP server.
Related MCP server: UMLmcp
What You Can Do
After setup, you can ask Claude to:
Generate PlantUML diagrams and get embeddable SVG/PNG URLs
Create sequence diagrams, class diagrams, architecture diagrams
Use advanced PlantUML features like
!includedirectives and external librariesEncode/decode PlantUML for URL sharing
Save diagrams locally with secure path restrictions
Saving Diagrams Locally
The generate_plantuml_diagram tool supports saving diagrams to local files via the output_path parameter.
Security: By default, files can only be saved within the current working directory. Only .svg and .png extensions are allowed.
To allow additional directories, set the PLANTUML_ALLOWED_DIRS environment variable:
# Allow specific directories (colon-separated)
PLANTUML_ALLOWED_DIRS=/home/user/diagrams:/tmp/output
# Allow any directory (use with caution)
PLANTUML_ALLOWED_DIRS=*Examples
C4 diagram for plantuml-mcp-server
> add c4 diagram for this project in readme 'C4 diagram for plantuml-mcp-server' sectionSequence diagram for plantuml-mcp-server
> add sequence diagram in readme in architecture sectionOAuth2 Authorization Code Flow Diagram
> show me basic oauth2 flow png, open it in browserDevelopment Setup
Prerequisites
Node.js 18+
npm
Local Installation
# Clone and setup
git clone https://github.com/mzagar/plantuml-mcp-server.git
cd plantuml-mcp-server
make setupDevelopment Commands
# Show all available commands
make help
# Build and run all tests
make clean build test-allEnvironment Variables
Variable | Description | Default |
| PlantUML server URL |
|
| Additional directories for | CWD only |
License
MIT License - see LICENSE file for details.
Available Tools
3 toolsdecode_plantumlC
Decode encoded PlantUML string back to PlantUML code
| Name | Required | Description | Default |
|---|---|---|---|
| encoded_string | Yes | Encoded PlantUML string to decode |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool decodes encoded strings but doesn't cover error handling (e.g., invalid input), performance traits, or output format (e.g., returning plain text PlantUML code). This leaves significant gaps in understanding how the tool behaves beyond its basic function.
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, efficient sentence that directly states the tool's purpose with zero waste. It is appropriately sized and front-loaded, making it easy for an agent to parse quickly without unnecessary elaboration.
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 the lack of annotations and output schema, the description is incomplete. It doesn't explain what the decoded output looks like (e.g., PlantUML code format), error conditions, or dependencies on sibling tools. For a tool with no structured data beyond the input schema, more contextual information is needed to guide effective use.
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 schema description coverage is 100%, with the parameter 'encoded_string' fully documented in the schema. The description adds no additional meaning beyond what the schema provides (e.g., format details or examples), so it meets the baseline score of 3 for high schema coverage without extra value.
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 tool's purpose with a specific verb ('decode') and resource ('encoded PlantUML string'), and it distinguishes the action from encoding or generating diagrams. However, it doesn't explicitly differentiate from sibling tools like 'encode_plantuml' beyond the opposite direction, leaving some room for improvement.
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 no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., needing an encoded string), exclusions, or comparisons to sibling tools like 'encode_plantuml' or 'generate_plantuml_diagram', leaving the agent to infer usage context.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
encode_plantumlB
Encode PlantUML code for URL usage
| Name | Required | Description | Default |
|---|---|---|---|
| plantuml_code | Yes | PlantUML diagram code to encode |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden but only states the basic function. It doesn't disclose behavioral traits such as encoding format, error handling, performance, or security aspects (e.g., input validation), leaving significant gaps for a tool that likely transforms data.
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, efficient sentence that directly states the tool's purpose without any wasted words. It's appropriately sized and front-loaded, making it easy to understand quickly.
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 the simple input schema (1 parameter, 100% coverage) and no output schema, the description is minimally adequate but incomplete. It lacks details on output format, error cases, or integration context, which are important for a tool that encodes data for URLs.
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 description adds no parameter-specific information beyond the schema, which has 100% coverage and fully documents the single parameter. This meets the baseline of 3, as the schema handles the heavy lifting without extra value from the description.
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 ('Encode') and the resource ('PlantUML code'), specifying it's for URL usage. It distinguishes from siblings like 'decode_plantuml' (reverse operation) and 'generate_plantuml_diagram' (creation), but doesn't explicitly contrast them in the description.
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 minimal guidance by mentioning 'for URL usage', implying use when embedding PlantUML in URLs. However, it lacks explicit when-to-use scenarios, prerequisites, or alternatives (e.g., when to use vs. generate_plantuml_diagram), offering no detailed context for selection.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
generate_plantuml_diagramA
Generate a PlantUML diagram with automatic syntax validation and error reporting for auto-fix workflows. Returns embeddable image URLs for valid diagrams or structured error details for invalid syntax that can be automatically corrected. Optionally saves the diagram to a local file.
| Name | Required | Description | Default |
|---|---|---|---|
| plantuml_code | Yes | PlantUML diagram code. Will be automatically validated for syntax errors before generating the diagram URL. | |
| format | No | Output image format (SVG or PNG) | svg |
| output_path | No | Optional. Path to save diagram locally. Automatically creates all necessary parent directories. Restricted to current working directory by default. Set PLANTUML_ALLOWED_DIRS env var (colon-separated paths, or "*" for unrestricted) to allow additional directories. Only .svg and .png extensions permitted. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden and does well by disclosing key behavioral traits: it performs automatic syntax validation, returns embeddable image URLs or structured error details for auto-fix, and optionally saves to a local file with directory restrictions. However, it lacks details on rate limits, authentication needs, or error handling specifics.
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 front-loaded with the core purpose and key features in the first sentence, followed by additional details in a structured manner. Every sentence adds value without redundancy, making it efficient and easy to parse.
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 the tool's complexity (3 parameters, no output schema, no annotations), the description is fairly complete, covering the main functionality, validation, outputs, and optional file saving. However, it could benefit from more details on error handling or response formats to fully compensate for the lack of output schema.
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 100%, so the schema already documents all parameters thoroughly. The description adds minimal value beyond the schema, mentioning 'automatic syntax validation' for plantuml_code and 'Optionally saves the diagram to a local file' for output_path, but does not provide additional semantic context. This meets the baseline for high schema coverage.
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 specific action ('Generate a PlantUML diagram') and distinguishes it from siblings by mentioning 'automatic syntax validation and error reporting for auto-fix workflows' and 'Returns embeddable image URLs for valid diagrams or structured error details for invalid syntax that can be automatically corrected.' This goes beyond just restating the name and differentiates from decode_plantuml and encode_plantuml.
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 clear context for when to use this tool ('Generate a PlantUML diagram with automatic syntax validation and error reporting for auto-fix workflows'), but does not explicitly state when not to use it or mention alternatives like the sibling tools. The guidance is implicit rather than explicit about tool selection.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
TDQS
Each tool has a clearly distinct purpose: decode_plantuml reverses encoding, encode_plantuml prepares code for URLs, and generate_plantuml_diagram creates diagrams with validation. There is no overlap or ambiguity between these functions, making tool selection straightforward for an agent.
All tool names follow a consistent verb_noun pattern with snake_case (decode_plantuml, encode_plantuml, generate_plantuml_diagram). The naming is predictable and readable, adhering to a uniform style throughout the set.
With 3 tools, this server is well-scoped for handling PlantUML encoding, decoding, and diagram generation. Each tool earns its place by covering essential operations without bloat, making the count appropriate for the domain.
The tool set provides complete coverage for core PlantUML workflows: encoding for URLs, decoding back to code, and generating diagrams with validation and error handling. There are no obvious gaps, as these tools support the full lifecycle from code to visual output.
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
Render, validate, encode/decode PlantUML diagram-as-code; 22 diagram types. Free, no auth.
Generate dynamic Mermaid diagrams and charts with AI assistance. Customize styles and export diagr…
Diagrams, badges, charts and QR codes as plain image URLs you can paste into Markdown.
Generate cloud architecture diagrams, flowcharts, and sequence diagrams.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables AI assistants to generate UML diagrams through natural language by rendering PlantUML code into PNG or SVG images. Supports sequence diagrams, class diagrams, use case diagrams, and other UML chart types with Base64-encoded output.7
- AlicenseNot gradedqualityDmaintenanceEnables users to generate PlantUML code for UML Class and Sequence diagrams using Google Gemini AI. Supports both domain JSON input and free text descriptions to create structured UML diagrams.MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to generate UML diagrams from text descriptions using PlantUML, supporting multiple output formats (PNG, SVG, PDF), syntax validation, and diagram source extraction.18MIT
- AlicenseNot gradedqualityDmaintenanceEnables generating cloud architecture diagrams, flowcharts, sequence diagrams, and more using three rendering engines: mingrammer/diagrams, Mermaid, and PlantUML.3MIT
Appeared in Searches
- PlantUML Diagramming Tool and UML Diagram Creation
- 2D technical layout diagram for residential lawn irrigation system with measurements
- Tools for creating architectural and technical diagrams
- A tool for generating class and architecture diagrams from code or technical descriptions
- Information about C4 diagrams
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/infobip/plantuml-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server