EPANET MCP Server

io.github.Applied-Artificial-Intelligence-Eurecat由 GitHub 帳號 Applied-Artificial-Intelligence-Eurecat 發布v0.1.2更新於 Nov 3, 2026

MCP server for EPANET water-distribution network simulation and scenario analysis.

已驗證STDIO僅桌面開發者工具資料與分析

概覽

AI 產生的概覽

本機 MCP 伺服器,讓助理載入 EPANET 供水管網模型、執行水力與水質模擬,並建立假設情境分析。

可以做什麼
  • 載入、卸載與列出管網模型(含內建基準模型),檢視節點、管段、用水模式、控制規則、曲線與選項
  • 執行水力、水質及完整模擬,並讀取指定時刻的壓力或流量
  • 修改模型參數,例如需水量、用水模式、管徑、粗糙度、管段狀態與長度、幫浦轉速與揚程曲線、閥門設定、水池與水庫水位以及模擬時間步長
  • 新增或刪除控制規則,並儲存修改後的管網
  • 建立假設情境,包括需水量變化、漏損、污染、壓力變化、幫浦或閥門控制以及多重故障事件
適用情境
適合處理 EPANET 管網模型檔並希望以對話方式探索的情況:彙整管網概況、查看壓力與流量、測試參數調整,或執行漏損、污染與故障情境,而不必手動編輯檔案。
執行需求
以 Python 套件形式透過 stdio 在本機執行(pip install epanet-mcp-server)。需要 Python 3.10 以上、ePyT 2.0 以上與 mcp 1.0 以上。未宣告驗證、API 金鑰或環境變數。需要在桌面用戶端中設定。
安裝前請注意
工具可修改管網參數、新增或刪除控制規則並將管網儲存到磁碟,可能覆寫模型檔。情境工具會複製來源工作階段,但直接修改類工具作用於已載入的管網。使用儲存結果前請先核對。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 EPANET MCP Server,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

EPANET MCP Server

[Linter] [Pytest] [PyPI version] [MCP Registry]

A Model Context Protocol (MCP) server that exposes EPANET water-distribution network modelling capabilities through ePyT - the EPANET Python Toolkit.

Any MCP-compatible LLM can load water network models, run simulations, modify parameters, and generate complex what-if scenarios through natural language.


Features

CategoryTools
Load & Inspectload_network, unload_network, list_networks, list_bundled_networks, get_network_summary, get_nodes, get_links, get_patterns, get_controls, get_curves, get_options
Simulaterun_hydraulic_simulation, run_quality_simulation, run_full_simulation, get_pressure_at_time, get_flow_at_time
Modifyset_node_base_demand, set_pattern, add_pattern, set_pipe_diameter, set_pipe_roughness, set_pipe_status, set_pipe_length, set_pump_status, set_pump_speed, set_pump_head_curve, set_valve_setting, set_valve_status, set_tank_parameters, set_reservoir_head, set_simulation_duration, set_hydraulic_timestep, set_quality_timestep, set_quality_type, add_control, delete_control, save_network
Scenarioscreate_demand_perturbation, create_leakage_event, create_contamination_event, create_pressure_change_scenario, create_pump_control_scenario, create_valve_control_scenario, create_multi_failure_scenario

Requirements

  • Python ≥ 3.10
  • ePyT ≥ 2.0
  • mcp ≥ 1.0
bash
pip install epyt mcp

Installation

bash
git clone https://github.com/Applied-Artificial-Intelligence-Eurecat/epanet-mcp-server.gitcd epanet-mcp-serverpip install -e .

Running the server

stdio (for Claude Desktop / Claude Code)

bash
epanet-mcp-server# orpython -m epanet_mcp.server

SSE / HTTP

bash
epanet-mcp-server --transport sse --port 8000

Claude Desktop configuration

Add to ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or the equivalent on your platform:

json
{  "mcpServers": {    "epanet": {      "command": "epanet-mcp-server",      "args": []    }  }}

If not on PATH:

json
{  "mcpServers": {    "epanet": {      "command": "python",      "args": ["-m", "epanet_mcp.server"],      "cwd": "/path/to/epanet-mcp-server/src"    }  }}

Claude Code (.mcp.json)

Place this in the root of your project or ~/.claude/:

json
{  "mcpServers": {    "epanet": {      "command": "epanet-mcp-server",      "args": []    }  }}

Example interactions

Once the server is connected, you can ask things like:

"Load Net1.inp and show me a summary of the network."

"Run a full simulation and tell me which node has the lowest pressure at hour 12."

"Double the base demand at junction 11 and re-run the simulation. How does pressure change?"

"Simulate a burst on pipe 10 with a 20% leakage fraction."

"Inject 10 mg/L of chlorine at node 11 between hours 1 and 3 and show me the contamination spread."

"What happens to pressures if the reservoir head drops from 150 m to 120 m?"

"Schedule Pump 9 to start at 06:00 and stop at 22:00."

"Close pipes 10 and 11 and the pump simultaneously. Where are service disruptions?"


Architecture

src/epanet_mcp/├── server.py          # FastMCP server – tool registration + entry point├── session.py         # Thread-safe registry of open ePyT sessions├── utils.py           # numpy → Python serialisation helpers└── tools/    ├── inspection.py  # load / inspect network models    ├── simulation.py  # run hydraulic & quality simulations    ├── modification.py# in-memory parameter changes    └── scenarios.py   # what-if scenario generators (clone + modify + run)

Session model: Each loaded network lives in a named session. Scenario tools automatically clone the source session into a new independent session so the baseline network is never mutated.


Running the tests

bash
pip install pytestpytest tests/ -v

Bundled networks

ePyT ships with many standard benchmark networks including Net1, Net2, L-TOWN, Hanoi, Anytown, Balerma and others. Use list_bundled_networks to discover them all.


License

MIT

來源:README.md,提交 9419676

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v0.1.2最新Sep 16, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分