Name the project and its owner
PyPowSyBl MCP is a Model Context Protocol server, which means it gives an AI agent tools it can call. The tools sit on top of the pypowsybl power-system library. An agent can load a network, run an AC or DC load flow, clone a variant, run security analysis and plot a single-line diagram.
The project sits in the PowSyBl organisation on GitHub. It carries the MPL-2.0 licence with the line "Copyright (c) 2026, RTE", and it lists Jérôme Picault and Clément Goubet of RTE as its authors. On 2026-10-17 the repository was 115 days old, with 7 stars, 2 forks, 4 open items and roughly 10 commits. The last commit was on 2026-09-29 (a73d46d, a migration to version 2 of the MCP Python SDK). The package calls itself 0.1.0.dev1 and "Development Status :: 3 - Alpha". It has no releases and is not on PyPI. Its own README opens by calling it a prototype whose use in critical production systems is "discouraged".
That candour should be taken at face value, because the code agrees with it. The server pins pypowsybl 1.15.0 and speaks Streamable HTTP only, on port 9992. It keeps every session in memory: up to 100 sessions of 10 networks each, with a one-day lifetime. All of it is lost when the process restarts, and none of it is written anywhere an operator would look for it.
Ask the planner's question
A developer wants to know whether a 50 MW battery exporting at bus 3 overloads anything when one line trips. This is an N-1 study: it checks that the network stays within its limits after the loss of any single element. The solution I would build on this server answers the question in the order a planner would.
The agent loads the model and runs the base-case load flow. It clones a variant, so the base case stays untouched, and applies the export. It runs security analysis with N-1 line contingencies generated automatically, then lists post-contingency overloads and voltage violations. Last, it draws the substation and asks for a Python script the engineer can rerun.
The engineer signs the study. Nothing in the design writes back to an operational model, because the server's sessions are scratch space and should stay that way.
Correct two easy assumptions
The first assumption is that the agent can add a battery to the model. It cannot. The released code has no tool that creates an element. Issue #17 asks for one and pull request #20 is still open, and modify_network changes only what already exists. So the design emulates the battery in one of two ways: it sets target_p on a generator already connected at the bus, or it models the export as a negative load. The study records which. That is a workaround, and the report should call it one.
The second assumption is that generate_python_script replays the session. It does not. It asks a second language model to write the script, which needs an OPENAI_API_KEY. What comes back is a draft to review, not a deterministic record of what the agent ran. The engineer reruns it and compares the numbers before relying on it.
Run it before trusting it
I ran the same steps directly in pypowsybl 1.15.0 on the IEEE 14-bus case on 2026-10-17, with generator B3-G raised from 0 to 50 MW in a cloned variant. Both load flows converged in three iterations. The flow on line L1-2 fell from 156.9 MW to 115.4 MW, and bus voltages stayed between 1.01 and 1.09 per unit. All 17 single-line contingencies converged. The worst post-contingency flow fell from 240.1 MW on L1-2 with L1-5 out to 189.7 MW on L1-5 with L1-2 out. That is one textbook case, not anybody's connection study.
Two findings matter more than those numbers. The first concerns the default setting, distributed slack. With it on, the load flow cut the battery to 32.4 MW by spreading the mismatch across every generator. The agent has to switch slack distribution off, or the study answers a different question.
The second is that the security analysis reported zero violations because the case carries zero current limits and no voltage limits. A finding of no overloads means nothing on a model without ratings, so the agent checks for limits before it reports one.
See the design
See the design, its diagram and the demo at the solution. The demo replays the run above with its real values. The server is young, says so, and is useful for screening. An engineer still has to sign the study.