This MCP server includes a PlantUML Encoder tool that allows you to encode PlantUML diagrams into shareable URLs for uml.planttext.com. The tool compresses PlantUML code and generates a URL that can be used to view the diagram.
How it works
The tool takes PlantUML diagram code and encodes it using deflate compression and custom alphabet mapping, then generates a shareable URL.
PlantUML Syntax Rules
The tool enforces mandatory syntax rules:
Rule 1: Nameless @startuml
❌ WRONG: @startuml MyDiagram
✅ CORRECT: @startuml
Rule 2: camelCase Classes
❌ WRONG: class my-class
✅ CORRECT: class myClass
Violating these rules returns an INVALID_SYNTAX error.
Example usage
Input PlantUML code:
Alice -> Bob: Hello
Bob -> Alice: Hi
The tool will encode this to a URL like:
https://uml.planttext.com/plantuml/svg/Syp9J4vLqBLJSCfFibBmICt9oUTooay2YJY2fAmKF381
You can visit this URL to see your PlantUML diagram rendered as SVG.
Tool parameters
plantumlCode(string): PlantUML diagram code to encode (max 50KB)
Error handling
The tool validates input and returns appropriate error codes:
EMPTY_CODE: PlantUML code is required and cannot be emptyCODE_TOO_LARGE: PlantUML code exceeds maximum size of 50KBINVALID_SYNTAX: Violates strict syntax rulesENCODING_FAILED: Failed to encode PlantUML diagram