🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

usgs-mcp

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

usgs-mcp

MCP server providing access to USGS Water Services for streamflow, flood stages, and peak events

pipPyPI
Version
0.1.0
Weekly downloads
161
Maintainers
1

usgs-mcp

MCP server providing access to USGS Water Services for real-time streamflow, flood stages, peak events, and historical statistics.

This server fills a critical gap in the ocean-mcp ecosystem by providing inland flooding and river data — often the deadliest aspect of hurricanes and storms.

Data Sources

  • USGS Water Services (waterservices.usgs.gov) — real-time and historical streamflow data
  • USGS NWIS Peak (nwis.waterdata.usgs.gov) — annual peak streamflow records

No API key required. All data is public domain.

Tools (10)

Site Discovery

ToolDescription
usgs_find_sitesFind gauge stations by state or bounding box
usgs_get_site_infoGet detailed metadata for a specific site
usgs_find_nearest_sitesFind sites near a lat/lon point

Streamflow Data

ToolDescription
usgs_get_instantaneous_valuesReal-time ~15-minute interval data (up to 120 days)
usgs_get_daily_valuesDaily mean/min/max values (decades of history)
usgs_get_hydrographSummary with trend and historical median comparison

Flood Analysis

ToolDescription
usgs_get_peak_streamflowAnnual peak flow records (50+ years at many sites)
usgs_get_flood_statusCurrent conditions vs. historical context

Statistics

ToolDescription
usgs_get_monthly_statsMonthly mean/min/max/percentiles
usgs_get_daily_statsDaily percentiles (flow duration)

Quick Start

Install from PyPI

uvx usgs-mcp

Install from source

cd servers/usgs-mcp
uv sync
uv run usgs-mcp

Claude Desktop Configuration

{
  "mcpServers": {
    "usgs": {
      "command": "uvx",
      "args": ["usgs-mcp"]
    }
  }
}

Example Queries

  • "What is the current streamflow on the Potomac River?" → usgs_get_instantaneous_values(site_number="01646500")
  • "Find USGS gauges in Texas" → usgs_find_sites(state_code="TX")
  • "Is the Mississippi at St. Louis flooding?" → usgs_get_flood_status(site_number="07010000")
  • "What were the biggest floods on the Potomac?" → usgs_get_peak_streamflow(site_number="01646500")

Development

cd servers/usgs-mcp
uv sync --group dev

# Unit tests (no network)
uv run pytest tests/ --ignore=tests/test_live.py --ignore=tests/test_mcp_protocol.py -v

# Integration tests (needs network)
uv run pytest tests/test_live.py -v

# MCP protocol test
uv run pytest tests/test_mcp_protocol.py -v

License

MIT

Keywords

discharge

FAQs

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts