SWATGenX

io.github.SWATGenXPublished by GitHub account SWATGenXv1.1.2Updated Nov 11, 2026

SWAT+ watershed models for any river in the lower 48 states, with groundwater and PFAS data

Overview

AI-generated overview

Remote MCP server for SWATGenX: search SWAT+ watershed models, query groundwater and PFAS data, and order and download model builds.

What you can do
  • Search the example SWAT+ model catalog and read published calibration and validation scores
  • Query national groundwater well and lithology records, and PFAS monitoring stations, near a point or by state and analyte
  • Preview whether a catchment is buildable, then order, track and download real SWAT+ model builds
  • Search and read the SWATGenX I/O reference chapters, and get engine source and build details
  • Check account access levels and allocations
When to use it
Useful when working on US watershed hydrology: finding an existing calibrated SWAT+ model for a gauge or HUC12 outlet, pulling subsurface or PFAS monitoring data for a site, or commissioning a new model build from an assistant.
Requirements
Remote streamable HTTP endpoint; nothing to install. Connecting and listing tools need no sign-in, but tool calls need a SWATGenX account (by invitation) or an API key, sent via OAuth 2.1 sign-in or an Authorization Bearer header. Model, data and build tools need model access; build and download tools need the API key.
Before you install
Build requests consume the account's fair-use quota and calibration runs on account credit; studies are quoted per watershed. Data queries count against a monthly allowance of distinct stations and 200 new stations a day. PFAS results without a state filter may include non-US stations. Downloads return token links that expire. Build tools write and start jobs; the rest is read-only.

Installation

In SourceWeft

  1. Open SWATGenX in the dashboard and add it to a workspace.
  2. Enable the server for the chats that should use its tools.

Web executable via Streamable HTTP. Remote servers run from the web runtime once configured in a workspace.

Use with an agent

Paste this prompt into Claude Code, Codex, Cursor or another agent — or into SourceWeft chat. The agent reads this server's install guide, shows you its publisher, endpoint and sign-in, and adds it to your client once you agree. Keys never go into a command.

Read https://sourceweft.com/mcp/io.github.SWATGenX%2Fswatgenx/install.md and connect the MCP server it describes to my client. Before changing any config, show me its publisher, endpoint and sign-in method and wait for my OK. Never put an API key in a command or in a file I would commit; ask me where it should come from.

Read the install guide the agent follows

Other MCP clients

Add this to your client's mcpServers config.

{
  "mcpServers": {
    "swatgenx": {
      "type": "http",
      "url": "https://www.swatgenx.com/mcp"
    }
  }
}

README

SWATGenX MCP Server

The agent-native front door to SWATGenX: SWAT+ watershed models for any river in the lower 48 states, built in the cloud from national datasets, with calibration as a separate step you run when you are ready.

Add it to Claude or any MCP client, and an agent can search the example-model catalog with its calibration and held-out validation scores, query a national groundwater well inventory and a national PFAS monitoring inventory, preview what a model of a watershed would contain, read the documentation, and start, track and download a real SWAT+ build under the same allocations as the web app.

Connect

claude mcp add --transport http swatgenx https://www.swatgenx.com/mcp

or, in a client's JSON config:

{ "mcpServers": { "swatgenx": { "type": "http", "url": "https://www.swatgenx.com/mcp" } } }

Connecting and listing the tools need no sign-in. Every tool call needs a SWATGenX sign-in or an API key: clients that support MCP authorization sign in with OAuth 2.1 through swatgenx.com; clients that set headers can send Authorization: Bearer <your API key>.

Tools

From 15 October 2026, the model, data and build tools need model access, and accounts are by invitation. The documentation, access and engine-info tools stay open to any account.

ToolTitleAccess from 15 Oct 2026
search_docsSearch the SWATGenX documentationany account
get_docRead a SWATGenX documentation chapterany account
get_engine_infoGet SWAT+ engine source, build guide and toolchainany account
get_access_infoGet access level and allocationsany account
search_swat_modelsSearch SWAT+ example modelsmodel access
get_model_calibrationGet model calibration resultsmodel access
query_groundwaterQuery national groundwater wellsmodel access
query_pfasQuery PFAS monitoring (US or worldwide)model access
request_modelPreview a watershed model buildmodel access
order_modelBuild a SWAT+ watershed modelmodel access
get_order_statusGet model build statusmodel access
list_my_modelsList your models and buildsmodel access
download_modelGet a model download linkmodel access

About

SWATGenX builds SWAT+ models for a USGS gauge, a HUC12 outlet or a HUC8 basin from NHDPlus HR hydrography, gSSURGO soils, NLCD land cover and PRISM weather. A groundwater study (offered in Michigan Lower Peninsula, Indiana, Minnesota, Ohio, Wisconsin) also builds a steady-state MODFLOW 6 groundwater model. Calibration against USGS streamflow is a separate step you run when you are ready. Daily two-way SWAT+/MODFLOW 6 coupling is in the engine, not yet in an automatic build.

The national groundwater inventory is described in doi:10.5194/essd-2026-527.

The server implementation lives in the main SWATGenX repository; this repository holds the registry manifest (server.json) and the publish workflow.

License

MIT

Source: README.md at commit 3852feb

Tools

13

search_swat_models

Search SWAT+ example models

