PowerFactory MCP Automation

PowerFactory MCP Automation

Enables natural-language automation of DIgSILENT PowerFactory for engineering tasks such as load-flow studies, short-circuit calculations, and network switching.

Category
Visit Server

README

PowerFactory MCP Automation

Natural-language automation for DIgSILENT PowerFactory using the Model Context Protocol (MCP).

This project lets an MCP client ask PowerFactory to run repeatable engineering tasks such as load-flow studies, bus-voltage extraction, line switching, three-phase short-circuit studies, and line N-1 short-circuit capacity sweeps.

Why this project exists

PowerFactory studies often require repetitive manual steps:

  1. Change network state.
  2. Run a calculation.
  3. Export results.
  4. Restore the original state.
  5. Repeat for the next contingency.

This repository wraps those steps behind controlled MCP tools so engineers can request study workflows in natural language while PowerFactory remains the calculation engine.

Features

  • MCP server for PowerFactory automation
  • In-app PowerFactory Python agent for robust GUI-session control
  • Load-flow execution
  • Bus-voltage and line-loading extraction
  • Line open/close control
  • Three-phase short-circuit calculation at a selected bus
  • Line N-1 short-circuit capacity study with CSV export
  • Example innovation proposal PDF/PPT generation scripts

Repository layout

.
├── src/powerfactory_mcp/
│   ├── agent.py                 # Run inside PowerFactory as MCP_Agent
│   ├── server_bridge.py         # Recommended MCP server
│   ├── server_direct.py         # Optional direct external API server
│   └── legacy_py33_bridge.py    # Legacy helper for old PowerFactory versions
├── scripts/
│   ├── find_powerfactory_python.ps1
│   └── test_bridge_connection.py
├── docs/
│   ├── ARCHITECTURE.md
│   ├── SETUP.md
│   ├── TROUBLESHOOTING.md
│   └── WORKFLOWS.md
├── examples/
│   └── n_minus_1_short_circuit_bus_5.csv
├── tools/
│   ├── generate_innovation_pdf.py
│   └── build_innovation_ppt.mjs
├── mcp_config.example.json
├── pyproject.toml
└── requirements.txt

Quick start

Install dependencies:

python -m venv .venv312
.\.venv312\Scripts\python.exe -m pip install -r requirements.txt

Create a Python script in PowerFactory named MCP_Agent, paste the contents of:

src/powerfactory_mcp/agent.py

Run MCP_Agent inside PowerFactory. Then test the bridge:

.\.venv312\Scripts\python.exe .\scripts\test_bridge_connection.py

Configure your MCP client using:

mcp_config.example.json

Example result

The included example ran a line N-1 three-phase short-circuit study at Bus 5. The limiting case was:

Outaged line: Line 4-5
Ikss: 1.0144 kA
Skss: 404.09 MVA

See:

examples/n_minus_1_short_circuit_bus_5.csv

Documentation

Notes

This project assumes you are using a properly licensed PowerFactory installation. It does not bypass, modify, or automate licensing.

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured