mcp-server-usace-iwr
Provides tools to query the U.S. Army Corps of Engineers River Mile Markers ArcGIS Feature Service, enabling location of river mile markers on navigable U.S. rivers and answering 'what river mile am I at?' questions.
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., "@mcp-server-usace-iwr what river mile is closest to 38.5, -90.2?"
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.
mcp-server-usace-iwr
An MCP (Model Context Protocol) server that wraps the U.S. Army Corps of Engineers (USACE) Institute for Water Resources (IWR) River Mile Marker ArcGIS Feature Service, letting an LLM locate river mile markers on navigable U.S. rivers and answer "what river mile am I at?" style questions.
Dataset: USACE River Mile Markers
Service:
https://services7.arcgis.com/n1YM8pTrFmm7L4hs/arcgis/rest/services/usace_river_mile_markers/FeatureServer/0Auth: none (public service)
CRS: WGS84 (EPSG:4326) decimal degrees
Tools
Tool | Purpose |
| Return the single closest marker to a lat/lon (with distance + bearing). |
| Find markers near a point (radius) or within a GeoJSON geometry/bbox. |
| Filter markers by river name and/or mile-value range, with pagination. |
All tools are read-only and return provenance (source agency, dataset, service URL, layer, CRS, retrieval time).
Related MCP server: pumperly-mcp
Layer fields
name, LONGITUDE1, LATITUDE1, MILE, RIVER_CODE, RIVER_NAME,
RIVER_NUMB, SOURCE.
Running locally (stdio)
uv sync
uv run python -m usace_iwr_server.appThe server uses stdio transport by default. If a PORT (or
DATABRICKS_APP_PORT) environment variable is set, it serves streamable HTTP at
/mcp instead, with a /health readiness endpoint.
Container / deployment
bash scripts/build-and-push.sh # builds linux/amd64 and pushes to GHCRDevelopment
uv run python -m py_compile src/usace_iwr_server/*.py src/usace_iwr_server/tools/*.py
npx @modelcontextprotocol/inspector uv run python -m usace_iwr_server.appAvailable Tools
3 toolsusace_rivermile_find_markersFind River Mile Markers Near a LocationARead-onlyIdempotent
Find USACE river mile markers near a point or within a geometry.
Accepts EITHER a lat/lon pair (+ radius_meters) OR a GeoJSON geometry string.
Use lat+lon when: "What river mile markers are near 31.45, -92.71?", "Markers within 2 km of this boat ramp?" Use geometry when: "Which markers fall inside this county polygon / bbox?", "Markers along this river-reach corridor?"
For point (lat/lon) queries, each returned marker includes 'distance_m' (great-circle meters from the query point) and results are sorted nearest-first. Geometry queries return markers intersecting the geometry.
Returns: { "count": int, # markers returned (after limit) "truncated": bool, # true if more markers matched than returned "markers": [ { name, MILE, RIVER_NAME, RIVER_CODE, RIVER_NUMB, LONGITUDE1, LATITUDE1, SOURCE, distance_m? }, ... ], "query": { "type": str, "radius_meters": float|null, "crs_epsg": int }, "provenance": { source agency, dataset, service URL, layer, CRS, retrieved_utc } }
Error responses:
"Error: supply either lat+lon or geometry, not both (or neither)"
"Error: 'geometry' is not valid JSON: ..."
"Error: unsupported geometry type ..."
"Error: River Mile request failed: ..."
Inputs: lat, lon, limit, geometry, +1 more. Returns: object
usace_rivermile_nearestNearest River Mile Marker to a LocationARead-onlyIdempotent
Return the single closest river mile marker to a WGS84 coordinate.
Answers "what river mile am I at?" / "nearest marker to this point". Searches within max_radius_meters and returns the nearest marker with its great-circle distance, plus a plain-language finding.
Returns: { "finding": str, # e.g. "Nearest marker: RED River, Mile 111, ~180 m NE" "found": bool, "nearest": { name, MILE, RIVER_NAME, RIVER_CODE, RIVER_NUMB, LONGITUDE1, LATITUDE1, SOURCE, distance_m, bearing } | null, "candidates_searched": int, "query": { "lat": float, "lon": float, "max_radius_meters": float, "crs_epsg": int }, "provenance": { source agency, dataset, service URL, layer, CRS, retrieved_utc } }
Error responses:
"Error: River Mile request failed: ..."
Inputs: lat (required), lon (required), max_radius_meters. Returns: object
usace_rivermile_queryQuery River Mile Markers by River and Mile RangeARead-onlyIdempotent
Query USACE river mile markers by river name and/or mile-value range.
Use when: "List markers on the RED river", "How many markers on the Mississippi between mile 400 and 600?", "Show markers on the Ohio above mile 900" (mile_min=900).
Results are ordered by MILE ascending and paginated. total_count reflects all matching markers; use next_offset to fetch the next page.
Returns: { "count": int, # markers on this page "total_count": int, # total markers matching the filter "has_more": bool, "next_offset": int|null, # pass as 'offset' to get the next page "where": str, # the WHERE clause applied (for transparency) "markers": [ { name, MILE, RIVER_NAME, RIVER_CODE, RIVER_NUMB, LONGITUDE1, LATITUDE1, SOURCE }, ... ], "provenance": { source agency, dataset, service URL, layer, CRS, retrieved_utc } }
Error responses:
"Error: mile_min cannot be greater than mile_max"
"Error: provide at least one filter (river_name, mile_min, or mile_max)"
"Error: River Mile request failed: ..."
Inputs: limit, offset, mile_max, mile_min, +1 more. Returns: object
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 3 tools
Each tool has a clearly distinct purpose: find_markers returns all markers near a point or within a geometry, nearest returns the single closest marker to a coordinate, and query filters by river name and mile range. Their descriptions are thorough and include usage guidance that eliminates ambiguity.
All tool names follow a `usace_rivermile_verb` pattern, using clear and descriptive verbs (find_markers, nearest, query). The naming is consistent and predictable, though slightly long. A minor deviation is that 'nearest' is an adjective rather than a verb, but the intent is still clear.
Three tools is an ideal count for this specialized domain. Each tool addresses a distinct and common query pattern for river mile markers: spatial search, nearest point, and attribute-based filtering. There are no redundant or missing core operations.
The tool set covers the primary use cases for querying river mile markers: proximity search, nearest-marker lookup, and attribute filtering/pagination. A minor gap is the lack of a tool to retrieve a single marker by ID or name, but the existing tools cover the most common workflows without dead ends.
Maintenance
Related MCP Connectors
Hosted MCP server for live public-data APIs and Skills for AI agents.
MCP server providing access to the Scorecard API to evaluate and optimize LLM systems.
MCP server for progressive tool usage at any scale (see https://klavis.ai)
Related MCP Servers
- AlicenseNot gradedqualityFmaintenanceAn experimental MCP server providing spatial context for LLMs by interfacing with French Geoplateforme services. It enables tasks such as geocoding, altitude lookups, and querying administrative, cadastral, or urban planning data.10 npm4MIT
- AlicenseAqualityBmaintenanceMCP server that exposes any Pumperly instance to LLMs, enabling real-time fuel price queries, station search, route planning, and geocoding.6102 npm3GPL 3.0
- AlicenseAqualityDmaintenanceAn MCP server that gives AI assistants direct access to the FEMA National Flood Hazard Layer (NFHL) for flood zone lookups, FIRM panel information, and flood map data in the United States.627 npmMIT
- FlicenseAqualityDmaintenanceAn MCP server that exposes Charlotte, NC and Mecklenburg County open data as tools for an LLM agent, enabling queries about trash pickup, parcels, zoning, crime, and more by geocoding addresses and querying live ArcGIS layers.21-