Search the public SWATGenX example-model catalog (built SWAT+ models for USGS gauges and HUC outlets across the conterminous US). Filter by two-letter `state`, `calibrated_only` (alias `calibrated`), and channel-count bounds. A model counts as calibrated only when the website shows it as calibrated (its calibration tier is advertised); a failed or below-satisfactory run does not.…

Parameterslimitstatecalibratedmax_channelsmin_channelscalibrated_only

get_model_calibration

Get model calibration results

Return the published calibration for one example model: method, calibration NSE (daily + monthly), PBIAS, evals used, and window as {fit, scored}: the years the calibration was fitted to and the years its validation was scored on. Validation NSE is included only when the scored years lie outside the fitted years. calibration_status is calibrated_and_validated or…

Parameterssite_norequired

query_groundwater

Query national groundwater wells

Query SWATGenX's national groundwater inventory (well records and lithology logs harvested from state agencies across the contiguous U.S.; live totals at https://www.swatgenx.com/api/gw-wells/summary) near a point — the subsurface data used to parameterise MODFLOW. Returns the nearest wells with lithology-interval count and a richness_tier grading what each well EXPOSES: 0 =…

Parameterslatrequiredlonrequiredlimitradius_km

query_pfas

Query PFAS monitoring (US or worldwide)

Query the SWATGenX PFAS monitoring inventory (agency monitoring stations + observations): only sources whose licence allows serving them, the same set as the PFAS data API; unaudited VLM packs are excluded. Filter by two-letter `state` (e.g. 'MI') and/or `analyte` (e.g. 'PFOS', 'PFOA'): with an analyte, only stations that have at least one observation of it are returned, each with…

Parameterslimitstateanalyte

request_model

Preview a watershed model build

Preview what SWATGenX WOULD build for a CONUS catchment. Takes either a USGS gauge id (usgs_station) or a 12-digit HUC12 outlet (huc12_outlet). Read-only in v1: returns whether the catchment is buildable, whether a model already exists, and the build endpoint (order_endpoint) — it does NOT start a build (that needs an authenticated account at swatgenx.com).

Parametershuc12_outletusgs_station

search_docs

Search the SWATGenX documentation

Search the SWATGenX I/O reference — model bundle layout, SWAT+ input files, PFAS fate-and-transport inputs, engine run modes and NetCDF output, MODFLOW-6 coupling, calibration artifacts, service limits. Returns ranked articles, each with a matching snippet and its chapter slug. The schemas are transcribed from the engine readers/writers and include the SWATGenX extensions, which…

Parameterslimitqueryrequired

get_doc

Read a SWATGenX documentation chapter

Return one full SWATGenX documentation chapter as markdown, by chapter slug; 'overview' is the index and lists every chapter. Retired slugs are followed to their current chapter automatically.

Parametersslug

get_engine_info

Get SWAT+ engine source, build guide and toolchain

Where the SWAT+ engine SWATGenX runs comes from (including its parallel/OpenMP build), and how to build it from source. Returns the public fork, the build guide with the exact toolchain, and whether building is needed at all (usually it is not — downloaded models run as-is). No authentication required.

Takes no parameters.

get_access_info

Get access level and allocations

Describe SWATGenX access: accounts by invitation (for a named research collaboration or a funded study), studies quoted for each watershed, and calibration on account credit; how to request access. With an API key, also report the caller's current access and its status.

Parametersapi_key

order_model

Build a SWAT+ watershed model

Start a real SWAT+ model build (authenticated; consumes the caller's fair-use quota). Takes either a USGS gauge id (usgs_station) or a 12-digit HUC12 outlet (huc12_outlet). Returns an order_id for checking the build's status. Typical build: 20 min - 2 h. The API key comes from the X-SWATGenX-Api-Key header on the MCP connection or the api_key argument.

Parametersapi_keyhuc12_outletusgs_stationforce_rebuild

get_order_status

Get model build status

Check a model build (authenticated): state (queued/running/complete/failed), stage, and timing. order_id is the id order_model returned for the build.

Parametersapi_keyorder_idrequired

list_my_models

List your models and builds

List the caller's models (authenticated): `models`, the model workspaces the account holds (the dashboard's list: site_no, level, vpuid, status flags), and `orders`, the builds requested through the build queue, newest first. `limit` caps each list (default 10, max 50; unbounded listing used to blow the MCP result budget at ~50 builds). `active_only=True` returns only…

Parameterslimitapi_keyactive_only

download_model

Get a model download link

Get a download link for a model the caller owns (authenticated). The returned download_url is a TOKEN link valid for 24 hours; fetching it redirects to a storage URL minted fresh per request with a much shorter life (~30 min), so the redirect target expires long before the download_url does. vpuid/level are optional: the server resolves them from site_no (build records also…

Parameterslevelvpuidapi_keysite_norequired

Version history

3
  1. v1.1.2LatestNov 11, 2026
  2. v1.1.0Sep 28, 2026
  3. v1.0.0Sep 16, 2026

Score

100% of the applicable checks met

How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.

  • Reached in the last 30 daysRequired25 pts
  • Auth declaredRequired10 pts
  • Tools listedRequired15 pts
  • DescriptionRequired15 pts
  • Logo10 pts
  • Documentation15 pts
  • License10 pts