EPANET MCP Server
EPANET MCP Server
一个 MCP 服务器,通过 stdio 将 EPANET 水力/水质引擎置于 AI 助手(Claude Desktop、Cursor、VS Code Copilot、Claude Code 等)之前——无需云端往返,无需浏览器。
它允许 AI 助手加载 EPANET .inp/.net 模型、检查模型、运行模拟、读取每个节点/每个链接的结果,并进行经过验证的编辑,全部在本地完成。
工具
网络 I/O —
load_network、save_network、list_networks检查 —
get_network_summary、get_nodes、get_links、get_coordinates模拟 —
run_simulation、get_node_results、get_link_results变更(引擎验证,结果失效)—
set_pipe_diameter、set_junction_demand、set_pump_speed、set_valve_setting、set_node_elevation、set_demand_pattern、add_tank、remove_tank、add_valve模型构建 —
create_network、assign_demands、sample_elevations、fetch_road_network、generate_network_from_bbox设计辅助 —
lookup_pipe_diameters、recommend_diameter、friction_loss、calculate_minor_loss、pipe_sizing_wizard、pump_selection、list_fitting_kfactors优化 —
optimize_network、run_candidate
generate_network_from_bbox 根据边界框的真实 OpenStreetMap 道路数据自动布局节点/管道骨架,并在最近的水道处放置水库,地面高程从捆绑的 IFSAR 10 米 DEM 中采样。
Related MCP server: idfkit-mcp
先决条件
要求 | 版本 |
Node.js | 20.x 或 21.x |
操作系统 | Windows、macOS 或 Linux——传输为 stdio,不打开任何网络端口 |
安装
npm install本地运行
服务器读取(load_network)和写入(save_network)的数据目录是路径受限的——服务器拒绝任何其外部的文件。
mkdir -p data
cp your-model.inp data/
export EPANET_DATA_DIR=$(pwd)/data
npm start服务器启动并在 stdio 上等待客户端。
连接到 AI 应用
Claude Desktop
编辑 claude_desktop_config.json(Windows 上为 %APPDATA%\Claude\claude_desktop_config.json,macOS 上为 ~/Library/Application Support/Claude/claude_desktop_config.json):
{
"mcpServers": {
"epanet": {
"command": "npm",
"args": ["start"],
"cwd": "<absolute path to this repo>",
"env": {
"EPANET_DATA_DIR": "<absolute path to this repo>/data"
}
}
}
}Cursor / VS Code
相同的配置在 Cursor(%APPDATA%\Cursor\User\globalStorage\mcp.json)或 VS Code(%APPDATA%\Code\User\mcp.json)中同样适用——command: "npm",相同的 args/env。
配置
服务器读取以下环境变量:
环境变量 | 默认值 | 用途 |
| cwd |
|
| 未设置 | DEM/高程工具读取的文件夹 |
| 未设置 | 用于可选令牌模式认证的 RS256 公钥 |
| 未设置 | 用于令牌验证的回环 URL |
| 未设置 | 预期的 JWT |
| 未设置 | 预期的 JWT |
| 未设置 | 静态 bearer 令牌(CI 使用) |
| 未设置 | 包含 bearer 令牌的文件的路径 |
默认情况下认证关闭;设置 EPANET_AUTH_* 变量即可将服务器置于 RS256 bearer 令牌之后。
测试
npm test单元测试使用内存中的 MCP 传输针对已提交的 .inp 固定文件运行——它们不需要运行中的服务器。
构建打包安装程序
npm run package:win # or package:mac / package:linux在 dist/ 下生成自包含安装程序(内置 Node 运行时,无需系统 Node)。
许可证
MIT — 参见 LICENSE。
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseNot gradedqualityFmaintenanceA water treatment process simulation engine that exposes WaterTAP capabilities through MCP and CLI adapters, enabling AI agents to build, solve, and optimize flowsheets using natural language.1MIT

idfkit-mcpofficial
AlicenseAqualityBmaintenanceEnables AI assistants to create, edit, and simulate EnergyPlus building energy models via natural language. Supports schema exploration, model editing, simulation execution, and documentation search.392MIT- AlicenseNot gradedqualityBmaintenanceEnables AI clients to interact with EDA projects via natural language by wrapping EDI's gRPC interface, CLI tools, and ANSYS HFSS as MCP tools supporting SSE and stdio transports.1MIT
- AlicenseBqualityBmaintenanceEnables LLMs to load, simulate, modify, and generate what-if scenarios for EPANET water-distribution network models through natural language, leveraging the ePyT Python Toolkit.443MIT
Related MCP Connectors
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
Run AI customer support from your terminal: conversations, knowledge base, and chat widget.
Machine-readable utilities and datasets for AI agents.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/hjlrosales/EPAnet-MCP'
If you have feedback or need assistance with the MCP directory API, please join our Discord server