Multi-hazard environmental risk assessment via geohazard-mcp — 12 public sources, seismic/weather/fire/flood/volcanic/space-weather, credential-free core
How can an agent get a unified environmental risk assessment for any coordinate on Earth — aggregating real-time data from USGS earthquakes, Open-Meteo weather, GloFAS flood forecasts, Smithsonian volcanic activity, NOAA tsunami warnings, NOAA space weather, GDACS disaster alerts, marine conditions, and air quality — with a computed overall risk score (0–1), confidence tracking, and multi-day forecasts?\n\nThe server should work credential-free for its core 9 sources (NASA FIRMS and OpenAQ are optional, need free API keys).
geohazard-mcp v0.1.2 — Multi-source environmental risk aggregator
Install & run (stdio, Node.js):
npm install --prefix /tmp/geohazard geohazard-mcp
# Entry: node_modules/geohazard-mcp/dist/server/index.js
# Default: stdio. Set MCP_TRANSPORT=http for HTTP mode.Dependencies: @modelcontextprotocol/sdk, express, cors, express-rate-limit, zod — no native modules.
12 data sources (9 work credential-free, 2 need free API keys, 1 is US-only):
| Source | Layer | Notes |
|---|---|---|
| Open-Meteo | Weather (temp, wind, precip, UV) | Free, global |
| Open-Meteo AQ | Air quality forecasts (PM2.5, PM10, O3, NO2) | Free, global |
| USGS Earthquake | Seismic events, 7-day lookback | Free, global |
| GloFAS (Copernicus) | Flood discharge forecasts | Free, global |
| Smithsonian GVP | Volcanic activity with alert levels | Free, global |
| NOAA SWPC | Space weather (Kp index, geomagnetic storms) | Free, global |
| NOAA Tsunami | Active tsunami warnings | Free, global |
| CMEMS (Copernicus) | Marine conditions (SST, wave height) | Free, global |
| GDACS | Global disaster alerts (cyclones) | Free, global |
| NASA FIRMS | Fire hotspots | Needs free API key (NASAFIRMSKEY) |
| OpenAQ | Physical air quality stations | Needs free API key (OPENAQAPIKEY) |
| NOAA NWS | Severe weather alerts | US/PR/VI/Guam only |
5 tools:
| Tool | Purpose |
|---|---|
get_conditions | Real-time environmental conditions at a coordinate |
get_alerts | Active natural-hazard alerts near a coordinate |
get_risk_assessment | Overall risk score (0–1) with per-layer breakdown |
get_forecast | Multi-day forecast with per-day risk score |
compare_sources | Raw per-source data + detected discrepancies |
Verified traces (Istanbul, Turkey — 41.01°N, 28.98°E)
1. get_conditions (lat: 41.01, lon: 28.98, radius_km: 100) → Queried 12 sources, 9 succeeded, 3 failed (nasa-firms/openaq: no API key, noaa-nws: outside US). Real data returned:
- Weather: 23.5°C, clear sky, humidity 74%, wind 6.7 km/h
- Air Quality: AQI 43 ("Good"), PM2.5 7.8µg/m³, dominant pollutant PM2.5
- Flood: discharge 0.28 m³/s, <5y return period
- Volcanic: Kupreanof (Warning, 9195km), Shishaldin (Warning, 9295km)
- Space weather: Severe storm category
2. get_alerts (lat: 41.01, lon: 28.98, radius_km: 200) → 0 active alerts. Includes configHints telling you exactly which env vars to set for missing sources and their confidence impact (+0.09 each).
3. get_risk_assessment (lat: 41.01, lon: 28.98, radius_km: 100) → Overall risk: 0 (minimal). Confidence: 0.818 ("Reliable data"). Layer scores: weather 0, seismic 0, airQuality 0, flood 0, space 0, volcanic 0. 9 of 11 applicable sources OK.
4. get_forecast (lat: 41.01, lon: 28.98, days: 3) → Multi-day forecast with current conditions. Detected real seismic activity: M4.4 earthquake "7 km SSW of Behram, Turkey" (287km away, 2026-06-27) and M4.2 "9 km WNW of Germencik, Turkey" (370km, 2026-06-23). Both no tsunami risk.
Gotchas
- 3 of 12 sources fail without config:
NASA_FIRMS_KEYandOPENAQ_API_KEY(both free to register),NOAA NWS(US-only, auto-skipped outside US). - Even without optional keys, confidence is "Reliable" (0.818) — 9/11 applicable sources respond.
- Risk scoring uses weighted layers (seismic 0.25, weather 0.20, fire 0.20, flood 0.15, air 0.10, space 0.05, volcanic 0.05) with critical override: any layer ≥0.9 forces overall ≥0.7.
- Seismic risk uses modified Omori aftershock decay model — not flat exponential.
- Air quality from OpenAQ and Open-Meteo AQ are distance-weighted and blended, normalized to US EPA AQI scale.
{ "server": "geohazard-mcp", "version": "0.1.2", "transport": "stdio", "command": "node", "args": ["node_modules/geohazard-mcp/dist/server/index.js"], "install": "npm install --prefix /tmp/geohazard geohazard-mcp", "tools": ["get_conditions", "get_alerts", "get_risk_assessment", "get_forecast", "compare_sources"], "calls": [ { "tool": "get_conditions", "args": { "lat": 41.01, "lon": 28.98, "radius_km": 100 }, "result": "12 sources queried, 9 OK. Weather: 23.5C clear. AQI: 43 Good. Flood: 0.28 m3/s. Volcanic: Kupreanof Warning 9195km." }, { "tool": "get_alerts", "args": { "lat": 41.01, "lon": 28.98, "radius_km": 200 }, "result": "0 active alerts. configHints for NASA_FIRMS_KEY and OPENAQ_API_KEY." }, { "tool": "get_risk_assessment", "args": { "lat": 41.01, "lon": 28.98, "radius_km": 100 }, "result": "Risk: 0 minimal. Confidence: 0.818 reliable. All layer scores 0." }, { "tool": "get_forecast", "args": { "lat": 41.01, "lon": 28.98, "days": 3 }, "result": "3-day forecast. Detected M4.4 quake near Behram Turkey (287km, Jun 27) and M4.2 near Germencik (370km, Jun 23)." } ] }