Use DrainPilot from an AI app
Connect Claude or another app that speaks MCP to DrainPilot, and ask it to run, check and compare SWMM models.
DrainPilot also runs as an MCP server, the standard way AI apps call outside tools. Add the address https://geopilotai.com/api/mcp/drainpilot to an app that takes a remote MCP server by URL, and the app can run a model with EPA SWMM 5.2.4 and read its flooding, surcharge and continuity, the same engine the workspace runs. No account or key is needed.
Connect an app
- Claude Code: run claude mcp add --transport http drainpilot https://geopilotai.com/api/mcp/drainpilot.
- Claude and other chat apps: add a custom connector (it may be called an MCP server) and paste the address.
- Your own code: any MCP client that speaks Streamable HTTP can call the address with POST requests.
Give it a model
Every tool takes one model, in one of three ways:
- example: one of the models in the Start gallery, such as example1 or indian-sewer-zone. drainpilot_list_examples lists them.
- url: a public link to an .inp file, such as the Raw link of a file on GitHub. This is the best way for a large model.
- inp: the .inp text itself, for a small model the app already has.
A model that reads rain, inflow or climate from separate data files cannot run this way, because only the .inp reaches the server. Put the series in the .inp as time series, or run the model in the workspace. Each call runs the model afresh and DrainPilot keeps no copy. The app you use sends the model and your questions to its own AI provider, under that provider's terms.
The tools
| Tool | What it returns |
|---|---|
| drainpilot_list_examples | The example models, by id. |
| drainpilot_run | Object counts, the main options, continuity errors, flooded nodes and volumes, surcharged conduits, the highest flow over full capacity and velocities, and the problems in SWMM's report with fixes. |
| drainpilot_find_objects | Nodes, links or subcatchments whose peak result over the run is below, above or equal to a value, worst first. |
| drainpilot_get_object | One node, link or subcatchment: its inputs, the peak of each result with its time, and its rows from SWMM's summary tables. |
| drainpilot_check_model | The model check from Fixing problems, and SWMM's own input check. |
| drainpilot_what_if | The model run before and after edits to conduits, nodes and subcatchments, with the change in flooding at each node, and the edited .inp if asked for. |
Limits
- About 30 calls a minute from one address.
- A model sent as text must be under about 4 MB; up to 5 MB can be fetched from a link.
- Links must be public http or https addresses. Private and local addresses are refused.
- Results are in the model's own units; the report units are given with each answer.
- The CPHEEO sewer and storm drain checks need design inputs (population, rainfall) that the model file does not hold, so they stay in the workspace.
