PowerMCP logo

PowerMCP

Organization
Power-Agent

PowerMCP is an open-source collection of MCP servers for power system software like PowerWorld, PSSE and OpenDSS. These tools enable LLMs to directly interact with power system applications, facilitating intelligent coordination, simulation, and control in the energy domain.

PublisherPower-Agent
RepositoryPowerMCP
LanguagePython
Forks
65
Stars
218
Available tools
0
Transport typestdio
LicenseMIT
Links
  • Connect tools to AI workflows

    PowerMCP exposes MCP capabilities that can be used by compatible AI clients and agents.

  • 0 available tools

    Browse the callable actions below, including names and descriptions when provided by the server.

  • Ready-to-copy setup

    Use the installation snippets to configure this server in your preferred MCP client.

  • Open source signals

    218 stars and 65 forks from the linked repository.

PowerMCP ⚡

License: MIT Python Version

PowerMCP is an open-source collection of MCP servers for power system software like PowerWorld and OpenDSS. These tools enable LLMs to directly interact with power system applications, facilitating intelligent coordination, simulation, and control in the energy domain.

🌟 What is MCP?

The Model Context Protocol (MCP) is a revolutionary standard that enables AI applications to seamlessly connect with various external tools. Think of MCP as a universal adapter for AI applications, similar to what USB-C is for physical devices. It provides:

  • Standardized connections to power system software and data sources
  • Secure and efficient data exchange between AI agents and power systems
  • Reusable components for building intelligent power system applications
  • Interoperability between different AI models and power system tools

🤝 Our Community Vision

We're building an open-source community focused on accelerating AI adoption in the power domain through MCP. Our goals are:

  • Collaboration: Bring together power system experts, AI researchers, and software developers
  • Innovation: Create and share MCP servers for various power system software and tools
  • Education: Provide resources and examples for implementing AI in power systems
  • Standardization: Develop best practices for AI integration in the energy sector

🚀 Getting Started with MCP

📖 Quick start

🚀 New to PowerMCP? Start here!

The recommended way to get started is the powermcp package and its installer (see the Installation section below):

bash
pip install powermcp
powermcp install        # pick tools, capture local paths, write your MCP client config

📋 The PowerMCP Tutorial PDF documents the original low-code / manual setup — cloning the repo and hand-editing the Claude Desktop config. It predates the powermcp installer and is not the recommended path; use it only if you specifically want the manual approach.

Video Demos

Check out these demos showcasing PowerMCP in action:

  • Contingency Evaluation Demo: An LLM automatically operates power system software, such as PowerWorld and pandapower, to perform contingency analysis and generate professional reports.

  • Loadgrowth Evaluation Demo: An LLM automatically operates power system software, such as PowerWorld, to evaluate different load growth scenarios and generate professional reports with recommendations.

Useful MCP Tutorials

MCP follows a client-server architecture where:

  • Hosts are LLM applications (like Claude Desktop or IDEs) that initiate connections
  • Clients maintain 1:1 connections with servers, inside the host application
  • Servers provide context, tools, and prompts to clients

Check out these helpful tutorials to get started with MCP:

📦 Installation

PowerMCP installs as a single Python package with an interactive CLI. Python 3.10 through 3.14 is supported.

bash
pip install powermcp

The base install includes the open-source engines that need no extra setup — pandapower, PyPSA, and PowerIO (the cross-server case-conversion substrate). Every other tool is opt-in via an extra:

bash
pip install powermcp[psse]              # add PSS/E support
pip install powermcp[andes,opendss]     # add several tools at once
pip install powermcp[opensource]        # all open-source tools (ANDES, Egret, OpenDSS, surge, HOPE, LTSpice, GenX)
pip install powermcp[all]               # everything (closed-source tools still need the local software)

Set up with the interactive installer

bash
powermcp install

The wizard lets you pick tools (pandapower + PyPSA + PowerIO pre-selected), captures the local install path for any closed-source/EXE-based tools you choose (PSS/E, PSLF, PowerFactory, PSCAD, LTSpice), installs the right extras, and writes the MCP client configuration for Claude Desktop, Claude Code, and the Codex CLI. Use --dry-run to preview the changes, or --yes for a non-interactive core install.

