Skip to main content
Glama
PlantUML SLD MCP Server

PlantUML SLD MCP Server

by puran-water

PlantUML SLD MCP Server

MCP server for generating electrical Single-Line Diagrams (SLDs) using PlantUML.

Features

  • Generate SLD diagrams from YAML topology definitions

  • Bootstrap topology from load-list-skill output

  • Support for multiple distribution templates (radial, redundant, generator)

  • System view (collapsed) and detailed view (expanded) rendering

  • Shareable PlantUML URLs for collaboration

  • Machine-readable YAML topology as source of truth

Related MCP server: excalix

Installation

# Using uv
uv pip install -e .

# With optional pandapower analysis
uv pip install -e ".[analysis]"

# With dev dependencies
uv pip install -e ".[dev]"

PlantUML Backend

The server requires a PlantUML backend. Install one of:

  1. Native binary (recommended):

    apt install plantuml
  2. Java JAR:

    export PLANTUML_JAR=/path/to/plantuml.jar
  3. Docker:

    docker pull plantuml/plantuml

MCP Tools

Tool

Description

sld_validate_topology

Validate SLD topology YAML against schema

sld_get_plantuml_source

Generate PlantUML source from topology

sld_get_plantuml_source_per_bus

Generate PlantUML source for a single bus/MCC

sld_generate_diagram

Render diagram to PNG/SVG

sld_encode_plantuml

Generate shareable PlantUML URLs

sld_check_plantuml

Check PlantUML backend availability

sld_list_symbols

List available electrical symbols

sld_bootstrap_from_loadlist

Create topology from load-list-skill output

Usage

Claude Code Configuration

Add to your Claude Code MCP settings:

{
  "mcpServers": {
    "plantuml-sld": {
      "command": "uv",
      "args": ["run", "--directory", "/path/to/plantuml-sld-mcp-server", "plantuml-sld-mcp"]
    }
  }
}

Example Workflow

  1. Bootstrap from load list:

    # Use sld_bootstrap_from_loadlist with load-list.yaml
    # Choose distribution template: single_utility_radial
  2. Validate topology:

    # Use sld_validate_topology to check for errors
  3. Generate diagram:

    # Use sld_generate_diagram for PNG/SVG output
    # Or sld_encode_plantuml for shareable URL

Topology Schema

See schemas/sld-topology.schema.yaml in electrical-distribution-skill for the full schema.

Key Components

  • Buses: Main switchboards, MCCs, distribution panels

  • Equipment: Utilities, transformers, breakers, motors, VFDs

  • Connections: Feeders, bus ties, control circuits

Distribution Templates

Template

Description

single_utility_radial

Utility → Transformer → MSB → MCCs

utility_plus_generator

Adds standby generator with ATS

dual_utility_redundant

Split bus with tie breaker

View Modes

  • System View: Collapsed buses with aggregated loads

  • Detailed View: Individual feeders and equipment per bus

Development

# Run tests
pytest

# Run with coverage
pytest --cov=src

# Lint
ruff check src tests

Workflow Integration

This server is part of the puran-water electrical engineering workflow:

┌─────────────────────────┐     ┌──────────────────────────┐     ┌─────────────────────┐
│  equipment-list-skill   │ ──► │    load-list-skill       │ ──► │ electrical-         │
│  (equipment + power_kw) │     │    (FLC, protection,     │     │ distribution-skill  │
└─────────────────────────┘     │     MCC schedules)       │     │ (SLD generation)    │
                                └──────────────────────────┘     └─────────────────────┘
                                             │                              │
                                             │                              ▼
                                             │                   ┌─────────────────────┐
                                             └──────────────────►│ plantuml-sld-mcp    │
                                                                 │ (this server)       │
                                                                 └─────────────────────┘
                                                                            │
                                                                            ▼
                                                                 ┌─────────────────────┐
                                                                 │ PlantUML PNG/SVG    │
                                                                 │ + shareable URLs    │
                                                                 └─────────────────────┘

Upstream (Data Sources)

Companion Skill

Similar Pattern

License

MIT License - Puran Water

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables generating Excalidraw architecture diagrams from a topology spec, with automatic layout, styling, and export to .excalidraw, SVG, and PNG files.
      12 npm
      MIT
    • A
      license
      A
      quality
      B
      maintenance
      Electrical single-line and multi-line diagrams as JSON: build them, check them against NF C 15-100 / IEC 60364 rules, draw SVG/PDF, export wire lists and bills of materials. Hosted endpoint at https://mcp.uniwire.sh/mcp.
      34
      14
      178 PyPI
      14
      Apache 2.0
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables source-preserving import and analysis of EPLAN export reports (devices, connections, PLC I/O, terminals, cables, parts, network, pages) as immutable queryable snapshots, plus inspection of DXF/PDF/DWG drawings and derivation of electrical project evidence. Works offline without EPLAN, supporting querying, duplicate/endpoint checks, revision comparison, and verified JSON export.
      MIT