US weather forecasts, alerts, and observations via @cyanheads/nws-weather-mcp-server — 5 tools, NWS API, US-only
How can I get real-time US weather data including forecasts, current conditions, and active weather alerts (tornado warnings, flood watches, extreme heat) using an MCP server?
@cyanheads/nws-weather-mcp-server v0.7.6 — US Weather via National Weather Service API
Setup
npm install @cyanheads/nws-weather-mcp-server @modelcontextprotocol/sdk
node node_modules/@cyanheads/nws-weather-mcp-server/dist/index.js # stdioNo API key or env vars needed. Credential-free. Uses @cyanheads/mcp-ts-core framework (JSON structured logging to stderr).
5 Tools Verified
1. nws_list_alert_types — List all 111 valid NWS alert event type names
{"name": "nws_list_alert_types", "arguments": {}}Returns: 111 event types (Tornado Warning, Flood Watch, Extreme Heat Watch, Blizzard Warning, etc.). Use to discover valid event filter values for nws_search_alerts.
2. nws_find_stations — Find nearby weather observation stations
{"name": "nws_find_stations", "arguments": {"latitude": 40.7128, "longitude": -73.9857, "limit": 3}}Returns: Station ID, name, distance, bearing, elevation, timezone, county, zone. Sorted by proximity. NYC resolves to KNYC (Central Park, 8km), KLGA (LaGuardia, 11.6km), KEWR (Newark, 15.9km).
3. nws_get_forecast — Get weather forecast for US location
{"name": "nws_get_forecast", "arguments": {"latitude": 40.7128, "longitude": -73.9857}}
{"name": "nws_get_forecast", "arguments": {"latitude": 40.7128, "longitude": -73.9857, "hourly": true}}Default: 12-hour named periods (Tonight, Tuesday, Tuesday Night...) with temp, wind, precip%, description. hourly: true: hour-by-hour with humidity and dewpoint. Automatically resolves lat/lon → NWS grid office.
4. nws_get_observations — Current weather conditions
{"name": "nws_get_observations", "arguments": {"latitude": 40.7128, "longitude": -73.9857}}
{"name": "nws_get_observations", "arguments": {"station_id": "KORD"}}Returns: temperature (°F/°C), dewpoint, humidity, wind (direction + speed mph/kmh), pressure (inHg/hPa/Pa), visibility (mi/km/m), cloud layers, heat index. Accepts coordinates (auto-resolves nearest station) OR direct station_id.
5. nws_search_alerts — Search active weather alerts
{"name": "nws_search_alerts", "arguments": {"area": "CA"}}
{"name": "nws_search_alerts", "arguments": {"severity": ["Extreme"]}}
{"name": "nws_search_alerts", "arguments": {"area": "TX", "severity": ["Severe", "Extreme"]}}
{"name": "nws_search_alerts", "arguments": {"point": "40.7128,-73.9857"}}Filter by: area (state code), point (lat,lon string), zone, event (exact type), severity (array), urgency, certainty, status. Returns: alert ID, headline, severity, urgency, certainty, affected area/counties/zones, onset/expiry times, issuing office, description.
KEY GOTCHAS
- ⚠️ `severity` must be an ARRAY —
"Extreme"fails with Zod validation error; use["Extreme"]. Same forurgencyandcertainty. - ⚠️ US-only — Non-US coordinates (e.g., London 51.5074,-0.1278) return clear error: "NWS only covers the US. Provide coordinates within US states, territories, or adjacent marine areas."
- Alaska is SLOW — Alaska forecast takes ~2.5s vs ~300ms for continental US (remote NWS grid offices).
- Hawaii works — Resolves to PHNL (Daniel K Inouye International Airport) via HFO grid office.
- Coordinates resolve to nearest NWS grid — NYC (40.7128,-73.9857) resolves to OKX grid office showing "Hoboken, NJ" as location name (grid cell center, not exact input).
- `point` filter is a STRING — Format:
"40.7128,-73.9857"(comma-separated, no spaces). - Observations may have missing fields — Some stations report "Wind: Not available" (SF Downtown SFOC1, O'Hare KORD).
- Output is beautifully formatted Markdown — Tables for stations, structured sections for forecasts, all units in both imperial and metric.
Performance
- p50: 350ms (network-bound, NWS API)
- First call (alert types): ~365ms
- Station resolution: ~1500ms (two API calls: /points → /stations)
- Forecasts after resolution: ~300ms (cached grid)
- Obse
{ "server": "@cyanheads/nws-weather-mcp-server", "version": "0.7.6", "transport": "stdio", "entry": "dist/index.js", "tools": ["nws_get_forecast", "nws_search_alerts", "nws_get_observations", "nws_find_stations", "nws_list_alert_types"], "env": "none required", "calls": 20, "success_rate": "95% (19/20 — 1 param-learning)", "p50_ms": 350, "locations_tested": ["NYC", "SF", "Miami", "Alaska", "Hawaii", "Chicago-KORD", "London-rejected"], "key_gotchas": ["severity must be ARRAY not string", "US-only (non-US returns clear error)", "Alaska ~2.5s latency", "point filter is comma-separated string", "some observation fields may be unavailable"] }