In the interactive picker, move with ↑/↓ and press SPACE to toggle each tool before ENTER (ENTER alone keeps only the preselected tools). Prefer not to use the checkbox? Choose tools directly:

bash
powermcp install --tools psse,andes      # core + the listed tools
powermcp install --all                   # every tool available on this platform

Re-running powermcp install pre-checks the tools you've already installed or configured, so it preserves and updates your setup instead of resetting to the core tools. Paths for tools like LTSpice are auto-detected and pre-filled, so you can usually just press Enter.

CLI commands

CommandDescription
powermcp installSetup wizard — interactive, or --tools <ids> / --all (also --dry-run, --yes, --clients)
powermcp run <tool>Launch a server over stdio (used by the generated client config)
powermcp listList the available tools, extras, and Windows-only flags
powermcp doctorCheck each tool's dependencies and configured paths
powermcp config show / config set <tool>.<key> <path>Inspect / set local software paths

Closed-source / EXE-based tools

These tools wrap commercial or locally-installed software, so PowerMCP stores the local path in ~/.powermcp/config.toml (captured by powermcp install, or set manually with powermcp config set):

ToolConfig keysExample
PSS/Epsse.python_lib, psse.binpowermcp config set psse.python_lib "C:\Program Files\PTI\PSSE36\36.2\PSSPY311"
PSLFpslf.python_libpowermcp config set pslf.python_lib "C:\Program Files\GE PSLF\PSLF_PYTHON"
PowerFactorypowerfactory.python_pathpowermcp config set powerfactory.python_path "...\DIgSILENT\PowerFactory 2024\Python\3.11"
LTSpiceltspice.exe (auto-detected)Found automatically in standard locations — usually no setup needed. Override: powermcp config set ltspice.exe "C:\Program Files\ADI\LTspice\LTspice.exe"
HOPEhope.repo_root, hope.julia_binpowermcp config set hope.repo_root "C:\src\HOPE"
GenXgenx.repo_rootpowermcp config set genx.repo_root "/home/me/GenX.jl" — the GenX.jl checkout; GENX_DIR overrides it
PowerWorld(none)esa auto-discovers a running, licensed Simulator via COM; the powerworld extra also installs numba (required by esa)
PSCAD(none)pip install powermcp[pscad-windows] provides mhi-pscad; PSCAD must be installed

The Codex Desktop app on Windows has been reported to overwrite ~/.codex/config.toml; the Codex CLI is unaffected. If you use both, re-run powermcp install after Desktop edits.

Case compilation between servers (PowerIO)

PowerIO IR is the exchange format of this repository. PowerMCP runs the server shipped in PowerIO 0.11.2 (powermcp run powerio is python -m powerio.mcp); that server parses every grid exchange format, emits every target, summarizes, diagnoses, normalizes, lowers multiconductor networks, and calculates matrices. Its parse tool returns serialized PowerIO IR generation 2 ("schema": "pio-ir", "version": 2), a typed module carrying the electrical value, its provenance and its diagnostics. Every other server here consumes that document: the pandapower, PyPSA, ANDES and Egret adapters turn it into their own model with PowerIO's writers. PowerMCP itself never re-parses, re-validates, or recomputes what PowerIO states; it routes a declared value to a consumer that accepts it and owns only the final step into one simulator.

python
parsed = parse(path="case9.raw")                     # powerio server
ir = parsed["powerio_ir"]
summarize(powerio_ir=ir)
calc_matrix(matrix="ptdf", powerio_ir=ir)            # rows and columns carry bus ids and branch identities
diagnostics(powerio_ir=ir)
import_case_from_json(powerio_ir=ir, output_path="case9.nc")  # PyPSA
load_network_from_json(powerio_ir=ir)                         # pandapower
load_model_from_json(powerio_ir=ir)                           # Egret
load_network_from_json(powerio_ir=ir, out_path="case9.m")     # ANDES
emit(format="psse", destination="case9.raw", powerio_ir=ir)

