mcp-js

v0.2.4
@plantuml/mcp-js Checked 9 hours ago Published 20 days ago

Pure Node/JS Model Context Protocol (MCP) server for PlantUML, powered by the TeaVM-compiled engine.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

plantuml_version

Returns the version of the embedded PlantUML library (TeaVM JS build).

check_syntax

Checks the syntax of a single PlantUML diagram without rendering it. Returns a JSON object containing: 'valid' (boolean), 'diagramType' (if valid), 'lineCount', 'warnings' (list of non-fatal warnings), and on failure 'errorLineNumber' (1-based line number), 'errorMessage', 'errorLine' (the offending source line, when available), and 'errorContext'.

ParameterTypeDescription
source *stringThe PlantUML source to check, including @start.../@end... (a single diagram)

render_diagram

Renders a single PlantUML diagram to a deterministic SVG. Returns a JSON object containing: 'valid' (boolean), and when valid 'diagramType', 'lineCount', 'warnings' (list of non-fatal warnings) and 'svg' (the rendered SVG as a string). On failure it has the same error shape as check_syntax: 'errorLineNumber' (1-based), 'errorMessage', 'errorLine' (the offending source line, when available) and 'errorContext'.

ParameterTypeDescription
source *stringThe PlantUML source to render, including @start.../@end... (a single diagram)

explain_diagram

Explains how a single PlantUML diagram is parsed, line by line. Returns a JSON array of objects, each containing: 'input' (the source line(s) that produced the explanation), 'explain' (a human-readable explanation), and 'line' (1-based line number, when available).

ParameterTypeDescription
source *stringThe PlantUML source to explain, including @start.../@end... (a single diagram)