You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add a PLEXOSDB PowerMCP connector: a thin re-export of plexosdb-mcp's own MCP server
(direct PLEXOS object/property/membership CRUD, ~28 tools) plus translate_to_sienna and compare_solutions, calling the r2x package directly. This is the PLEXOS-side half of the
original two-format proposal — the paired SIENNA connector (solve + translate_to_plexos)
is tracked separately as #54, since the two share no PowerMCP code, only the upstream r2x
dependency each calls directly (the same relationship pandapower/PyPSA/Egret/ANDES
each already have with powerio, independently).
User story
As an agent workflow speaking MCP to PowerMCP's tool servers, I want to inspect and edit a
PLEXOS study and translate it toward Sienna — the same way I already call run_power_flow
against pandapower — without a PLEXOS license, installation, or vendor network call.
Why this belongs here
PowerAgent's Model Context Protocol pillar (Zhang & Xie, IEEE PEM 2025) is a tool layer:
multiple engines as peer MCP servers. plexosdb-mcp is purpose-built for exactly this
("agentic integration," "universal interface... without custom API development" per its own
publication) — adopting it is the same compose-don't-rebuild move this repo already makes for
pandapower. PLEXOSDB joins PSS/E, PowerWorld, PSLF, PowerFactory, and PSCAD as a closed-source
engine wrapper, paired (via #54) with a tested, open-source migration path off it.
What will be done
One registry entry. Add "plexosdb" (server_dir="PLEXOSDB") to TOOLS in powermcp/registry.py. CLI, doctor, the setup wizard, and client-config generation
already work off this one dict; no other file needs to change to make it discoverable.
PLEXOSDB/ connector — thin re-export, same shape as powerio/powerio_mcp.py: PLEXOSDB/plexosdb_mcp/main.py re-exports plexosdb_mcp's own FastMCP server object
(mcp = _server.mcp), covering its ~28 CRUD tools as-is. Adds translate_to_sienna and compare_solutions, calling r2x directly at the point of use — no PowerMCP-authored
bridge module (mirrors how pandapower/PyPSA/Egret/ANDES each import powerio
directly rather than through a wrapper).
Dependency reality check (verified, not assumed):
plexosdb-mcp is not on PyPI. Confirmed via uv pip install plexosdb-mcp --dry-run
(not found) — only the core plexosdb library (v1.5.0) is published. The MCP layer lives
at NatLabRockies/plexosdb/src/plexosdb-mcp: its own pyproject.toml, v0.1.0, console
script plexosdb-mcp, deps plexosdb>=1.3.4 + fastmcp>=3.0.0 — a real, cleanly
packaged project, just not released to PyPI yet.
PyPI rejects package metadata that declares a direct git/URL dependency, so plexosdb-mcp can't cleanly become a [project.optional-dependencies] entry in
PowerMCP's own PyPI-published pyproject.toml today (PowerMCP itself ships to PyPI —
see .github/workflows/publish.yml). Until plexosdb-mcp is on PyPI: document a manual
two-step install in PLEXOSDB/README.md
(pip install powermcp, then pip install "plexosdb-mcp @ git+https://github.com/NatLabRockies/plexosdb.git@main#subdirectory=src/plexosdb-mcp")
rather than wiring it into a plexos extra that would break pip install powermcp[plexosdb].
The R2X package is r2x (PyPI, v2.1.0 as of this writing — notr2x-cli, which
does not exist). r2x itself pulls in r2x-core, r2x-plexos, r2x-sienna, r2x-plexos-to-sienna, r2x-sienna-to-plexos as its own dependencies; pin r2x alone.
License-free tests.PLEXOSDB/tests/test_tools.py mocks translate_to_sienna / compare_solutions directly (matching PSCAD/tests/test_tools.py's MagicMock style).
Extend tests/test_vendor_import.py's pattern to plexosdb_mcp.main, monkeypatching plexosdb_mcp to a fake module to assert side-effect-free import — the same
no-license-required pattern already proven for PSS/E's psspy and PSLF's PSLF_PYTHON.
Proof. A real PLEXOS XML study loads and is inspectable (list objects, memberships,
properties) through the re-exported tools, and translate_to_sienna produces valid Sienna
PSY JSON. (Loading that JSON into Sienna and solving is PowerMCP connector: SIENNA (load/translate-to-PLEXOS/solve via r2x + Julia) #54's proof, not this one's.)
Non-goals
Forking or vendoring plexosdb, plexosdb-mcp, or r2x.
Requiring a PLEXOS license, install, or vendor network call anywhere in the connector.
Publishing plexosdb-mcp to PyPI ourselves — that's upstream's call; this issue documents
the workaround, doesn't route around it permanently.
Acceptance criteria
powermcp/registry.py has a "plexosdb" entry in TOOLS; pytest tests/test_registry.py
passes against it unmodified.
PLEXOSDB/plexosdb_mcp/main.py re-exports plexosdb_mcp's server (mirrors powerio/powerio_mcp.py); adds translate_to_sienna, compare_solutions, both calling r2x directly.
r2x (not r2x-cli) pinned in root pyproject.toml's plexosdb extra; plexosdb-mcp's git-install documented in PLEXOSDB/README.md, not silently assumed.
PLEXOSDB/tests/test_tools.py and a plexosdb_mcp.main vendor-import test pass with no
PLEXOS license or install present.
One real PLEXOS XML study proven to load → inspect → translate to valid Sienna PSY JSON;
commands cited in the PR.
Summary
Add a
PLEXOSDBPowerMCP connector: a thin re-export ofplexosdb-mcp's own MCP server(direct PLEXOS object/property/membership CRUD, ~28 tools) plus
translate_to_siennaandcompare_solutions, calling ther2xpackage directly. This is the PLEXOS-side half of theoriginal two-format proposal — the paired
SIENNAconnector (solve +translate_to_plexos)is tracked separately as #54, since the two share no PowerMCP code, only the upstream
r2xdependency each calls directly (the same relationship
pandapower/PyPSA/Egret/ANDESeach already have with
powerio, independently).User story
Why this belongs here
PowerAgent's Model Context Protocol pillar (Zhang & Xie, IEEE PEM 2025) is a tool layer:
multiple engines as peer MCP servers.
plexosdb-mcpis purpose-built for exactly this("agentic integration," "universal interface... without custom API development" per its own
publication) — adopting it is the same compose-don't-rebuild move this repo already makes for
pandapower. PLEXOSDB joins PSS/E, PowerWorld, PSLF, PowerFactory, and PSCAD as a closed-source
engine wrapper, paired (via #54) with a tested, open-source migration path off it.
What will be done
"plexosdb"(server_dir="PLEXOSDB") toTOOLSinpowermcp/registry.py. CLI,doctor, the setup wizard, and client-config generationalready work off this one dict; no other file needs to change to make it discoverable.
PLEXOSDB/connector — thin re-export, same shape aspowerio/powerio_mcp.py:PLEXOSDB/plexosdb_mcp/main.pyre-exportsplexosdb_mcp's ownFastMCPserver object(
mcp = _server.mcp), covering its ~28 CRUD tools as-is. Addstranslate_to_siennaandcompare_solutions, callingr2xdirectly at the point of use — no PowerMCP-authoredbridge module (mirrors how
pandapower/PyPSA/Egret/ANDESeachimport poweriodirectly rather than through a wrapper).
plexosdb-mcpis not on PyPI. Confirmed viauv pip install plexosdb-mcp --dry-run(not found) — only the core
plexosdblibrary (v1.5.0) is published. The MCP layer livesat
NatLabRockies/plexosdb/src/plexosdb-mcp: its ownpyproject.toml, v0.1.0, consolescript
plexosdb-mcp, depsplexosdb>=1.3.4+fastmcp>=3.0.0— a real, cleanlypackaged project, just not released to PyPI yet.
plexosdb-mcpcan't cleanly become a[project.optional-dependencies]entry inPowerMCP's own PyPI-published
pyproject.tomltoday (PowerMCP itself ships to PyPI —see
.github/workflows/publish.yml). Untilplexosdb-mcpis on PyPI: document a manualtwo-step install in
PLEXOSDB/README.md(
pip install powermcp, thenpip install "plexosdb-mcp @ git+https://github.com/NatLabRockies/plexosdb.git@main#subdirectory=src/plexosdb-mcp")rather than wiring it into a
plexosextra that would breakpip install powermcp[plexosdb].r2x(PyPI, v2.1.0 as of this writing — notr2x-cli, whichdoes not exist).
r2xitself pulls inr2x-core,r2x-plexos,r2x-sienna,r2x-plexos-to-sienna,r2x-sienna-to-plexosas its own dependencies; pinr2xalone.PLEXOSDB/tests/test_tools.pymockstranslate_to_sienna/compare_solutionsdirectly (matchingPSCAD/tests/test_tools.py'sMagicMockstyle).Extend
tests/test_vendor_import.py's pattern toplexosdb_mcp.main, monkeypatchingplexosdb_mcpto a fake module to assert side-effect-free import — the sameno-license-required pattern already proven for PSS/E's
psspyand PSLF'sPSLF_PYTHON.PLEXOSDB/README.mddocumenting: the manualplexosdb-mcpgit install step above, howto point the connector at a PLEXOS XML study, and how
translate_to_siennaoutput feedsinto PowerMCP connector: SIENNA (load/translate-to-PLEXOS/solve via r2x + Julia) #54's
SIENNAconnector.properties) through the re-exported tools, and
translate_to_siennaproduces valid SiennaPSY JSON. (Loading that JSON into Sienna and solving is PowerMCP connector: SIENNA (load/translate-to-PLEXOS/solve via r2x + Julia) #54's proof, not this one's.)
Non-goals
plexosdb,plexosdb-mcp, orr2x.plexosdb-mcpto PyPI ourselves — that's upstream's call; this issue documentsthe workaround, doesn't route around it permanently.
Acceptance criteria
powermcp/registry.pyhas a"plexosdb"entry inTOOLS;pytest tests/test_registry.pypasses against it unmodified.
PLEXOSDB/plexosdb_mcp/main.pyre-exportsplexosdb_mcp's server (mirrorspowerio/powerio_mcp.py); addstranslate_to_sienna,compare_solutions, both callingr2xdirectly.r2x(notr2x-cli) pinned in rootpyproject.toml'splexosdbextra;plexosdb-mcp's git-install documented inPLEXOSDB/README.md, not silently assumed.PLEXOSDB/tests/test_tools.pyand aplexosdb_mcp.mainvendor-import test pass with noPLEXOS license or install present.
commands cited in the PR.
References
plexosdb/plexosdb-mcp(source only, not yet on PyPI)
r2xon PyPI, and itsGitHub repo
SIENNAconnector (solve +translate_to_plexos)