powerio_ir is the argument every adapter takes; network_json remains an alias for the same document. A ScenarioSet requires scenario_id; a TimeSeries requires time_index; nested collections require both. An operating point entry reaches the solver as the network it states. The operating_point argument remains an alias for time_index.

python
import_case_from_json(
    powerio_ir=ir, output_path="dispatch.nc",
    scenario_id="high-demand", time_index=3,
)

Every adapter response carries the same tail: value_type (the PowerIO structural type that was selected), selection, diagnostics (full PowerIO records with code, severity, target, spans and suggested action) and warnings. The powerio adapters add the emission fidelity (exact_same_format when PowerIO echoed retained source bytes, canonical for fresh output) and the typed edits report described below, because they own the conversion into their own model. The package key keeps the IR context earlier clients read.

Typed edits before a solver import

The powerio adapters accept edits, a JSON list of what-if changes PowerIO applies as typed updates before the conversion. The whole list is validated first, then applied in list order; consecutive updates of one class apply as one atomic batch, and a bus load reallocation sees the values produced by the edits before it. The response reports the changed components, in application order, under edits.

opkeys
set_load_active_powerload, mw, terminal?
set_load_reactive_powerload, mvar, terminal?
set_generator_active_powergenerator, mw, terminal?
set_generator_reactive_powergenerator, mvar, terminal?
set_generator_voltage_magnitudegenerator, vm_pu
set_generator_in_servicegenerator, in_service
set_branch_in_servicebranch, in_service
set_transformer_tap_ratiotransformer, tap_ratio
set_transformer_phase_shifttransformer, shift_degrees
set_switch_closedswitch, closed
set_branch_thermal_ratingbranch, mva, terminal?
set_bus_load_active_powerbus, mw, allocation (proportional_to_current_active_power or equal)

Component ids are the stable identities PowerIO reports (loads:0, branches:3, or the source uid). A bus demand edit names an allocation rule because PowerIO never assigns aggregate demand to an arbitrary load.

python
load_network_from_json(
    powerio_ir=ir,
    edits='[{"op": "set_load_active_power", "load": "loads:0", "mw": 91.5},'
          ' {"op": "set_branch_in_service", "branch": "branches:3", "in_service": false}]',
)

Distribution networks

A multiconductor value is rejected by a balanced solver until the caller asks for the transformation: pass to_balanced=True (and base_mva) and the response carries PowerIO's readiness report under lowering, or call the powerio server's to_balanced_report and to_balanced tools first. Retaining a component does not establish that the selected solver models it. Use emit for a backend that needs files: OpenDSS output is a directory bundle whose master DSS artifact compile_opendss_file accepts; bmopf-json@0.1.0 and bmopf-json@0.2.0 select the BMOPF schema version (the latter writes draft BMOPF 0.2, subject to Task Force approval); geo-json writes a geographic layer.

The retired Package, model-json, package_json and package study_commit formats require migration: re-parse the original case and pass its powerio_ir.

PowerIO MCP paths support local files and file:// URIs. Set POWERIO_MCP_ALLOWED_ROOTS to an os.pathsep separated directory list to constrain the shared path policy. With no root variable set, paths stay beneath the directory the server process started in, which is rarely the directory an operator means. Legacy single-root environment aliases remain supported. Directory inputs check every descendant, and generated directories install from private sibling staging paths. Place POWERMCP_HOME under an allowed root for solver run artifacts. These checks cannot prevent another process from replacing a path after validation.

Running from a clone (without installing)

Every bundled server is still a standalone script. Clone the repo and run any server directly for use in Claude Desktop:

bash
python pandapower/panda_mcp.py
python PSSE/psse_mcp.py          # uses ~/.powermcp/config.toml if present, else legacy default paths
python -m powerio.mcp            # powerio ships its own server; the clone holds no copy

Testing with your LLMs

Note: All MCPs should be tested via an MCP client (Claude Desktop, Claude Code, or Codex) before submitting a PR to ensure consistency.

