Skip to main content
Glama

PCM MCP

An MCP server for ABB / Hitachi Energy PCM600 (Protection and Control IED Manager).

No such server exists publicly β€” this is a from-scratch build. Status: Phases 1-4 complete, 24 tools working end-to-end over stdio against PCM600 2.14.

Tier 0 β€” offline analysis (no PCM600 install needed)

Reads and reasons about IEC 61850 SCL files (.scd, .icd, .iid, .cid, .ssd) already exported from PCM600, and .apcmp project archives.

Tool

Purpose

scl_summary

Header, substation/voltage-level/bay tree, inventory counts

scl_list_ieds

Every IED with manufacturer, type, config version, IP addressing

scl_get_ied

One IED in detail: logical devices, logical nodes, datasets, control blocks

scl_list_datasets

Datasets and their FCDA members

scl_list_goose

GOOSE publishers + addressing; flags publishers with no GSE address

scl_list_reports

Report control blocks: buffering, trigger options, timing

scl_list_addresses

IP addressing per access point; flags duplicate IPs / APPIDs / MACs

scl_check_goose_bindings

Traces publishers β†’ subscribers; catches unsubscribed publishers, unknown IEDs/control blocks, and subscriptions to signals the dataset doesn't carry

scl_validate

Referential integrity β€” dangling dataset refs, FCDAs pointing at missing logical nodes, Communication/IED mismatches, duplicates. Optional xsd_path for schema validation

scl_diff

Structural, model-level diff of two SCL files across 11 categories

apcmp_summary

Inspect a .apcmp project archive without importing it β€” project name, IED inventory, and whether the required connectivity packages are installed

apcmp_logic

Recover ACT application logic from a .apcmp without importing it β€” worksheets, signals, blocks; flags naming clashes and device groups where one member lacks what its siblings have

pcm_probe_archive

Characterise any PCM600 archive without assuming its layout β€” for file kinds not yet verified against a real sample (.apcmi, .apcmt)

scl_diff compares the parsed model, not the text. PCM600 reorders elements and rewrites attributes on every export, so a text diff of two SCDs is unusable β€” a one-setting change can look like a thousand-line rewrite.

scl_validate's XSD support is opt-in: the IEC 61850-6 schema is a licensed IEC deliverable and isn't bundled here (nor shipped with PCM600), so pass your own copy via xsd_path if you want it. The rule-based checks are the primary value β€” XSD only catches syntax.

apcmp_logic reads the ACT logic sheets, which PCM600 stores as XML inside the project database and which survive as recoverable text. That means application logic can be reviewed even when the connectivity package needed for an import is missing.

Its asymmetry checks are the useful part, because they find the defects that are invisible when reading sheet by sheet β€” each sheet looks self-consistent:

  • Device groups β€” a concept present for some members and not others (on a real 3-breaker scheme: B3 lacked the fail-to-open/close and breaker-failure supervision B1 and B2 both had).

  • Source pairs β€” an A-side signal with no B-side counterpart, and vice versa. In a two-source transfer scheme this is where inconsistent failure handling hides.

  • Transfer direction β€” concepts tagged for one direction only. Where one direction carries an explicit _BA/_AB suffix and the other reuses untagged names, the second direction was typically added as a parallel copy rather than the original logic being generalised.

  • Letter-transposition typos β€” SRCA_AVAIL vs SCRB_AVAIL, where SRC silently became SCR. Deliberately narrow: it will not flag FTC/FTO (different concepts) or BA1/BA4 (legitimate numbering), because a noisy detector is worse than none in a safety review. Limits are reported in every result β€” block-to-block wiring and setting values are not recoverable, so absence in the output is not proof of absence in the project.

apcmp_summary is the import pre-flight. PCM600's import silently ignores IEDs whose object type it does not recognise, so importing a project whose connectivity package is missing can discard IEDs with no error. Run it first. Note the archive's project name (what -p takes) is not the database name β€” the tool reports both.

Resource pcm600://config reports resolved config and which tiers are available.

Tier 1 β€” drives the PCM600 CLI (needs PCM600 installed)

All read-only with respect to the PCM600 project database.

Tool

Purpose

pcm_cli_info

Detected install, SQL version, connectivity packages, and a live reachability check

pcm_export_scd

Export a project's SCD

pcm_export_parameters

One IED's parameters to .csv / .xrio (by technical key)

pcm_export_bulk_parameters

Every IED's .xrio into a directory β€” needs no technical key

pcm_export_ied

One IED as .apcmi

pcm_export_project

