home / mcp / swmm mcp pub mcp server
Provides an MCP bridge to run EPA SWMM models through an MCP client for streamlined hydrologic simulations.
Configuration
View docs{
"mcpServers": {
"klabum-swmm-mcp-pub": {
"command": "uv",
"args": [
"run",
"--directory",
"/<path/to/directory>/SWMM-MCP",
"server.py"
]
}
}
}SWMM MCP enables you to expose a SWMM workflow through the MCP protocol, letting clients run the SWMM server locally or remotely and integrate it into automated toolchains. This makes it easy to start a SWMM process from an MCP client, manage runs, and compose larger stormwater modeling tasks with other MCP-enabled services.
You run the SWMM MCP server through an MCP client. Create a configuration that tells the client how to start the server, then load that configuration into your MCP client. Once the server is configured, you can launch it from your client and interact with it as part of your workflow.
The standard approach is to start the MCP server using a local command that invokes the MCP runtime. If you are using a typical setup, you will point the client at the running process and supply the working directory where the server script resides. On Windows, you can use the Windows-style path; on Unix-like systems, you can use a Unix-style path. The client blocks or commands you provide will then manage the SWMM-MCP server process and expose its capabilities to your workflow.
Prerequisites: you need a runtime environment for MCP, and the MCP runtime utility named uv must be available on your system.
# Install the MCP runtime tool (uv) if it is not already installed
# The exact installation command may vary by platform
# For example, on many systems you can install via a package manager or from source
# Verify installation
which uvNext, prepare the SWMM MCP server directory and synchronize dependencies.
# Step 1: Install uv if not already available
# Step 2: Clone the SWMM-MCP project (the local directory should contain server.py and related files)
# Step 3: Install dependencies and synchronize
uv syncIf you need to run the server locally from your MCP client, configure the MCP server entry to point to the server script using uv as the command runner.
{
"mcpServers": {
"SWMM": {
"command": "uv",
"args": [
"run",
"--directory",
"/<path/to/directory>/SWMM-MCP",
"server.py"
]
}
}
}If you are on Windows, the path formatting is different but the command remains the same in structure.
{
"mcpServers": {
"SWMM": {
"command": "uv",
"args": [
"run",
"--directory",
"C:\\path\\to\\directory\\SWMM-MCP",
"server.py"
]
}
}
}If you need to run the server from your MCP client, place the configuration block in your client to start the server from the local directory.
Troubleshooting can help you resolve common issues when wiring up the MCP server. If you encounter problems locating uv on macOS, you can create a symlink so the client can find the runtime.
# Find where uv is installed
which uv
# Example output: /Users/<user-name>/.local/bin/uv
# Create a symlink to a directory in your PATH that the client checks
sudo ln -s ~/.local/bin/uv /usr/local/bin/uv