powermcp install writes the client configuration for you. The generated entries look like the example in config.json. (The PowerMCP Tutorial PDF covers the older manual / low-code setup and isn't needed for the package install.)

📚 Documentation

For detailed documentation about MCP, please visit:

🤝 Contributing

We welcome contributions! Please see our Contributing Guidelines for details.

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

🙏 Acknowledgments

Core Team

Special Thanks

Use PowerMCP MCP with multiple AI models

TypingMind connects MCP tools at the workspace level, so once PowerMCP is connected, you can use it with different AI models in TypingMind instead of setting it up separately for each model. This MCP runs locally through the TypingMind MCP connector on your device.

Setup guide to use the local connector

Use this when the MCP server needs access to local files, apps, or private resources on your computer.

1

Open the MCP settings

In TypingMind, go to Settings, Advanced Settings, then Model Context Protocol and choose Setup Connector.

  1. Open TypingMind in your browser.
  2. Click the Settings icon.
  3. Go to Advanced Settings.
  4. Open the Model Context Protocol section.
  5. Click Setup Connector and choose This Device.
TypingMind MCP connector setup screen with This Device selected
2

Run the connector command

Choose This Device, copy the command from TypingMind, and run it in Terminal. Keep the process running while you use MCP.

  1. Copy the setup command shown by TypingMind.
  2. Open Terminal on macOS or Windows Terminal on Windows.
  3. Paste and run the command.
  4. Approve the package install if Terminal asks you to proceed.
  5. Keep the Terminal window running while using MCP tools.
3

Add PowerMCP as a server

When the connector status is Ready, click Edit Servers and paste the MCP server configuration.

  1. Wait until the connector status shows Ready.
  2. Click Edit Servers.
  3. Paste the PowerMCP MCP server configuration.
  4. Save the server list.
  5. Refresh if you want to confirm the connector is still ready.
TypingMind MCP settings showing active server and Edit Servers button
{
  "mcpServers": {
    "powermcp": {
      "command": "npx",
      "args": [
        "-y",
        "<mcp-server-package>"
      ]
    }
  }
}
4

Use it across models

Save the server list, open Plugins, enable the PowerMCP MCP tools, then select any supported AI model in TypingMind and use the tools in chat or assign them to an AI agent.

  1. Open the Plugins page in TypingMind.
  2. Enable the PowerMCP MCP tools.
  3. Start a chat and choose the AI model you want to use.
  4. Use the MCP tools in chat or assign them to an AI agent.
  5. Switch to another AI model whenever needed without reconnecting MCP.
TypingMind chat using enabled MCP tools with a selected AI model
Can you use PowerMCP to help me with this task?
PowerMCP
Sure. I read it.
Here is what I found using PowerMCP.

Frequently asked questions

What is the PowerMCP MCP server used for?

PowerMCP is an MCP server that lets compatible AI clients connect to external tools and context. In TypingMind, you can add this MCP server once and make its tools available in your AI workspace.

Can I use PowerMCP MCP with multiple AI models in TypingMind?

Yes. TypingMind connects MCP tools at the workspace level, so you can use PowerMCP with different AI models such as Claude, ChatGPT, Gemini, or other models you have configured in TypingMind without setting up the MCP server separately for each model.

Why use PowerMCP MCP with TypingMind?

TypingMind is one of the best frontends for LLM chat because it brings multiple AI models, prompts, plugins, AI agents, API keys, and MCP tools into one workspace. With PowerMCP connected, you can use its MCP tools across your preferred models while keeping your chat workflow organized in TypingMind.

How do I connect PowerMCP MCP to TypingMind?

PowerMCP runs through the TypingMind local MCP connector. This is best when the MCP server needs access to local files, desktop apps, command-line tools, or private resources on your computer.

What tools does PowerMCP MCP provide in TypingMind?

PowerMCP exposes MCP capabilities that can be enabled from the TypingMind Plugins page and used in chat or assigned to AI agents.

Do I need to share my API keys with TypingMind to use PowerMCP MCP?

No. TypingMind is local-first and lets you keep your model providers, API keys, prompts, and MCP configuration under your control. If PowerMCP requires authentication, add the required headers, OAuth settings, or local configuration for that MCP server when you create the connection.

Related MCP Servers

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