EPANET MCP Server

EPANET MCP Server

Enables AI assistants to load, simulate, inspect, and edit EPANET hydraulic/water-quality models locally via stdio.

Category
访问服务器

README

EPANET MCP Server

An MCP server that puts the EPANET hydraulic/water-quality engine in front of AI assistants (Claude Desktop, Cursor, VS Code Copilot, Claude Code, …) over stdio — no cloud round-trip, no browser.

It lets an AI assistant load an EPANET .inp/.net model, inspect it, run simulations, read per-node/per-link results, and make validated edits, all locally.

Tools

  • Network I/Oload_network, save_network, list_networks
  • Inspectionget_network_summary, get_nodes, get_links, get_coordinates
  • Simulationrun_simulation, get_node_results, get_link_results
  • Mutation (engine-validated, results-invalidating) — set_pipe_diameter, set_junction_demand, set_pump_speed, set_valve_setting, set_node_elevation, set_demand_pattern, add_tank, remove_tank, add_valve
  • Model buildingcreate_network, assign_demands, sample_elevations, fetch_road_network, generate_network_from_bbox
  • Design helperslookup_pipe_diameters, recommend_diameter, friction_loss, calculate_minor_loss, pipe_sizing_wizard, pump_selection, list_fitting_kfactors
  • Optimizationoptimize_network, run_candidate

generate_network_from_bbox auto-lays out a junction/pipe skeleton from real OpenStreetMap road data for a bounding box, with a reservoir placed at the nearest waterway and ground elevations sampled from a bundled IFSAR 10 m DEM.

Prerequisites

Requirement Version
Node.js 20.x or 21.x
OS Windows, macOS, or Linux — transport is stdio, no network ports opened

Install

npm install

Run locally

The data directory the server reads from (load_network) and writes to (save_network) is path-contained — the server refuses any file outside it.

mkdir -p data
cp your-model.inp data/
export EPANET_DATA_DIR=$(pwd)/data
npm start

The server boots and waits for a client on stdio.

Wire it to an AI app

Claude Desktop

Edit claude_desktop_config.json (%APPDATA%\Claude\claude_desktop_config.json on Windows, ~/Library/Application Support/Claude/claude_desktop_config.json on macOS):

{
  "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

Same shape works in Cursor (%APPDATA%\Cursor\User\globalStorage\mcp.json) or VS Code (%APPDATA%\Code\User\mcp.json) — command: "npm", same args/env.

Configuration

The server reads these environment variables:

Env var Default Purpose
EPANET_DATA_DIR cwd Folder load_network/save_network may read/write
EPANET_DEM_DIR unset Folder the DEM/elevation tools read from
EPANET_AUTH_PUBLIC_KEY unset RS256 public key for optional token-mode auth
EPANET_AUTH_VALIDATE_URL unset Loopback URL for token validation
EPANET_AUTH_ISSUER unset Expected JWT iss
EPANET_AUTH_AUDIENCE unset Expected JWT aud
EPANET_AUTH_TOKEN unset Static bearer token (CI use)
EPANET_AUTH_TOKEN_FILE unset Path to a file containing the bearer token

Auth is off by default; set the EPANET_AUTH_* variables to gate the server behind an RS256 bearer token.

Tests

npm test

Unit tests drive the in-memory MCP transport against committed .inp fixtures — they don't require a running server.

Build a packaged installer

npm run package:win    # or package:mac / package:linux

Produces a self-contained installer (vendored Node runtime, no system Node required) under dist/.

License

MIT — see LICENSE.

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选