Logo di PowerMCP

PowerMCP

Organizzazione
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.

AutorePower-Agent
RepositoryPowerMCP
LinguaPython
Fork
65
Stelle
218
Strumenti disponibili
0
Tipo di trasportostdio
LicenzaMIT
Link
  • Collega gli strumenti ai flussi di lavoro IA

    PowerMCP mette a disposizione funzionalità MCP utilizzabili da client e agenti IA compatibili.

  • 0 strumenti disponibili

    Esplora le azioni richiamabili qui sotto, con nomi e descrizioni quando forniti dal server.

  • Configurazione pronta da copiare

    Usa gli esempi di installazione per configurare questo server nel tuo client MCP preferito.

  • Indicatori di interesse open source

    218 stelle e 65 fork nel repository collegato.

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

Usa MCP PowerMCP con più modelli IA

TypingMind collega gli strumenti MCP a livello di area di lavoro: una volta connesso PowerMCP, puoi usarlo con diversi modelli IA in TypingMind, senza configurarlo separatamente per ogni modello. Questa integrazione MCP viene eseguita localmente sul tuo dispositivo tramite il connettore MCP di TypingMind.

Guida alla configurazione del connettore locale

Usa questo metodo quando il server MCP deve accedere a file locali, app o risorse private sul tuo computer.

1

Apri le impostazioni MCP

In TypingMind, vai su Impostazioni, Impostazioni avanzate, poi su Model Context Protocol e scegli Configura MCP.

  1. Apri TypingMind nel tuo browser.
  2. Fai clic sull'icona Impostazioni.
  3. Vai a Impostazioni avanzate.
  4. Apri la sezione Model Context Protocol.
  5. Fai clic su Configura MCP e scegli Questo dispositivo.
Schermata di configurazione del connettore MCP di TypingMind con Questo dispositivo selezionato
2

Esegui il comando del connettore

Scegli Questo dispositivo, copia il comando da TypingMind ed eseguilo nel terminale. Lascia il processo in esecuzione mentre usi MCP.

  1. Copia il comando di configurazione mostrato da TypingMind.
  2. Apri Terminale su macOS o Windows Terminal su Windows.
  3. Incolla ed esegui il comando.
  4. Conferma l'installazione del pacchetto se il terminale ti chiede di procedere.
  5. Tieni aperta la finestra del terminale con il processo in esecuzione mentre usi gli strumenti MCP.
3

Aggiungi PowerMCP come server

Quando lo stato del connettore è Pronto, fai clic su Modifica server e incolla la configurazione del server MCP.

  1. Attendi che lo stato del connettore sia Pronto.
  2. Fai clic su Modifica server.
  3. Incolla la configurazione del server MCP di PowerMCP.
  4. Salva l'elenco dei server.
  5. Aggiorna per verificare che il connettore sia ancora pronto.
Impostazioni MCP di TypingMind con un server attivo e il pulsante Modifica server
{
  "mcpServers": {
    "powermcp": {
      "command": "npx",
      "args": [
        "-y",
        "<mcp-server-package>"
      ]
    }
  }
}
4

Usa la connessione con diversi modelli

Salva l'elenco dei server, apri Plugin, abilita gli strumenti MCP di PowerMCP, poi seleziona un modello IA supportato in TypingMind e usa gli strumenti in chat o assegnali a un agente IA.

  1. Apri la pagina Plugin in TypingMind.
  2. Abilita gli strumenti MCP di PowerMCP.
  3. Avvia una chat e scegli il modello IA che vuoi usare.
  4. Usa gli strumenti MCP in chat o assegnali a un agente IA.
  5. Passa a un altro modello IA quando serve, senza riconnettere MCP.
Chat di TypingMind che usa gli strumenti MCP abilitati con un modello IA selezionato
Puoi usare PowerMCP per aiutarmi con questa attività?
PowerMCP
Certo. Ho letto.
Ecco cosa ho trovato con PowerMCP.

Domande frequenti

A cosa serve il server MCP PowerMCP?

PowerMCP è un server MCP che consente ai client IA compatibili di accedere a strumenti e informazioni di contesto esterni. In TypingMind puoi aggiungere questo server MCP una sola volta e rendere disponibili i suoi strumenti nella tua area di lavoro IA.

Posso usare PowerMCP MCP con più modelli IA in TypingMind?

Sì. TypingMind collega gli strumenti MCP a livello di area di lavoro, quindi puoi usare PowerMCP con diversi modelli IA come Claude, ChatGPT, Gemini o altri modelli che hai configurato in TypingMind, senza dover configurare il server MCP separatamente per ogni modello.

Perché usare il connettore MCP PowerMCP con TypingMind?

TypingMind è una delle migliori interfacce per chattare con gli LLM perché riunisce più modelli IA, prompt, plugin, agenti IA, chiavi API e strumenti MCP in un'unica area di lavoro. Collegando PowerMCP, puoi usare i suoi strumenti MCP con i tuoi modelli preferiti e mantenere organizzato il tuo flusso di lavoro in chat su TypingMind.

Come collego PowerMCP MCP a TypingMind?

PowerMCP funziona tramite il connettore MCP locale di TypingMind. È la soluzione ideale quando il server MCP deve accedere a file locali, app desktop, strumenti da riga di comando o risorse private sul tuo computer.

Quali strumenti offre PowerMCP MCP in TypingMind?

PowerMCP mette a disposizione funzionalità MCP che puoi attivare dalla pagina Plugin di TypingMind e usare in chat o assegnare agli agenti IA.

Devo condividere le mie chiavi API con TypingMind per usare PowerMCP MCP?

No. TypingMind privilegia il funzionamento in locale e ti permette di mantenere il controllo su fornitori di modelli, chiavi API, prompt e configurazione MCP. Se PowerMCP richiede l'autenticazione, aggiungi le intestazioni, le impostazioni OAuth o la configurazione locale necessarie per quel server MCP quando crei la connessione.

Server MCP correlati

Vedi tutti

Crea subito la tua area di lavoro IA

Iscriviti alla nostra newsletter per ricevere aggiornamenti sulle nuove funzionalità e sulle prossime iniziative a premi 👇