PlantUML MCP Server
Converts PlantUML snippets into shareable diagrams with support for capability landscapes, business scenarios, and ArchiMate diagrams. Supports HTTP, SSE, and STDIO transports for integration with Claude Desktop, Flowise, and other MCP-compatible runtimes.
README
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,capability_landscape_input_format,archimate_diagram_input_format,business_scenario_input_format - 📚 Static resources:
resource://plantuml/server-guide,resource://plantuml/archimate-mapping - 🔒 Optional Bearer authentication via
MCP_API_KEY - ☁️ Optional shared storage export (
GENERATED_FILES_DIR+PUBLIC_FILE_BASE_URL)
Requirements
- Node.js 18+
- npm 9+
npm install
npm run build # emits dist/plantuml-mcp-server.js
Use 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 | MCP_TRANSPORT=http node dist/plantuml-mcp-server.js |
| SSE | Claude Desktop / Flowise over the network with push updates | MCP_TRANSPORT=sse node dist/plantuml-mcp-server.js |
| STDIO | Local CLI tools (npx, Claude Code CLI, Flowise managed process) | MCP_TRANSPORT=stdio npx plantuml-mcp-server |
HTTP transport
MCP_TRANSPORT=http \
MCP_HOST=0.0.0.0 \
MCP_PORT=8765 \
MCP_HTTP_PATH=/mcp \
node dist/plantuml-mcp-server.js
POST /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_HOST=0.0.0.0 \
MCP_PORT=8765 \
MCP_SSE_PATH=/sse \
MCP_SSE_MESSAGES_PATH=/messages \
node dist/plantuml-mcp-server.js
- Clients 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_TRANSPORT=stdio npx plantuml-mcp-server
# or run the compiled file directly
MCP_TRANSPORT=stdio node dist/plantuml-mcp-server.js
- Ideal 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. Update hostnames, ports, and API keys to match your deployment.
Environment Variables
| Variable | Default | Purpose |
|---|---|---|
LOG_LEVEL |
info |
emergency → debug supported |
PLANTUML_SERVER_URL |
https://www.plantuml.com/plantuml |
Upstream PlantUML renderer |
MCP_TRANSPORT |
http |
http, sse, or stdio |
MCP_HOST / MCP_PORT |
0.0.0.0 / 3000 |
Bind address + port (HTTP/SSE) |
MCP_HTTP_PATH |
/mcp |
HTTP JSON-RPC endpoint |
MCP_HTTP_ENABLE_JSON_RESPONSES |
false |
Return JSON body when true (for debugging) |
MCP_SSE_PATH |
/sse |
SSE stream endpoint |
MCP_SSE_MESSAGES_PATH |
/messages |
Message ingestion endpoint |
MCP_API_KEY |
unset | Enables Bearer auth when provided |
GENERATED_FILES_DIR |
/generated-files |
Where rendered diagrams are persisted |
PUBLIC_FILE_BASE_URL |
https://ob-file.fmpn.fr/files |
Base URL returned to clients for persisted diagrams |
PLANTUML_MCP_SKIP_AUTO_START |
unset | When true, skips auto-start so scripts can import the server class without launching transports |
Tools, Prompts & Resources
- Tools are automatically registered through
tools/list. They perform validation, optional auto-fixes, and return structured metadata (success, URLs, markdown snippets, encoded diagram data, and validation errors). - Prompts guide the model through PlantUML error handling and provide a ready-made capability landscape template.
- 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 -p 8765:8765 plantuml-mcp-server
Override environment variables (PLANTUML_SERVER_URL, MCP_API_KEY, etc.) as needed.
Testing & Tooling
npm run build– compile TypeScriptnpm 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>/healthz - Confirm auth headers match
MCP_API_KEY(Bearer token) if enabled - 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!
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。