EPANET MCP Server — MCP server for water network simulation in Claude Code
An MCP server that wraps ePyT and EPANET for water-distribution modelling. Load networks, run hydraulic simulations, and build what-if scenarios through natural language.
MIT ★ 10 updated 2026-06-02
claude mcp add epanet-mcp-server -- uvx epanet-mcp-serverWhat EPANET MCP Server does
The server exposes EPANET capabilities through ePyT as MCP tools. Any MCP-compatible LLM can load a network model, inspect its nodes and links, run hydraulic or quality simulations, and read pressures or flows at specific times. The code is organised as a FastMCP server with a thread-safe session registry and tool modules for inspection, simulation, modification, and scenarios.
Scenario tools clone the source session into a fresh one, so the baseline network stays untouched. Built-in generators cover demand spikes, pipe bursts with a leakage fraction, contamination events, pump and valve control changes, and multi-failure cases. Each loaded network lives in a named session, so several models can sit open at once.
Python 3.10 or newer is required, along with ePyT ≥ 2.0 and the mcp package ≥ 1.0. Install dependencies with pip install epyt mcp, then either clone the repo and run pip install -e . or go straight to uvx epanet-mcp-server. The stdio entry point is epanet-mcp-server; for HTTP use --transport sse --port 8000. The server will not start without ePyT present.
What it helps with
- load a water network model and inspect its structure
- run a hydraulic simulation without writing EPANET code by hand
- check pressure and flow at a given simulation hour
- model a pipe burst or leak with a leakage fraction
- compare what-if scenarios without mutating the baseline network
Example prompts for the agent
- Load Net1.inp and give me a network summary.
- Run a full simulation and find the node with the lowest pressure at hour 12.
How to install EPANET MCP Server
Platform CLI
claude mcp add epanet-mcp-server -- uvx epanet-mcp-serveruvx runs the command named after the package; if the README names another one, use uvx --from epanet-mcp-server <command>
Platform CLI
codex mcp add epanet-mcp-server -- uvx epanet-mcp-serveruvx runs the command named after the package; if the README names another one, use uvx --from epanet-mcp-server <command>
Config file
{
"mcpServers": {
"epanet-mcp-server": {
"command": "uvx",
"args": [
"epanet-mcp-server"
]
}
}
}uvx runs the command named after the package; if the README names another one, use uvx --from epanet-mcp-server <command>
Config file
{
"servers": {
"epanet-mcp-server": {
"type": "stdio",
"command": "uvx",
"args": [
"epanet-mcp-server"
]
}
}
}uvx runs the command named after the package; if the README names another one, use uvx --from epanet-mcp-server <command>
Platform CLI
gemini mcp add epanet-mcp-server uvx epanet-mcp-serveruvx runs the command named after the package; if the README names another one, use uvx --from epanet-mcp-server <command>
Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about EPANET MCP Server
How do I install EPANET MCP Server in Claude Code?
Run claude mcp add epanet-mcp-server -- uvx epanet-mcp-server. If uvx is not on PATH, add a config block to .mcp.json in your project root or ~/.claude/ with the command epanet-mcp-server and an empty args list.
What does EPANET MCP Server do?
It gives an LLM access to EPANET water network modelling: loading models, running hydraulic and quality simulations, changing parameters, and generating what-if scenarios through MCP tools.
What scenarios can it model?
Built-in generators cover demand perturbations, leakage events, contamination, pressure changes, pump and valve control changes, and multi-failure cases. Each scenario clones the source session before modifying anything.