Whole project as .apcmp

pcm_validate_parameters

List deviations a parameter import would make. Validates only

Tier 1 degrades cleanly: if PCM600 isn't detected, these report why and the offline tools keep working.

It will never talk to a physical relay. PCM600Cmd does expose eight commands that open a connection to a live IED β€” write-ied, read-ied, and their -under-bay / -under-voltage-level / -under-substation variants. All eight are on a hard denylist in cli.py: the wrapper refuses to build the argv, and no setting enables them. --allow-unsigned-file is refused too. See DESIGN.md Β§6.

Success is never inferred from the exit code. PCM600Cmd returns 0 even on failure. Outcome comes from parsing its log output and verifying the output artifact exists and is non-empty.

Existing export files are never silently overwritten β€” pass overwrite=true deliberately.

Tier 1 β€” mutating (off by default)

Tool

Purpose

pcm_import_scd

Import an SCD. Counts IEDs before, re-exports after, and reports any that vanished

pcm_import_parameters

Import one IED's settings. Runs validate-parameters first and aborts if it fails

pcm_import_bulk_parameters

Bulk .xrio import. States that no per-file pre-flight exists

pcm_import_ied

Import an .apcmi/.apcmt into a bay, voltage level or substation

All four require PCM_MCP_ALLOW_WRITES=1 and confirm=true β€” two independent gates β€” and snapshot the project before touching it.

The snapshot is not rollback. PCM600 has no CLI command to restore a project; an .apcmp can only be re-imported by hand in the GUI. Every mutating tool says so in its own output.

The IED-loss verification on pcm_import_scd exists because PCM600's import silently ignores IEDs whose object type it does not recognise. A missing connectivity package makes IEDs disappear with no error, so the tool round-trips the SCD back out and compares rather than trusting silence.

Related MCP server: Semantic Model MCP Server

Setup

Requires Python β‰₯3.12 (built and tested on 3.14).

cd C:\theWork\pcm-mcp
python -m venv .venv
.\.venv\Scripts\python.exe -m pip install -e ".[dev]"

PCM_MCP_WORKSPACE is required β€” it is the allowlist root for every path argument, so there is no safe default and the server refuses to start without it.

Var

Meaning

Default

PCM_MCP_WORKSPACE

Allowlisted root for all file access

required

PCM600_BIN

PCM600 bin dir containing PCM600Cmd.exe

auto-detected

PCM_MCP_ALLOW_WRITES

1 enables mutating tools (none exist yet β€” Phase 4)

0

PCM_MCP_CLI_TIMEOUT

Seconds per PCM600Cmd call

600

PCM_MCP_AUDIT_LOG

JSONL audit path

$WORKSPACE/.pcm-mcp-audit.jsonl

Register with Claude Code

{
  "mcpServers": {
    "pcm600": {
      "command": "C:\\theWork\\pcm-mcp\\.venv\\Scripts\\python.exe",
      "args": ["-m", "pcm600_mcp.server"],
      "env": { "PCM_MCP_WORKSPACE": "C:\\theWork\\pcm-mcp" }
    }
  }
}

Tests

.\.venv\Scripts\python.exe -m pytest -q            # 203 passed, 13 skipped
.\.venv\Scripts\python.exe scripts\smoke_stdio.py  # live stdio handshake

Most skips are the integration suite (below) plus the symlink-escape test, which needs Windows Developer Mode. The smoke script drives the real transport: initialize β†’ tools/list β†’ tools/call β†’ path-confinement refusal.

Integration tests against a real PCM600

tests/test_integration_cli.py drives the installed PCM600Cmd.exe for real. It skips cleanly when prerequisites are absent, so it is safe to run anywhere.

Three tests need only PCM600 installed and run automatically β€” CLI reachability, the IED-communication denylist against the real binary, and the regression guard for exit-code-0-on-failure. The rest need a project:

$env:PCM_MCP_TEST_PROJECT = "SCRATCH_MCP_TEST"          # a SCRATCH project, never production
$env:PCM_MCP_TEST_TECHNICAL_KEY = "AA1J1Q01A1"          # optional; unlocks per-IED tests
.\.venv\Scripts\python.exe -m pytest tests/test_integration_cli.py -v -rs

Mutating tests additionally require PCM_MCP_ALLOW_WRITES=1. Point these at a scratch project only β€” a bad import can only be undone by a manual GUI import of the snapshot.

test_export_ied_then_probe_the_format is the one to run first once a project exists: it produces a real .apcmi and prints its structure, which settles whether the .apcmp readers can be reused for IED exports and templates.

