PlantUML Encoder Tool

Learn about the MCP tool that encodes PlantUML diagrams into shareable URLs.


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

Error handling

The tool validates input and returns appropriate error codes: