SWMM-MCP
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@SWMM-MCP Summarize the peak runoff and flooding results for the 'CityCenter' model."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
SWMM-MCP
MCP Toolbox for SWMM
Setup
Clone this repository
Install dependencies with:
uv syncRelated MCP server: Data Analytics MCP Toolkit
Usage
Put the following json block into an MCP client (e.g. Claude Desktop). Though, some clients may have a different interface for configuring MCP servers.
If you are currently in the root folder of this project in your IDE, you can find your full directory path by entering the command pwd.
{
"mcpServers": {
"SWMM": {
"command": "uv",
"args": [
"run",
"--directory",
"/<path/to/directory>/SWMM-MCP",
"server.py"
]
}
}
}On Windows it may look something like this:
{
"mcpServers": {
"SWMM": {
"command": "uv",
"args": [
"run",
"--directory",
"C:\\Users\\Jacob\\Documents\\SWMM-MCP",
"server.py"
]
}
}
}Example system prompt if allowed by your client:
You are an expert SWMM (Storm Water Management Model) assistant. You have access to tools to inspect and analyze SWMM models. Use the available tools to answer questions accurately.Inventory
Tools
Tool | Description |
| Returns a list of available models in the server. |
| Duplicates a model and returns the new model name. Useful for testing scenarios. |
| Returns general information about a model. |
| Returns a list of sections in the input file for a given model. |
| Returns the contents of a section of the input file for a given model. |
| Replace a junction with a cylindrical storage node of specified volume. |
| Changes the diameter of a circular conduit in the model. |
| Runs a model. |
| Returns a list of sections in the report file for a given model. |
| Returns the contents of a section of the report file for a given model. |
| Returns a list of variables in the output file for a given model. |
| Returns a list of objects in the output file for a given model and object type. |
| Modify the model's storm event to an 24-hour SCS Type 2 design storm of a given depth. |
Apps
App | Description |
| Prompts the user with a UI where they can upload a SWMM model. |
| Displays a full timeseries plot to the user. |
| Creates an interactive map of the SWMM model and displays it to the user. |
| Displays a timeseries plot of the model's rainfall to the user. |
Prompts
Name | Description |
| Which models are available? |
| Tell me about the model. |
| How many pipes and junctions does it have? |
| What's the largest pipe in the network? |
| Show me my network |
| Run a model for me |
| Compare flow through the largest pipe for a 2-inch vs 4-inch storm. |
| Which nodes flood under a 4-inch storm? |
| Suggest detention locations to reduce downstream flooding. |
| Add a storage unit at a node and rerun. |
| Show node flow during the simulation. |
| Compare base and modified scenarios. |
| Plot base vs. modified outfall hydrographs. |
Troubleshooting
Adding server to client failure
For macOS users, you may run into an issue of the client being unable to find the path uv is installed. To resolve this issue, you can create a symlink to one of the paths the client already checks.
To first find where uv is installed, in your terminal run:
which uvwhich will return something like:
/Users/<user-name>/.local/bin/uv
Then, to create a symlink, in your terminal run:
sudo ln -s ~/.local/bin/uv /usr/local/bin/uvwhere ~/.local/bin/uv is where uv is installed and /usr/local/bin/uv is part of the path your client checks. The error logs from the client should contain the paths it checks for uv.
Available Tools
18 toolsadd_storageB
Replace a junction with a cylindrical storage node of specified volume. Unless specified, it will start empty. Returns success message or error description.
Inputs: model_name (required), junction_name (required), storage_volume_cuft (required), initial_depth, +1 more. Returns: result
change_conduitC
Changes the diameter of a circular conduit in the model.
Inputs: model_name (required), conduit_name (required), new_diameter (required). Returns: result
change_stormC
Modify the model's storm event to an 24-hour SCS Type 2 design storm of a given depth. depth: Total rainfall depth in inches :return: Name of the new storm or error message
Inputs: model_name (required), depth (required). Returns: result
duplicate_modelB
Duplicates a model and returns the new model name. Use this for testing scenarios.
Inputs: model_name (required), new_name (required). Returns: result
get_input_infoA
Returns the contents of a section of the input file for a given model. Do NOT include brackets in the section name. Refer to the tool get_input_sections for a list of sections.
Inputs: model_name (required), section (required). Returns: result
get_input_sectionsC
Returns a list of sections in the input file for a given model.
Inputs: model_name (required).
get_model_infoC
Returns general information about a model. Be sure to enter the model name exactly as it appears in the list.
Inputs: model_name (required). Returns: result
get_output_objectsB
Returns a list of objects in the output file for a given model and object type. object_type: the type of object to return. E.g. "node", "link", "subcatchment". Refer to the tool "model_output_variables" for a list of types.
Inputs: model_name (required), object_type (required). Returns: result
get_output_variablesB
Returns a list of variables in the output file for a given model.
Inputs: model_name (required). Returns: result
get_report_infoC
Returns the contents of a section of the report file for a given model.
Inputs: model_name (required), section (required). Returns: result
get_report_sectionsB
Returns a list of sections in the report file for a given model.
Inputs: model_name (required). Returns: result
list_modelsB
Returns a list of available models in the server.
Inputs: no named parameters. Returns: result
plot_model_mapC
Creates an interactive map of the SWMM model using Plotly and displays it to the user. Returns whether the operation was successful.
Inputs: model_name (required).
plot_output_dataC
Displays a full timeseries plot to the user. Returns a summary of the data. model_names: List of model names to plot. object_type: the type of object to return. E.g. "node", "link", "subcatchment". Refer to the tool "get_output_variables" for a list of types. object_label: the label of the object in the output file. E.g. "J1", "S1" variable: the variable to return. E.g. "flow". Refer to the tool "get_output_variables" for a list of variables.
Inputs: model_names (required), object_type (required), object_label (required), variable (required).
plot_rainfallC
Displays a timeseries plot of the model's rainfall to the user. Returns the name of the timeseries or an error message.
Inputs: model_name (required).
prompt_model_uploadB
Prompts the user with a UI where they can upload a SWMM model.
Inputs: no named parameters. Returns: result
run_modelD
Runs a model.
Inputs: model_name (required).
upload_modelB
Uploads a new SWMM model to the server. The content should be the full .inp file content.
Inputs: model_name (required), content (required). Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 18 tools
Most tools have distinct purposes targeting specific SWMM operations like model management, data retrieval, and plotting. However, some overlap exists between 'get_input_info'/'get_input_sections' and 'get_report_info'/'get_report_sections', which could cause confusion in selecting the right file section tool. Overall, descriptions help clarify, but minor ambiguity remains.
Tool names follow a consistent verb_noun pattern throughout, such as 'list_models', 'run_model', and 'plot_output_data'. There are minor deviations like 'add_storage' (verb_noun) and 'change_conduit' (verb_noun) fitting the pattern, but 'prompt_model_upload' is slightly longer and less standard. Overall, naming is mostly predictable and readable.
With 18 tools, the count is slightly high but reasonable for a SWMM modeling server covering model upload, modification, running, and data analysis. It includes essential operations without being overly bloated, though it borders on heavy. The tools are well-scoped for the domain, with each serving a clear function.
The tool set provides complete coverage for SWMM modeling workflows, including CRUD-like operations (upload, duplicate, run), data retrieval (input/output/report sections), modifications (change storm, conduit, storage), and visualization (plotting maps, rainfall, output). There are no obvious gaps; agents can perform full lifecycle tasks from model setup to analysis without dead ends.
Related MCP Connectors
MCP server for building and testing AI agents with multi-model experimentation and insights.
MCP server for your apps' tools and custom tools, plus hosted AI agents and approval-gated workflows
MCP server providing access to the Scorecard API to evaluate and optimize LLM systems.
MCP server unifying ERPs, CRMs, APIs and knowledge base for Claude, ChatGPT and Gemini.
Related MCP Servers
- AlicenseAqualityCmaintenanceAn MCP server that enables LLMs to retrieve structured network information, including routing, interfaces, MPLS, and topology, from devices using gNMI and OpenConfig models. It facilitates real-time network analysis, log filtering, and status monitoring through a standardized interface.1014BSD 3-Clause
- FlicenseBqualityDmaintenanceAn MCP server that provides data visualization and machine learning tools, featuring automated intent-based pipeline routing for data cleaning and model training. It enables LLMs to process CSV or JSON data to generate visual charts, perform regressions, or execute clustering analysis.16-
- AlicenseNot gradedqualityAmaintenanceAn MCP server that allows LLMs to create, configure, validate, and explain Cisco Packet Tracer network topologies. It provides a comprehensive suite of tools for generating deployment scripts, CLI configurations, and automated network troubleshooting.1,494 PyPI377MIT
- AlicenseBqualityBmaintenanceEleven local stdio MCP servers exposing a reproducible EPA SWMM stormwater-modelling workflow: model building, simulation with run manifests and continuity checks, calibration, GIS/QGIS, design storms and climate scenarios, uncertainty analysis, plotting, and modelling memory.433MIT