Layout

src/pcm600_mcp/
  server.py        MCP wiring, the twenty-four tools
  cli.py           PCM600Cmd wrapper: denylist, log parsing, artifact verification
  config.py        env resolution, PCM600 + connectivity-pack detection, tier availability
  safety.py        path confinement, write gating, audit log
  apcmp.py         .apcmp project-archive reader (ZIP + metadata sidecars)
  act.py           ACT logic recovery from the project database inside a .apcmp
  scl/model.py     dataclass model of an SCL document
  scl/parse.py     namespace-agnostic lxml reader
  scl/checks.py    binding tracing + referential-integrity rules
  scl/diff.py      structural diff
tests/
  fixtures/synthetic.scd           clean-ish 2-IED substation
  fixtures/synthetic_modified.scd  one change per diff category
  fixtures/problems.scd            duplicate IPs/APPIDs/MACs, orphan address
  fixtures/bindings.scd            all four GOOSE binding failure modes
  fixtures/invalid.scd             eleven referential-integrity failures
  test_integration_cli.py          live PCM600 round-trips; skips without a project
scripts/smoke_stdio.py     end-to-end transport check
docs/                      DESIGN.md, PLAN.md, DISCOVERY.md, cli-help.txt

Documents

File

What

docs/DESIGN.md

Design, tool surface, safety model, ~30 cited references

docs/PLAN.md

Phased plan and status

docs/DISCOVERY.md

Phase 0 results: real CLI contract, .apcmp format, traps

docs/cli-help.txt

Verbatim PCM600Cmd help, captured from the install

Current state

Phase 0  Discovery ............ MOSTLY DONE - CLI captured; scratch project needs GUI
Phase 1  Scaffold + SCL core .. DONE
Phase 2  Analysis / diff ...... SCL half DONE; parameter CSV/XRIO readers deferred (no sample)
Phase 3  CLI wrapper .......... DONE - cli_info verified live; 6 tools await a project to test
Phase 4  Mutating tools ....... DONE - 4 import tools, two gates, snapshot + verify
Phase 5  Packaging ............ partial (pyproject + .mcp.json snippet done)
Phase 6  Test & harden ........ partial (203 tests + stdio smoke + live integration suite)

Next action

Two things are blocked on data, not code:

  1. A project in the local PCM600 database. Six of the seven Tier 1 tools need one to be tested end-to-end (pcm_cli_info is already verified live, since export-system-info needs no project). There is no create-project CLI command, so this needs the GUI.

  2. A parameter .csv / .xrio sample to build the deferred params_* tools against. One read-only command supplies it and needs no technical key: export-bulk-parameters -p "<project>" -d "<dir>".

Also still untested: whether PCM600Cmd works with the PCM600 GUI open (DISCOVERY.md Β§0.7).

Available Tools

23 tools
apcmp_logicA

Read a project's ACT application logic out of a .apcmp archive without importing it.

PCM600 stores the ACT logic sheets as XML inside the project database, and that XML survives as readable text β€” so the application logic can be reviewed even when the connectivity package needed for an import is missing. Returns worksheet names, ACT signals, function-block instance names, and the IEC 61850 function instances referenced.

Also flags naming problems and structural asymmetry: the same negated concept written two different ways, names containing & or /, and β€” most usefully β€” concepts that exist for some devices in a group but not others (e.g. present for B1 and B2 but missing for B3), which is how an absent supervision or interlock hides in plain sight.

Limits, which matter: block-to-block wiring and all setting values are not recoverable this way. Absence of something in this output is not proof it is absent from the project. Use it for review, not as a substitute for opening the project.

Inputs: path (required), include_signals. Returns: object

apcmp_summaryA

Inspect a PCM600 .apcmp project archive without importing it.

Reports the project name to pass to PCM600Cmd -p, the IED inventory, and β€” critically β€” whether the connectivity packages the project needs are actually installed on this machine.

Run this BEFORE importing any .apcmp. PCM600's import defaults to silently ignoring IEDs whose object type it does not recognise, so importing a project whose connectivity package is missing can discard IEDs with no error reported.

The engineering data itself (SCL, parameters) lives in SQL Server databases inside the archive and cannot be read without a PCM600 import β€” this tool reads only the metadata sidecars.

Inputs: path (required). Returns: object

pcm_cli_infoA

Report the detected PCM600 installation and prove the CLI is reachable.

Runs export-system-info, the only command that needs no project, so this doubles as a health check. Also lists installed connectivity packages, which bound what IED types can be handled at all.

