by infobip
Enables generation of PlantUML diagrams through a Model Context Protocol (MCP) server, returning embeddable SVG/PNG URLs and optional local file saving.
Provides a lightweight Node.js MCP server that accepts PlantUML source, validates it, and returns diagram images (SVG/PNG) via URLs. It also offers tools to encode/decode PlantUML strings and handles common syntax errors automatically.
claude mcp add plantuml --scope user --env PLANTUML_SERVER_URL=https://www.plantuml.com/plantuml -- npx plantuml-mcp-server
claude_desktop_config.json:
{
"mcpServers": {
"plantuml": {
"command": "npx",
"args": ["plantuml-mcp-server"],
"env": { "PLANTUML_SERVER_URL": "https://www.plantuml.com/plantuml" }
}
}
}
generate_plantuml_diagram, encode_plantuml, decode_plantuml) in prompts to create, share, or fix diagrams.output_path parameter saves diagrams within allowed directories.PLANTUML_ALLOWED_DIRS.!include, external libraries, C4, sequence, class diagrams, etc.https://www.plantuml.com/plantuml. You can point PLANTUML_SERVER_URL to a private instance if desired..svg and .png are permitted.PLANTUML_ALLOWED_DIRS to a colon‑separated list of directories or * for unrestricted access (use with caution).make test or make test-mcp after installing dependencies.A Model Context Protocol (MCP) server that provides PlantUML diagram generation capabilities for Claude Desktop and Claude Code.
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 stringsplantuml_error_handling - Guidelines for handling PlantUML syntax errors and implementing auto-fix workflowsThis prompt provides Claude instances with comprehensive instructions on how to:
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.
# Using default PlantUML server
claude mcp add plantuml --scope user --env PLANTUML_SERVER_URL=https://www.plantuml.com/plantuml -- npx plantuml-mcp-server
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.
After setup, you can ask Claude to:
!include directives and external librariesThe 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=*
> add c4 diagram for this project in readme 'C4 diagram for plantuml-mcp-server' section
> add sequence diagram in readme in architecture section
> show me basic oauth2 flow png, open it in browser
# Clone and setup
git clone https://github.com/mzagar/plantuml-mcp-server.git
cd plantuml-mcp-server
make setup
# Building & Running
make build # Clean build TypeScript to JavaScript
make dev # Development mode with watch
make run # Build and run the server locally
# Testing
make test # Basic server functionality test
make test-mcp # Comprehensive testing with mcptools CLI
make test-ci # Fast CI tests (no external dependencies)
# Setup & Installation
make install # Install npm dependencies
make setup # Full setup (install + build + Claude Code config)
make setup-claude # Show Claude Code MCP configuration instructions
# Release Management
make release-patch # Create patch release (0.1.0 → 0.1.1)
make release-minor # Create minor release (0.1.0 → 0.2.0)
make release-major # Create major release (0.1.0 → 2.0.0)
# Utilities
make clean # Clean build directory
make help # Show all available commands
| Variable | Description | Default |
|---|---|---|
PLANTUML_SERVER_URL |
PlantUML server URL | https://www.plantuml.com/plantuml |
PLANTUML_ALLOWED_DIRS |
Additional directories for output_path (colon-separated, or * for any) |
CWD only |
MIT License - see LICENSE file for details.
Please log in to share your review and rating for this MCP.
Explore related MCPs that share similar capabilities and solve comparable challenges
by modelcontextprotocol
A Model Context Protocol server for Git repository interaction and automation.
by zed-industries
A high‑performance, multiplayer code editor designed for speed and collaboration.
by modelcontextprotocol
Model Context Protocol Servers
by modelcontextprotocol
A Model Context Protocol server that provides time and timezone conversion capabilities.
by cline
An autonomous coding assistant that can create and edit files, execute terminal commands, and interact with a browser directly from your IDE, operating step‑by‑step with explicit user permission.
by upstash
Provides up-to-date, version‑specific library documentation and code examples directly inside LLM prompts, eliminating outdated information and hallucinated APIs.
by daytonaio
Provides a secure, elastic infrastructure that creates isolated sandboxes for running AI‑generated code with sub‑90 ms startup, unlimited persistence, and OCI/Docker compatibility.
by continuedev
Enables faster shipping of code by integrating continuous AI agents across IDEs, terminals, and CI pipelines, offering chat, edit, autocomplete, and customizable agent workflows.
by github
Connects AI tools directly to GitHub, enabling natural‑language interactions for repository browsing, issue and pull‑request management, CI/CD monitoring, code‑security analysis, and team collaboration.
{
"mcpServers": {
"plantuml": {
"command": "npx",
"args": [
"plantuml-mcp-server"
],
"env": {
"PLANTUML_SERVER_URL": "https://www.plantuml.com/plantuml"
}
}
}
}claude mcp add plantuml npx plantuml-mcp-server