plantuml-mcp-js

Checks, explains and renders PlantUML diagrams to SVG on Node.js, with no Java runtime needed

Official · PlantUML JavaScript Local · stdio DesignDeveloper tools

57 popularity score ★ 13k ↓ 1.1k/wk

Connect your client

Local (npm)

Add in one click

Opens the app, which asks before it adds the server.

Or add it by command or config

Claude CodeTerminal
claude mcp add plantuml-js -- npx -y @plantuml/mcp-js
Claude Desktopclaude_desktop_config.json
{
  "mcpServers": {
    "plantuml-js": {
      "command": "npx",
      "args": [
        "-y",
        "@plantuml/mcp-js"
      ]
    }
  }
}
Cursor~/.cursor/mcp.json
{
  "mcpServers": {
    "plantuml-js": {
      "command": "npx",
      "args": [
        "-y",
        "@plantuml/mcp-js"
      ]
    }
  }
}
VS Code.vscode/mcp.json
{
  "servers": {
    "plantuml-js": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@plantuml/mcp-js"
      ]
    }
  }
}
Codex~/.codex/config.toml
[mcp_servers.plantuml-js]
command = "npx"
args = ["-y", "@plantuml/mcp-js"]
Gemini CLITerminal
gemini mcp add --scope user plantuml-js npx -- -y @plantuml/mcp-js

What it does

plantuml-mcp-js is the PlantUML project's own MCP server built for Node.js. PlantUML's Java engine is compiled to JavaScript with TeaVM from the same source as the regular PlantUML jar. That means an assistant can work with PlantUML diagram text without a JVM on the machine. It runs as a local stdio process started with npx.

It has four tools. One reports the embedded PlantUML version. One checks a diagram's syntax and returns the diagram type, line count, warnings and, when parsing fails, the line number and message of the error. One explains line by line how the engine reads the source. One renders the diagram to SVG. The SVG comes back as a string inside the tool's JSON reply. Nothing is written to disk. Text is measured with a built-in glyph width table, not the host's fonts, so the same source gives the same SVG on any machine. Layouts that normally need Graphviz (class, state, component and so on) go through the Viz.js WebAssembly build instead of a native dot binary.

The source of the published version (server.js) shows it reads no environment variables or command-line options. It also has no other transport besides stdio. Each tool takes just one input, `source`, which holds one diagram. A diagram that fails to parse comes back flagged as an error result, so clients can tell a broken diagram from a valid one.

What it needs

RuntimeNode.js

Node.js with npx, so the client can fetch and run the @plantuml/mcp-js package. No Java runtime, Graphviz install, account or API key is needed. Any MCP client that supports the stdio transport works.

Limits

Renders to SVG only. Its README puts PNG and PDF out of scope and points to the Java-based plantuml-mcp server for those. Each call takes a single diagram, not a file with several. It works on diagram text passed in the call. It does not read or save diagram files, and the SVG is returned inline, not saved. It runs over stdio only.

Who it suits

A good fit for developers who want an assistant to write, validate or preview PlantUML diagrams on a machine without Java, since npx is the only thing to install and nothing leaves the machine. If you need PNG or PDF output, or want to use your own PlantUML jar, choose the Java-based plantuml-mcp server, also from the PlantUML project, which its README names as the alternative. If the assistant has to save diagrams to files itself, pair this server with a file-system server.

Tools 4

plantuml_version
Reports the version of the bundled PlantUML engine.
check_syntax
Parses one diagram and reports whether it is valid, its type, warnings and the error line if any.
render_diagram
Draws one diagram as SVG and returns it in the reply along with the parse details.
explain_diagram
Walks through a diagram's source and says how each line is understood.

Similar servers