Inputs: no named parameters. Returns: object

pcm_export_bulk_parametersA

Export .xrio parameter files for every IED in a project into one directory.

Needs no technical key, which makes it the easiest way to discover what IEDs a project holds and what their keys are. Read-only; no relay contact.

Inputs: out_dir (required), project (required), overwrite. Returns: object

pcm_export_iedA

Export a single IED as an .apcmi file. Read-only; no relay contact.

Inputs: project (required), out_path (required), technical_key (required), overwrite. Returns: object

pcm_export_parametersA

Export one IED's parameters to .csv or .xrio (chosen by the file suffix).

technical_key is the PCM600 object-tree identity, e.g. AA1J1Q01A1 β€” not the SCL IED name. Read-only; no relay contact.

Inputs: project (required), out_path (required), technical_key (required), overwrite. Returns: object

pcm_export_projectA

Export a whole project as an .apcmp archive. Read-only; no relay contact.

Useful as a snapshot before any change β€” but note PCM600 has no CLI command to restore an .apcmp. Restoring one is a manual GUI import. Do not treat this as automated rollback.

Inputs: project (required), out_path (required), overwrite. Returns: object

pcm_export_scdA

Export a project's SCD file from the PCM600 database. Read-only; no relay contact.

project is the PCM600 project name, which is not necessarily the database name β€” if you have the .apcmp, run apcmp_summary first to get the right one. scl_version selects the IEC 61850 edition; omit it for the PCM600 default.

Refuses to overwrite an existing file unless overwrite=true, since an existing export is often the baseline you are about to diff against.

Inputs: project (required), out_path (required), overwrite, scl_version. Returns: object

pcm_import_bulk_parametersA

Import .xrio parameter files for many IEDs at once. MODIFIES PROTECTION SETTINGS.

Requires PCM_MCP_ALLOW_WRITES=1 and confirm=true. Snapshots first. Note this has a wider blast radius than the single-IED import and there is no per-file pre-flight validation available for the bulk form β€” prefer pcm_import_parameters per IED when the change matters.

Inputs: project (required), param_dir (required), confirm. Returns: object

pcm_import_iedA

Import an IED file (.apcmi/.apcmt/.pcmi/.pcmt) into a project. MODIFIES THE PROJECT.

Requires PCM_MCP_ALLOW_WRITES=1 and confirm=true. target_level must be one of bay, voltage-level or substation. Snapshots first.

Inputs: project (required), ied_file (required), target_level (required), confirm. Returns: object

pcm_import_parametersA

Import a parameter file into one IED of a project. MODIFIES PROTECTION SETTINGS.

Requires PCM_MCP_ALLOW_WRITES=1 and confirm=true. Snapshots the project first, and runs validate-parameters beforehand so the deviations this import will apply are reported rather than applied blind.

These are protection relay settings. A wrong value can mean failure to trip on a fault or a spurious trip. Read the validation output and agree it with the user before confirming.

The signature-bypass option (--allow-unsigned-file) is not available through this server.

Inputs: project (required), param_file (required), technical_key (required), confirm. Returns: object

pcm_import_scdA

Import an SCD file into a PCM600 project. MODIFIES THE PROJECT.

Requires PCM_MCP_ALLOW_WRITES=1 and confirm=true. Before importing it snapshots the project, and it counts the IEDs in the source SCD; afterwards it re-exports the SCD and counts again, so a silent IED loss is reported rather than passing as success.

That verification matters: PCM600's import defaults to ignoring IEDs whose object type it does not recognise, without reporting an error. If a connectivity package is missing, IEDs vanish quietly. Run apcmp_summary or check pcm_cli_info connectivity packages first.

ln_overwrite_allowed / smt_overwrite_allowed permit overwriting existing logical-node and Signal Matrix configuration. Both default to off because both discard engineering work.

Inputs: project (required), scd_path (required), confirm, ln_overwrite_allowed, +1 more. Returns: object

pcm_validate_parametersA

Check a parameter file against an IED in the project and list deviations.

Validates only β€” imports nothing, changes nothing. This is the pre-flight you run before any parameter import, and the deviations it lists are what that import would change.

Inputs: project (required), param_file (required), technical_key (required). Returns: object

scl_check_goose_bindingsA

Trace GOOSE publishers to subscribers and flag every way the binding can be broken.

Reports: publishers nobody subscribes to, publishers with no network address, subscriptions naming an IED or control block that does not exist, and β€” the subtle one β€” subscriptions to a signal the publisher's dataset does not actually carry.

Needs a file containing all the IEDs involved (an .scd), since bindings are cross-IED. A single-IED .cid cannot show them.

Inputs: path (required). Returns: object

scl_diffA

Structurally compare two SCL files β€” the as-built vs. design review.

Compares the parsed model, not the text. PCM600 reorders elements and rewrites attributes on every export, so a text diff of two SCDs is unusable; a one-setting change can look like a thousand-line rewrite. This reports added / removed / changed per IED, logical device, dataset (including membership), GOOSE publisher, report control block, subscription, IP and GSE addressing, and substation bay.

Inputs: baseline_path (required), candidate_path (required). Returns: object

scl_get_iedB

Detail one IED: logical devices, logical nodes, datasets and control blocks.

Inputs: ied (required), path (required). Returns: object

scl_list_addressesB

List IP addressing per IED access point, grouped by subnetwork.

Flags duplicate IP addresses and duplicate GOOSE APPID/MAC values, both of which break communication in ways that are painful to diagnose on site.

Inputs: path (required). Returns: object

scl_list_datasetsC

List datasets and their FCDA members. Optionally restrict to one IED.

Inputs: path (required), ied. Returns: object

scl_list_gooseA

List GOOSE publishers (GSEControl blocks) with their dataset and network addressing.

Cross-references the IED section against the Communication section, and flags any publisher that has no GSE address assigned β€” a common cause of GOOSE that silently never transmits.

Inputs: path (required). Returns: object

scl_list_iedsA

List every IED in an SCL file with manufacturer, type, config version and address.

Inputs: path (required). Returns: object

scl_list_reportsC

List report control blocks with buffering, trigger options and timing.

Inputs: path (required), ied. Returns: object

scl_summaryA

Summarise an SCL file: header, substation topology, and IED inventory counts.

Start here when handed an unfamiliar .scd/.icd/.cid file.

Inputs: path (required). Returns: object

scl_validateA

Validate an SCL file's internal consistency, and optionally against an XSD schema.

The default check is referential integrity, which is what actually breaks commissioning: control blocks pointing at missing datasets, dataset members pointing at missing logical nodes, Communication entries for IEDs that are not in the file, duplicate IPs / GOOSE APPIDs / MACs, duplicate names, empty datasets, report blocks with no trigger.

xsd_path is optional. The IEC 61850-6 schema is a licensed IEC deliverable and is not bundled with this server (nor shipped with PCM600), so supply your own copy if you want schema validation as well. Schema validation only catches syntax β€” it will not find any of the referential problems above.

Inputs: path (required), xsd_path. Returns: object

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    A3.7/5.0

    Scored across 23 tools

    Disambiguation5/5

    Every tool targets a distinct resource and action. scl_* tools are differentiated by operation (get, list, validate, diff, check), and pcm_* tools by export/import/validate. No two tools appear to do the same thing, even within similar areas like parameter export/import.

    Naming Consistency4/5

    Naming follows a clear prefix convention: scl_ for SCL operations, pcm_ for PCM600 operations, apcmp_ for archive inspection. Within each prefix, actions are mostly verb-first (export_*, import_*, list_*). Minor deviations like pcm_cli_info and apcmp_summary are not fully verb-noun but remain predictable.

    Tool Count4/5

    With 23 tools, the count is above the typical 3-15 range, but the server covers a broad domain: SCL analysis, project import/export, parameter management, validation, and diffing. Each tool has a distinct purpose, so the size feels justified rather than bloated.

    Completeness4/5

    The tool surface covers core workflows: SCL inspection, validation, diff, GOOSE binding analysis, project export/import, and parameter validation/import/export. Minor gaps exist, such as no direct SCL editing, no SMV control block tools, and no project listing, but these are workable and do not create dead ends.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      Safety-conscious MCP server for read-only access to Emerson DeltaV Edge systems, enabling engineering investigation workflows and offline artifact generation.
      2
      GPL 3.0
    • A
      license
      Not graded
      quality
      D
      maintenance
      MCP server for connecting to Microsoft Fabric and Power BI semantic models, enabling workspace browsing, dataset management, TMSL retrieval, DAX queries, model creation/editing, and includes a Best Practice Analyzer with 71 rules.
      2
      MIT
    • A
      license
      Not graded
      quality
      F
      maintenance
      MCP server for reverse engineering Windows executables and related binary formats, offering static analysis, Ghidra-assisted function recovery, plugin-driven tooling, and optional isolated Windows runtime execution.
      9 npm
      239
      MIT