PlantUML MCP Server
Generates PlantUML diagrams including capability landscapes, business scenarios, and sequence diagrams, with tools for encoding/decoding PlantUML syntax and rendering shareable diagram URLs.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
PlantUML MCP Server
Flexible Model Context Protocol (MCP) server that turns PlantUML snippets into shareable diagrams.
All capabilities are exposed over HTTP, Server-Sent Events (SSE), and STDIO, so you can plug the server into Claude Desktop, Flowise, or any other MCP-compatible runtime.
Key Features
๐งฐ Tools:
generate_plantuml_diagram,generate_capability_landscape,generate_business_scenario,encode_plantuml,decode_plantuml๐งพ Prompts:
plantuml_error_handling,archimate_macro_reference,capability_landscape_input_format,archimate_diagram_input_format,business_scenario_input_format๐ Static resources:
resource://plantuml/server-guide,resource://plantuml/archimate-mapping๐ OIDC/JWKS resource-server authorization for HTTP and SSE
โ๏ธ Required
ob-fileexport via signed download URLs (OB_FILE_API_BASE_URL)๐ Optional OIDC client-credentials flow for
ob-file(OB_FILE_OIDC_*)
Related MCP server: ArchiMate MCP Server
Requirements
Node.js 18+
npm 9+
npm install
npm run build # emits dist/plantuml-mcp-server.jsUse npx plantuml-mcp-server or node dist/plantuml-mcp-server.js once built.
Transport Modes
Mode | When to use | How to start |
HTTP (default) | Direct REST-style integration, reverse proxies, health checks |
|
SSE | Claude Desktop / Flowise over the network with push updates |
|
STDIO | Local CLI tools |
|
HTTP transport
MCP_TRANSPORT=http \
MCP_AUTH_MODE=oidc \
OIDC_ISSUER_URL=https://your-issuer.example \
OIDC_AUDIENCES=https://mcp-servers.fmpn.fr/plantuml/api/mcp,https://mcp-servers.shared.mpn/plantuml/api/mcp \
MCP_RESOURCE_URL=https://mcp-servers.fmpn.fr/plantuml/api/mcp \
MCP_HOST=0.0.0.0 \
MCP_PORT=8765 \
MCP_HTTP_PATH=/mcp \
node dist/plantuml-mcp-server.jsPOST /mcpto initialize and send JSON-RPC payloads.GET /mcpandDELETE /mcpkeep the streamable session alive.GET /healthzis available for readiness probes.Sample client settings:
client_config_http.json.
SSE transport
MCP_TRANSPORT=sse \
MCP_AUTH_MODE=oidc \
OIDC_ISSUER_URL=https://your-issuer.example \
OIDC_AUDIENCES=https://mcp-servers.fmpn.fr/plantuml/api/mcp,https://mcp-servers.shared.mpn/plantuml/api/mcp \
MCP_RESOURCE_URL=https://mcp-servers.fmpn.fr/plantuml/api/mcp \
MCP_HOST=0.0.0.0 \
MCP_PORT=8765 \
MCP_SSE_PATH=/sse \
MCP_SSE_MESSAGES_PATH=/messages \
node dist/plantuml-mcp-server.jsClients connect to
/sse(GET) for events and POST JSON messages to/messages.Sample config for Claude Desktop / Flowise:
client_config_sse.json.
STDIO transport
MCP_AUTH_MODE=none MCP_TRANSPORT=stdio npx plantuml-mcp-server
# or run the compiled file directly
MCP_AUTH_MODE=none MCP_TRANSPORT=stdio node dist/plantuml-mcp-server.jsIdeal for local experiments,
mcpCLI, or Flowise nodes that spawn the binary.Example setups live in
client_config_stdio.json.
Sample Client Configurations
client_config_http.jsonโ streamable HTTP (default/mcp)client_config_sse.jsonโ SSE + dedicatedmessagesUrlclient_config_stdio.jsonโ STDIO examples fornpxand Flowise-managed processes
Drop these files into your MCP-aware client or copy the snippets as needed. Configure OAuth and hostnames for your deployment.
Environment Variables
Variable | Default | Purpose |
|
|
|
|
| Upstream PlantUML renderer |
|
|
|
|
| Bind address + port (HTTP/SSE) |
|
| HTTP JSON-RPC endpoint |
|
| Return JSON body when true (for debugging) |
|
| SSE stream endpoint |
|
| Message ingestion endpoint |
|
|
|
| required | Exact HTTPS issuer used for discovery and token validation |
| required | Exact public and internal PlantUML resource URLs, comma-separated |
| required | Canonical HTTPS resource URL advertised in RFC 9728 metadata |
| unset | Test-only: permit HTTP discovery/resource URLs on loopback |
| unset |
|
| unset | Bearer token used to call the |
| unset | Authelia OIDC discovery URL used to obtain a service access token |
| unset | Optional direct token endpoint override (useful for internal service-to-service calls) |
| unset | OIDC client identifier used by |
| unset | OIDC client secret used by |
|
| Scope requested for the machine upload/public-url flow |
|
| Internal OBFile audience for the separate machine token |
| unset | Optional |
| unset | Optional |
|
| Maximum rendered image size embedded directly in a tool result |
|
| When |
| unset | When |
OB_FILE_API_BASE_URL is mandatory for all diagram generation tools. Rendered diagrams are uploaded through ob-file and the MCP response returns only the public diagram_url produced by ob-file. If OB_FILE_OIDC_DISCOVERY_URL, OB_FILE_OIDC_CLIENT_ID, and OB_FILE_OIDC_CLIENT_SECRET are configured, the server obtains and caches an access token automatically via OAuth 2.0 client credentials. There is no fallback to shared-volume URLs or direct PlantUML URLs.
OIDC requires a signed access token with exact issuer and PlantUML audience, expiration, nonempty jti and human sub, client mcp-dcs-plantuml, and scope plantuml:render. Any authenticated user is accepted regardless of group membership. Each request is checked independently and each session is bound to its subject and client. Discovery must advertise the configured issuer and a same-origin HTTPS JWKS endpoint. RFC 9728 metadata is served under /.well-known/oauth-protected-resource followed by the canonical resource path. The OAuth client uses authorization code with PKCE and the standard claims policy configured by OB-SEC; its Codex and Claude callbacks are registered there.
For isolated local tests, set MCP_AUTH_MODE=none MCP_HOST=127.0.0.1; this bypass is rejected on non-loopback network binds. STDIO also requires explicit MCP_AUTH_MODE=none. Never expose this mode through a proxy. MCP_API_KEY no longer authenticates incoming requests. In OIDC mode, OBFile calls require the separate mcp-plantuml client-credentials identity, the OBFile audience and obfile:write; the incoming human token is never forwarded. The legacy OB_FILE_API_TOKEN fallback is available only in local mode.
Tools, Prompts & Resources
Tools are automatically registered through
tools/list. They perform validation and optional auto-fixes, persist rendered diagrams throughob-file, and return structured metadata plus native MCP PNGimagecontent up to the configured inline-size limit. SVG requests keep their public SVG URL and include a PNG preview for host compatibility.Diagram generation tools require
ob-fileand expose only the publicdiagram_urlandmarkdown_embed; internal PlantUML URLs and storage metadata are not returned.encode_plantumlreturns only the encoded payload and no longer exposes direct PlantUML render URLs.Prompts guide the model through PlantUML error handling and provide a ready-made capability landscape template.
archimate_macro_referenceis loaded fromdocumentation/archimate_macro_reference.md, so the reference can evolve without code changes.For ArchiMate, the official PlantUML stdlib defines the macros (
Business_Service,Motivation_Principle,Grouping,Rel_Serving, etc.), while fields such ascode,note,description,extra,raw,layout,format,legend_type, anduse_local_stdlibare extensions added bymcp-plantuml.When
EXPOSE_PROMPT_AS_TOOL=true, every prompt is mirrored as a tool for MCP clients that do not consume prompts.Resource templates expose onboarding content (
resource://plantuml/server-guide) so clients can self-discover usage instructions.
Docker Image
The provided Dockerfile builds the TypeScript sources and produces a minimal runtime image:
docker build -t plantuml-mcp-server .
docker run --rm -e MCP_TRANSPORT=http --env-file /path/to/oidc.env -p 8765:3000 plantuml-mcp-serverProvide the OIDC settings above through the environment file.
Testing & Tooling
npm run buildโ compile TypeScriptnpm run test:authโ signed-token and Streamable HTTP authorization contract tests with local fixturesnpm startโ run using the default HTTP transportnpm run start:sse/npm run start:stdioโ convenience scriptsnpm run test:business-scenarioโ snapshot test that convertstest_files/generate_sequence_diagram/payload.jsoninto PlantUML and compares it toexpected.pumlmake test-mcpโ smoke-test commands through themcpCLI
Need Help?
Verify connectivity with
curl http://<host>:<port>/healthzCheck the issuer, audience, client, group, scope, and protected-resource metadata when a bearer token is rejected
Use the MCP Inspector or Flowise node logs to trace JSON-RPC payloads
The server ships with everything required to operate over HTTP, SSE, and STDIO. Plug in the transport that matches your environment and start generating diagrams!
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogโฆ
This server cannot be deployed
Maintenance
Related MCP Connectors
Render, validate, encode/decode PlantUML diagram-as-code; 22 diagram types. Free, no auth.
Render, verify, describe, and safely edit Mermaid diagrams through MCP.
Generate cloud architecture diagrams, flowcharts, and sequence diagrams.
ChartAnt is a remote MCP server that gives your AI assistant 51 tools to draw charts, diagrams and maps as real PNG images with their own link, ready for email, Slack, slides or a README. - 40+ chart and diagram types: line, bar, column, pie, area, scatter, funnel, sankey, treemap, waterfall, gantt, heatmap, KPI cards, dashboards, flowcharts, mind maps, org charts and more. - Maps of every country: world maps, the states, provinces or regions of any country, and pin maps from coordinates. Region names in 20+ languages, with "did you mean" hints for names that don't match. - Charts that stay updated: sign in once and your assistant can save a chart at a fixed link. Later, say "add 10% to this month's sales" and the image at the same link updates. Copies can go to Slack, Teams, Discord or email on every change or on a schedule. - Nothing to install and no API key: paste the URL into Claude, ChatGPT, Cursor, VS Code, Windsurf or n8n. - EU-hosted. Chart data is used only to draw the image and is never logged.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceA tool that generates various UML diagrams through natural language descriptions or PlantUML code, functioning as an MCP server that can integrate with clients like Claude.27-
- AlicenseNot gradedqualityDmaintenanceEnables generation of PlantUML ArchiMate enterprise architecture diagrams with full ArchiMate 3.2 specification support across all 7 layers, including automatic validation, multi-format export (PNG/SVG/XML), and instant diagram viewing through a built-in HTTP server.33MIT
- AlicenseAqualityDmaintenanceMCP server for AI Diagram Maker โ generate software engineering diagrams from natural language, code, ASCII diagram, images, or Mermaid. Inline diagram rendering using MCP apps UI and diagram URL in responses. Works with Cursor, Claude Desktop, Claude Code, and any MCP-compatible AI.5134 npm10MIT
- FlicenseNot gradedqualityDmaintenanceEnables generating PlantUML diagrams directly from Claude Desktop, with tools to render, save, and obtain URLs or ASCII art.-