OpenDSS MCP Server
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@OpenDSS MCP Servercompile the IEEE 13-node feeder, run power flow, and report voltage violations"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
OpenDSS MCP Server
An MCP (Model Context Protocol) server that lets an AI assistant run OpenDSS, EPRI's open-source power distribution system simulator, through py-dss-interface. Claude Desktop, Claude Code or any other MCP client can compile circuits, run power flow, check voltage and thermal violations, simulate faults, extract Thévenin impedances, run hosting capacity and quasi-static time series (QSTS) studies, and plot results — through 20 typed tools that return structured data, not free text.
The point is reliability: the model never computes a number. OpenDSS does, and the assistant reads the result as JSON or Markdown with the inputs that produced it.
Tools
Group | Tools |
Compile |
|
Run |
|
Query |
|
Edit |
|
Faults |
|
Studies |
|
Output |
|
Each tool takes a single params object, for example opendss_compile_file(params={"dss_path": "...", "response_format": "json"}).
What it covers:
Power flow: bus voltages in pu, line flows, loads, losses, convergence.
Violations and loading: buses outside the voltage band and elements above their rated current, with the limits you pass.
Short circuit: three-phase and single-line-to-ground faults at a bus or swept across buses, and positive- and zero-sequence Thévenin impedance.
Hosting capacity: PV added in steps until a voltage, thermal or convergence limit binds, uniform or worst-case placement.
QSTS: daily or yearly time series with the circuit's load shapes.
Editing: typed add/edit/enable of PV, storage, loads, capacitors and regulators, with the values read back from OpenDSS.
Installation
Requires Python 3.10 or later. The OpenDSS engine ships with py-dss-interface, which works on Windows and Linux.
git clone https://github.com/jpsalamanca-co/opendss-mcp.git
cd opendss-mcp
pip install -e ".[dev]" # [dev] adds pytest, pytest-asyncio and ruff
python -m pytest tests -qClient configuration
Claude Desktop (claude_desktop_config.json) or Claude Code (.mcp.json):
{
"mcpServers": {
"opendss_mcp": {
"command": "opendss-mcp",
"env": { "OPENDSS_MCP_OUTPUT_DIR": "./results" }
}
}
}To run it directly over stdio: opendss-mcp or python -m opendss_mcp.server.
Variable | Default | Use |
| system temp folder | where plots are saved |
Example
examples/ieee13/ includes the IEEE 13-node test feeder. With Master.dss compiled:
it converges and has 15 buses;
the minimum voltage between 1 and 100 kV is 0.924 pu;
the nominal load is 3466 kW and 2102 kvar across 9 loads;
a three-phase fault at bus 671 gives 4558.6 A.
The tests check those values, including one run over stdio as an MCP client would.
Scope
A calculation tool, not an engineering service. Results depend on the model you give it — a wrong source impedance converges just as cleanly as a right one — and are reviewed and signed by whoever holds the professional responsibility.
License
MIT, see LICENSE. OpenDSS (EPRI) is distributed under BSD-3-Clause and py-dss-interface under MIT; both are installed as dependencies, not redistributed here.
This server cannot be deployed
Maintenance
Related MCP Connectors
Protocol-native energy infrastructure orchestration for AI data centers. Provides 46 MCP tools across 8 grid protocols (IEC-61850, DNP3, Modbus, OCPP, OpenADR, IEEE 2030.5, IEC 60870-5-104, ICCP) with 5 core API primitives: connect, dispatch, settle, comply, and intel. Enables AI agents to programmatically interact with substations, grid interfaces, and energy assets for real-time workload-grid coordination.
Solar, weatherization, EV charging, battery and heat-pump decision tools for AI agents.
Live US power market prices, load, generation, weather and permits for AI agents.
- geoOAuthco.thinair
Geocoding, routing, isochrones, traffic, weather, and place search for AI agents. 19 MCP tools.