Weather Data MCP Server
v1.54.119 weather tools, no API keys: forecasts, alerts, air quality, marine, radar, lightning, wildfires
Weather MCP is a Model Context Protocol server that connects AI assistants (Claude, Cursor, Cline, Zed, and any other MCP client) to live weather data: forecasts, current conditions, alerts, air quality, marine conditions, lightning, radar, rivers, wildfires, aviation weather, and 85+ years of historical weather.
Summary extracted from the README.
Weather MCP Server
Give your AI assistant real weather data — 19 tools, zero API keys, zero signup, zero cost.
Weather MCP is a Model Context Protocol server that connects AI assistants (Claude, Cursor, Cline, Zed, and any other MCP client) to live weather data: forecasts, current conditions, alerts, air quality, marine conditions, lightning, radar, rivers, wildfires, aviation weather, and 85+ years of historical weather. It's built entirely on free public data sources — NOAA, the NOAA Aviation Weather Center, the NOAA Storm Prediction Center, the NOAA Climate Prediction Center, NOAA Tides & Currents (CO-OPS), the NOAA National Data Buoy Center, the US Drought Monitor, USDA NRCS SNOTEL, Open-Meteo, MET Norway, USGS, NIFC, NASA FIRMS, RainViewer, and Blitzortung.org — so there is nothing to sign up for and no key to paste in. (A few optional keys unlock extras — see Optional API keys — but no tool ever requires one.)
claude mcp add weather -- npx -y @dangahagan/weather-mcp@latest
That's the whole install for Claude Code. For any other MCP client, add this to its MCP config:
{
"mcpServers": {
"weather": {
"command": "npx",
"args": ["-y", "@dangahagan/weather-mcp@latest"]
}
}
}
Then just ask:
"What's the weather in Tokyo this weekend?" "Is there any lightning near the lake right now?" "How does today compare to normal for this time of year?" "Are there wildfires within 50 miles of my cabin?" "Will there be a full moon this weekend?" "Is this a record high for today?" "How bad is the pollen in Berlin today?" "What was the weather in Paris on June 6, 1944?"
👉 See it in action — real prompts like these with the answers they produced, and the raw server output behind them.
📦 Listed in the Official MCP Registry as io.github.dgahagan/weather-mcp.
✅ The official package is @dangahagan/weather-mcp, published from this repository via npm trusted publishing. Every release carries a signed provenance attestation tying the tarball to the exact commit and workflow that built it — verify any version without installing it:
npm view @dangahagan/weather-mcp@latest dist.attestations
Republished copies of this server exist under other npm scopes. They are MIT-licensed forks, which the license permits, but they are not maintained here and are usually many versions behind. This issue tracker covers @dangahagan/weather-mcp only — for anything installed from another scope, please report it to that package's publisher.
Why this server?
There are excellent commercial weather MCPs backed by paid APIs and full-time teams. If you need SLA-backed data, minute-level nowcasting, or premium global station coverage, they're worth a look — this project won't pretend otherwise.
Choose this one if you want:
- Genuinely free — every data source is a free public API. No trial that expires, no credit card, no rate-limited "free tier" bait.
- No API keys — install to first forecast in under a minute. Nothing to configure, nothing to leak into a repo. (Four optional keys add extras if you want them; the default configuration needs none.)
- Fully open source — MIT licensed, readable TypeScript, 9,218 tests. Audit it, fork it, fix it.
- Privacy-respecting — your queries go directly from your machine to public weather APIs. No middleman server, and no telemetry unless you opt in.
- Breadth — 19 tools covering weather, safety hazards (lightning, floods, wildfires), marine conditions, air quality, and historical data back to 1940. Most weather MCPs stop at forecasts.
The tradeoff is honest: US data (NOAA) is richer than international data (Open-Meteo), some tools are US-only, and free APIs come with fair-use rate limits. See Coverage & Limitations.
Tools
All 19 tools, documented in detail in docs/TOOLS.md:
| Tool | What it does | Coverage |
|---|---|---|
get_forecast |
Daily/hourly forecasts up to 16 days by coordinates, saved location, or city name, plus a 2-hour, 15-minute precipitation nowcast in North America and Central Europe (granularity="minutely") (NOAA publishes 7 days daily and ~6.5 days hourly in the US, and says so when you ask for more; source="openmeteo" reaches the full range); sunrise/sunset, UV, precipitation probability, optional climate-normals comparison, optional moon phase & twilight almanac, optional five-model agreement comparison; optional NWS forecast discussion (include_discussion); include_solar adds daily solar radiation (kWh/m², peak sun hours) and sunshine hours on both forecast paths; an automatic SPC convective outlook line at Marginal risk or above (absence is not an all-clear); automatic per-day heat-stress and frostbite lines on both the NOAA and Open-Meteo forecast paths; an automatic per-day precipitation-type line (snow, rain, freezing rain) on the Open-Meteo forecast path; granularity="seasonal" gives monthly temperature and precipitation anomalies for the next several months (ECMWF SEAS5) with the current ENSO status (NOAA CPC). When the National Weather Service has a life-threatening alert active for a point in the United States or an NWS-served territory, its warning is surfaced at the top of the response before the report — absence of the banner is not an all-clear, so call get_alerts for the authoritative answer |
🌍 Global |
get_current_conditions |
Current weather: temperature, wind, humidity, pressure; NOAA station observations in the US (plus heat index/wind chill, snow depth, optional NOAA fire-weather indices), Open-Meteo model data elsewhere (with an optional computed Fosberg fire-weather index), or real airport station observations worldwide with source="metar" (the optional Fosberg index is then computed from the station's own observation). With fire weather on, a point in a US county (or county-equivalent) also gets its county's latest weekly US Drought Monitor category, on every source. Within 25 km of an automated SNOTEL mountain site (western US and Alaska), every source also adds that site's latest snow water equivalent with its percent of median, snow depth and median peak, labelled as the site's measurement, not the point's. Always states the observation's age, and automatically falls back to a fresher nearby station when the nearest one has gone dark. In extreme conditions automatically adds frostbite time-to-onset (computed wind chill) or heat-stress context (estimated WBGT) When the National Weather Service has a life-threatening alert active for a point in the United States or an NWS-served territory, its warning is surfaced at the top of the response before the report — absence of the banner is not an all-clear, so call get_alerts for the authoritative answer |
🌍 Global |
get_alerts |
Active watches, warnings, and advisories sorted by severity; official national warnings for the US (NOAA), Canada (ECCC), 38 European countries (MeteoAlarm), India (NDMA SACHET), the Philippines (PAGASA), Indonesia (BMKG), and Japan (JMA) | 🇺🇸 🇨🇦 🇪🇺 🇮🇳 🇵🇭 🇮🇩 🇯🇵 |
get_historical_weather |
Hourly/daily observations from 1940 to present; for US points and ranges up to 7 days, nearby NOAA SPC storm reports (tornado, wind, hail); an automatic heating / cooling degree-day totals line on the Open-Meteo archive output (base 65°F / 18°C) | 🌍 Global |
get_weather_summary |
One-call overview combining current conditions, forecast, and alerts (optionally air quality and lightning); a life-threatening NWS alert is surfaced once above the whole summary, not once per section | 🌍 Global |
search_location |
Geocode place names to coordinates ("Paris" → 48.85, 2.35) | 🌍 Global |
get_air_quality |
AQI (US/European scales), pollutants, UV index, health guidance; current pollen levels for European locations (or worldwide with an optional key); optional day-grouped forecast up to 7 days with per-day peak AQI and UV | 🌍 Global |
get_marine_conditions |
Wave height, swell, ocean currents, sea state on WMO Code Table 3700 (Douglas sea scale) with a severity marker and legend — includes Great Lakes and major US bays; forecast up to 16 days. Near US coasts and the Great Lakes, also the observed picture: tide predictions for the next 48 hours, the current water level and the nearest buoy observation (NOAA CO-OPS and NDBC; observed and preliminary, not for navigation) | 🌍 Global (observed tides, water levels and buoys: US coasts and Great Lakes) |
get_weather_imagery |
Precipitation radar (static or 2-hour animated loops) + GOES satellite imagery; composite: true returns a finished radar or satellite map as an image |
🌍 Global |
get_lightning_activity |
Real-time strike detection with 4-level proximity safety assessment | 🌍 Global |
get_river_conditions |
US: NWPS gauge levels, flood stages, streamflow, rise/fall trends, forecast series. Great Britain: Environment Agency observed river levels against each gauge's published typical range. Elsewhere: GloFAS modeled discharge snapped to the nearest river channel, with ensemble forecast | 🌍 Global |
get_wildfire_info |
US: named incidents with containment, size, and safety guidance from the nearest uncontained fire. Elsewhere: NASA FIRMS satellite heat detections (VIIRS, near real-time), clustered with distance, bearing, and intensity | 🌍 Global |
get_aviation_weather |
For an airport (ICAO station, e.g. KJFK) or a point: SIGMETs and G-AIRMETs whose area contains the point, the TAF (the airport's own, or the nearest TAF airport's) raw and decoded, that airport's raw METAR, and pilot reports within 100 nm from the last 3 hours. Always aviation units and UTC; an empty or failed hazard feed is never shown as an all-clear. Not an official flight briefing |
🌍 Global (G-AIRMETs: contiguous US) |
get_space_weather |
The current planetary Kp index and NOAA geomagnetic storm scale, a Kp outlook by UTC day, and NOAA's OVATION probability of aurora overhead at the point, with whether it is dark there now; a section that could not be retrieved says so and is never shown as quiet; cloud cover is not included | 🌍 Global |
check_service_status |
Checks that NOAA and Open-Meteo are reachable, lists the upstreams it does not check, plus cache statistics | — |
save_location |
Save places as aliases ("home", "cabin") with optional activity tags | — |
list_saved_locations |
List all saved locations | — |
get_saved_location |
Details for one saved location | — |
remove_saved_location |
Delete a saved location | — |
Default preset: with no configuration, the server exposes the
basicpreset —get_weather_summary(one call covers most "what's the weather?" questions), plusforecast,current_conditions,alerts,search_location, andcheck_service_status. Enable everything with one environment variable — see Tool Selection.
Consistent location input: every location-based tool accepts the same three forms —
latitude+longitude, a savedlocation_name(e.g."home"), or a free-textcity_name(e.g."Bend, Oregon", geocoded automatically). When a name is used, the response echoes the resolved place and coordinates.
Output verbosity: high-volume tools (
get_forecast,get_alerts,get_weather_imagery,get_river_conditions,get_wildfire_info,get_lightning_activity) acceptdetail: "summary" | "standard" | "full"(defaultstandard) to trade completeness for token cost — e.g.fullreturns the complete alert text, uncapped hourly forecast, every radar animation frame, and up to 25 nearby gauges/fires/strikes instead of the default 5-10.
Prompts
Three MCP prompts give a client ready-made workflows. Each is a text template that tells the model which tools to call and how to report; it calls nothing itself.
severe_weather_briefing(location): official warnings fromget_alertsfirst, reported as returned, then the forecast hazards. The model is told never to say "no warnings" unlessget_alertsreturned that for an area it covers.trip_weather_check(destination, optionaldates): the forecast for the trip and any warnings. A date beyond the forecast range is said to be beyond it, never estimated.compare_places(place_1andplace_2, optionalplace_3toplace_5): one forecast per place, compared like for like, with any failed place named. One argument per place, so a name with a comma such as "Washington, DC" stays one place.
A prompt is listed only when the tools it uses are enabled. The server also sends a short orientation (instructions) when a client connects. Neither is part of tools/list, so the context-cost figures below are unchanged.
Feature highlights
- Smart source selection — US queries use NOAA (detailed, includes forecaster narratives); everywhere else uses Open-Meteo. You never have to pick — and on a US hourly forecast the answer tells you which product you got and when NOAA last published it, so reaching for
source="openmeteo"is a choice you can make rather than one made silently for you. If Open-Meteo is having an outage, a forecast outside the US is answered by MET Norway rather than failing, and says so. - International weather alerts —
get_alertsroutes by country: NOAA in the US, Environment and Climate Change Canada alerts in Canada, the official national warnings of 38 European countries via EUMETNET MeteoAlarm, the national CAP feeds of India (NDMA SACHET), the Philippines (PAGASA) and Indonesia (BMKG), and the Japan Meteorological Agency's own disaster-prevention feed in Japan — shown unmodified, with the issuing service credited. Where a feed publishes geometry inline, warnings are matched to your exact point by the alert's own polygon rather than to the whole country (the Philippines and Indonesia today; Europe remains country-level). Japanese warnings are matched to your point by JMA warning area, with the Japanese name shown as published and an English gloss beside it. Border cities like Toronto get the right country's alerts, not the nearest bounding box's. - Real observations worldwide — ask for what a station is actually reporting and
get_current_conditionswill read the nearest airport's METAR (source="metar"): a genuine instrument reading anywhere on earth, with the station, its distance, and the observation age always stated. Outside the US this is the difference between a measurement and a model estimate. - Aviation weather — ask "what's the TAF for JFK, and is anyone reporting turbulence?" and
get_aviation_weatheranswers for an airport or any point: SIGMETs and G-AIRMETs whose area contains it, the TAF in raw and decoded form, the airport's METAR, and nearby pilot reports, in knots, statute miles, feet and UTC whatever your unit setting. A hazard feed that failed or could not be checked says so; it is never shown as "none". In thefullpreset. Not an official flight briefing. - Aurora and space weather — ask "can I see the northern lights tonight?" and
get_space_weathergives NOAA's numbers for any point, in either hemisphere: the current planetary Kp and geomagnetic storm level, the next days' maximum Kp, the chance of aurora overhead at the nearest grid cell, and whether it is dark there now. It does not include cloud cover, and it does not promise you will see anything. In thefullpreset. - Model agreement — ask "how confident is this forecast?" and
compare_models=truecompares five global models (GFS, ECMWF, ICON, GEM, UKMO) in one request, summarizing where they agree and where they split rather than dumping five forecasts. Spread across models is a proxy for uncertainty, not a guarantee — a tight spread can still be wrong, and the output says so. - Ensemble spread — the sibling question: "how confident is the model itself?"
ensemble_spread=truesummarizes ECMWF ENS's 50 perturbed members — per-day High/Moderate/Low confidence, interquartile temperature bands, and how many members produce rain — instead of one deterministic forecast. Member fractions are raw model output, not calibrated probabilities: a confident ensemble can still be wrong, and the output says so. Mutually exclusive withcompare_models; the two answer different questions. - Saved locations — save "home", "work", or "cabin" once, then ask "what's the weather at home?" Locations persist in
~/.weather-mcp/locations.jsonand can be tagged with activities ("boating", "skiing") so the AI highlights what matters to you. - Climate context — optional 30-year climate normals show how today compares: "10°F warmer than normal for this date." For US locations the normals also carry the record high/low for the date and the year it was set: "is this a record high?"
- Astronomy almanac — opt-in moon phase, illumination, moonrise/moonset, civil/nautical/astronomical twilight, and next full/new moon dates on daily forecasts (
include_astronomy). Computed locally — accurate to the arcminute, works at the poles, costs zero API calls: "when does it get fully dark?" - Safety-aware output — lightning, wildfire, flood, and marine tools include graded safety assessments and plain-language recommendations, not just raw numbers.
- Winter weather — snow depth, snowfall accumulation, and ice accumulation forecasts with sensible trace-amount filtering.
- Timezone-aware — every timestamp is rendered in the location's local time with DST handled correctly.
- Imperial or metric — pick your units server-wide (
WEATHER_UNITS) or per request (units: "metric"), with fine-grained overrides (wind in knots, pressure in hPa, 24-hour clock). Defaults to imperial. See Units & Localization. - Built-in caching — an LRU cache with per-data-type TTLs (5 minutes for alerts, 2 hours for forecasts, forever for finalized historical data) makes repeat queries return in <10ms and cuts upstream API calls by 50–80%.
- Actionable errors — failures explain what happened and link to the upstream status page instead of dumping a stack trace.
- Remote hosting — besides the local stdio server, the package ships
weather-mcp-http, which serves the same tools over Streamable HTTP so a claude.ai connector or a client on another machine can reach your own instance. It requires an OAuth authorization server you run (Keycloak, Authentik and similar) and checks every request's token, including its audience. For self-hosters; there is no public instance. See docs/REMOTE_HOSTING.md.
Data sources
All free, all public, no authentication required:
| Source | Provides | Coverage |
|---|---|---|
| NOAA Weather API | US forecasts, current conditions, alerts, fire weather | US |
| Open-Meteo | Global forecasts, historical data (1940+), air quality, marine, geocoding, climate normals, fire-weather inputs, seasonal outlooks (ECMWF SEAS5) | Global |
| MET Norway | Global forecasts, used only when Open-Meteo fails transiently outside the US (about a nine-day horizon, daily only) — CC BY 4.0 | Global |
| NOAA Storm Prediction Center | Day 1–3 categorical convective outlooks (the get_forecast SPC line) and daily preliminary storm reports (the get_historical_weather section) |
Contiguous US (reports: all US) |
| NOAA Climate Prediction Center | ENSO status and synopsis | Global context |
| NOAA SWPC | Planetary Kp, NOAA space weather scales and the OVATION aurora nowcast (get_space_weather) | Global |
| NOAA Aviation Weather Center | METAR airport observations, TAFs, SIGMETs, G-AIRMETs and pilot reports | Global (G-AIRMETs: contiguous US) |
| NOAA NWPS | River levels, streamflow, flood stages | US |
| NOAA CO-OPS Tides & Currents | High and low tide predictions and the current observed water level (the get_marine_conditions observed section) |
US coasts and Great Lakes |
| NOAA NDBC | Latest buoy and coastal-station observations: waves, wind, water and air temperature, pressure (the get_marine_conditions observed section) |
Mainly US waters |
| Environment Agency | Observed river levels from the real-time gauge network, with published typical ranges — Open Government Licence v3 | Great Britain |
| RCC ACIS | Daily record high/low temperatures | US |
| US Drought Monitor (NDMC–UNL, USDA, NOAA) | Weekly county drought categories (the include_fire_weather drought line) |
US counties and county-equivalents |
| USDA NRCS SNOTEL | Measured snow water equivalent, snow depth and the site's median at the nearest automated mountain site (the get_current_conditions snowpack section) | Western US and Alaska |
| EUMETNET MeteoAlarm | Official national weather warnings (38 European countries) | Europe |
| MSC GeoMet | Environment and Climate Change Canada weather alerts | Canada |
| NDMA SACHET | Official Indian warnings (CAP; polygon geometry served from a separate endpoint, so alerts are matched at country level) — public domain | India |
| PAGASA | Official Philippine warnings (CAP, inline polygons) — CC BY 4.0 | Philippines |
| BMKG | Official Indonesian nowcast warnings (CAP, inline polygons) — attribution required | Indonesia |
| JMA | Official Japanese weather warnings from the disaster-prevention XML feed, matched by class10 warning area — Government Standard Terms of Use; attribution 出典:気象庁ホームページ |
Japan |
| NIFC WFIGS | Active wildfire perimeters and incidents | US |
| NASA FIRMS | Satellite fire detections (VIIRS, near real-time) | Global |
| RainViewer | Precipitation radar imagery | Global |
| NASA GIBS | GOES GeoColor satellite imagery; base map and outlines for composited maps | Western Hemisphere (satellite), Global (base map) |
| Blitzortung.org | Community lightning detection network | Global |
Open-Meteo allows 10,000 requests/day for non-commercial use; caching keeps typical AI usage far below that. Please respect the upstream providers' fair-use terms.
Composited maps (get_weather_imagery with composite: true) carry the acknowledgment NASA requests for GIBS imagery, alongside the RainViewer radar credit or the NOAA GOES satellite credit:
Imagery provided by services from NASA's Global Imagery Browse Services (GIBS), part of NASA's Earth Science Data and Information System (ESDIS).
Installation
Recommended — npx (always latest, nothing to manage):
# Claude Code
claude mcp add weather -- npx -y @dangahagan/weather-mcp@latest
Or in any MCP client's configuration:
{
"mcpServers": {
"weather": {
"command": "npx",
"args": ["-y", "@dangahagan/weather-mcp@latest"]
}
}
}
Global install:
npm install -g @dangahagan/weather-mcp
From source:
git clone https://github.com/weather-mcp/weather-mcp.git
cd weather-mcp
npm install
npm run build
Then point your MCP client at node /absolute/path/to/weather-mcp/dist/index.js.
Requires Node.js 22.7.0 or newer. No API keys, tokens, or accounts needed — see Optional API keys for the four that add optional extras, and Optional dependency if you want a smaller install.
Works with
Claude Desktop, Claude Code, Cline, Cursor, Zed, VS Code (GitHub Copilot), LM Studio, Postman — any client that speaks MCP. Per-client setup instructions: docs/CLIENT_SETUP.md.
Upgrading
- npx users: nothing to do —
@latestalways fetches the newest version. - Global install:
npm install -g @dangahagan/weather-mcp@latest - From source:
git pull && npm install && npm run build
Restart your MCP client after upgrading. See CHANGELOG.md for release notes.
Running more than one MCP client on this machine? Restart every one of them. All clients share a single ~/.weather-mcp/locations.json, and a client still running a version before 1.31.2 writes that file from a stale in-memory copy — it will delete saved locations that an upgraded client has since written. The hazard is the un-upgraded instance, so the protection holds only once every client on the machine has been restarted onto the new version.
Configuration
Most users need zero configuration. Everything below is optional.
Settings go in your MCP client config's env block:
{
"mcpServers": {
"weather": {
"command": "npx",
"args": ["-y", "@dangahagan/weather-mcp@latest"],
"env": {
"ENABLED_TOOLS": "all",
"CACHE_MAX_SIZE": "2000",
"LOG_LEVEL": "1"
}
}
}
}
You can also keep settings in a .env file (see .env.example). Name its absolute path in the client config, for example "DOTENV_CONFIG_PATH": "/path/to/weather-mcp.env". That is the only .env the server reads. It never reads a .env from its working directory: an MCP client starts the server inside whatever project is open, and that project's .env could otherwise reconfigure the server. Settings in the env block win over the file.
Tool Selection
Control which tools are exposed to reduce context overhead:
| Preset | Tools |
|---|---|
basic (default) |
weather_summary, forecast, current_conditions, alerts, search_location, check_service_status |
standard |
basic + historical_weather, air_quality, and saved-location tools |
full |
everything — standard + marine, imagery, lightning, rivers, wildfire, aviation, space weather (same as all) |
all |
all 19 tools |
Context cost. Every MCP client puts the tools/list result into model context on
every turn, so the preset you choose is a standing cost on every request. Measured on
the built server: basic 14,549 bytes (~3.6k tokens), standard 23,370 (~5.8k),
full/all 36,654 (~9.2k). It scales with the number of tools, not the number of
data sources — adding Japan and India as alert authorities added zero tools and zero bytes.
Each tool also carries a display title ("Weather Forecast") and MCP behaviour hints: 17 tools are marked read-only, and the two that change saved locations are marked destructive. Clients use these to label tools and to decide when to ask before a call.
ENABLED_TOOLS=all # Use a preset
ENABLED_TOOLS=forecast,current,alerts,aqi # Specific tools only
ENABLED_TOOLS=basic,+historical,+air_quality # Add to a preset
ENABLED_TOOLS=all,-marine # Remove from a preset
Order does not matter between a preset and its +/- modifiers: -marine,all is the same as all,-marine. A value of only modifiers adjusts the default basic preset: +marine is basic plus marine. To expose a single tool, name it bare (marine).
Short aliases are supported: forecast, current, alerts, historical, status, search, aqi, marine, radar, lightning, and more.
Units & Localization
Output defaults to imperial (°F, mph, inHg, miles) and can be switched to metric (°C, km/h, hPa, km) server-wide or per request. Precedence: a per-call parameter beats a per-unit env override, which beats the WEATHER_UNITS system default.
WEATHER_UNITS=metric # switch everything to metric
WEATHER_WIND_SPEED_UNIT=kn # ...but wind in knots
WEATHER_TIME_FORMAT=24h # 24-hour clock
Or per call — the AI can honor "in Celsius" on the fly:
{ "latitude": 47.6, "longitude": -122.3, "units": "metric" }
{ "latitude": 47.6, "longitude": -122.3, "wind_speed_unit": "kn", "pressure_unit": "hPa" }
Supported on get_forecast, get_current_conditions, and get_historical_weather. Wind accepts mph/kmh/ms/kn; pressure inHg/hPa. Domain-specialized readings (fire-weather heights, NWPS river gauge stage, and the marine tool's dual-unit wave output) keep their conventional units — NWPS stage is always feet. The Environment Agency river level is the exception: it is published in metres and follows the distance preference, so it renders in metres under km and feet under mi.
Other settings
| Variable | Default | Purpose |
|---|---|---|
ENABLED_TOOLS |
basic |
Tool preset or list (see above) |
WEATHER_UNITS |
imperial |
Default unit system: imperial or metric |
WEATHER_TEMPERATURE_UNIT … |
— | Per-unit overrides: _TEMPERATURE_(F/C), _WIND_SPEED_(mph/kmh/ms/kn), _PRECIPITATION_(inch/mm), _PRESSURE_(inHg/hPa), _DISTANCE_(mi/km), _TIME_FORMAT(12h/24h) |
CACHE_ENABLED |
true |
Enable/disable response caching: true/false/1/0, any case. Any other value warns on stderr and leaves caching on |
CACHE_MAX_SIZE |
1000 |
Max entries per cache (100–10000; a whole number — anything else warns and uses the default). When a cache is full, expired entries are dropped before the least recently used live one. The composite-map cache has its own fixed bound of 32 entries, the SPC storm-report cache 64, and GIBS base-map and satellite tiles above 32 KiB are used but not cached |
API_TIMEOUT_MS |
30000 |
Upstream request timeout, end to end on a wall clock — connect, proxy and response body (5000–120000; a whole number — anything else warns and uses the default). A few clients keep a timeout of their own, such as geocoding at 10 s. The requests of one tool call share a budget of max(API_TIMEOUT_MS, 55 s), so a tool that makes several never outlives a 60 s client; a request that starts after the budget is spent fails at once with that service's timed-out message. A request two tool calls share keeps a budget of its own, and each call still answers within its own. A direct connection (not through a proxy) that does not open within 5 s fails at 5 s; once connected, the request gets this timeout |
HTTPS_PROXY / NO_PROXY |
— | Send the weather API requests through an HTTP CONNECT proxy (ALL_PROXY and lowercase names also work). Credentials go in the URL, percent-encoded: http://user:p%40ss@proxy:3128 sends the password p@ss, so write a literal % as %25 |
WEATHER_LIGHTNING_PREWARM |
true |
Subscribe saved locations' geohashes at startup so lightning has coverage before the first query, and keep them subscribed for as long as they stay saved. The saved list is re-read every 30 minutes: a location saved from another client is picked up, and a removed one stops being watched within about an hour, with no restart. Follows the lightning tool (get_lightning_activity), not get_weather_summary: no effect when the lightning tool is disabled, as it is in the default basic preset — use ENABLED_TOOLS=basic,+lightning to opt in. A saved location that does not fit the 50-subscription limit is skipped rather than displacing an area you queried. Set false (or 0, any case) to skip pre-warm and the persistent MQTT connection it opens. An unrecognized value warns on stderr and pre-warms. |
LOG_LEVEL |
1 |
0/DEBUG, 1/INFO, 2/WARN, 3/ERROR — number or name, names case-insensitive. An unrecognized value warns on stderr and falls back to INFO. Logs go to stderr. 0/DEBUG adds detail, never location text |
LOG_PII |
— | Set true to log full-precision coordinates, geocoding queries, saved-location aliases, and the error text of failed tool calls. By default these are left out and coordinates are rounded to about 1 km. The saved place name and any MQTT broker credentials are never logged. For local debugging only — not for shared or centrally collected logs |
NCEI_API_TOKEN |
— | Optional free NCEI token for official NOAA climate normals (US); falls back to Open-Meteo automatically. See Optional API keys |
FIRMS_MAP_KEY |
— | Optional free FIRMS key for targeted wildfire queries and up to 5 days of detection history. See Optional API keys |
GOOGLE_POLLEN_API_KEY |
— | Optional key for pollen outside Europe (incl. the US). Requires a Google Cloud billing account — free tier is 5,000 lookups/month. See Optional API keys and the setup guide |
WEATHER_HTTP_PUBLIC_URL, WEATHER_OAUTH_ISSUER, … |
— | Remote HTTP server (weather-mcp-http) only: five variables for its address, public URL and OAuth issuer. See docs/REMOTE_HOSTING.md |
GOOGLE_WEATHER_API_KEY |
— | Optional key for official weather alerts beyond the US, Canada, Europe, India, the Philippines, Indonesia, and Japan (~45+ more territories). Requires a Google Cloud billing account. See Optional API keys and the setup guide |
For caching architecture details, see .github/CACHING.md.
Optional API keys
The default is the product. Every one of the 19 tools works with zero keys, zero signup, and zero cost — that is the configuration this project is built around and the one most people should use. If that's you, you can skip this section entirely.
Four optional keys each unlock one extra. Without them the corresponding tool still works; it just returns the keyless answer.
| Variable | What it costs | What it adds | Without it |
|---|---|---|---|
NCEI_API_TOKEN |
Free registration (email) | Official NOAA station climate normals for US locations | Normals are computed from the Open-Meteo reanalysis archive — global, and the path virtually every user is already on. A rejected token falls back to these and says so under the normals |
FIRMS_MAP_KEY |
Free registration (email) | Targeted wildfire bbox queries with 1–5 days of detection history | Keyless 24-hour regional detection files — get_wildfire_info still works globally |
GOOGLE_POLLEN_API_KEY |
Free tier, but requires a Google Cloud billing account (credit card on file) — 5,000 lookups/month free, ~$10/1,000 after. Setup guide | Grass/tree/weed Universal Pollen Index outside Europe, including the US (65+ countries) | European pollen via CAMS still works keyless; elsewhere no pollen section renders |
GOOGLE_WEATHER_API_KEY |
Free tier, but requires a Google Cloud billing account (credit card on file) — the Weather API bills under a Maps Platform Essentials SKU; check Google's current allowance. Setup guide | Official weather alerts for ~45+ more territories — Australia, Brazil, Mexico and others (Google's coverage list is authoritative) | US, Canadian, European, Indian, Philippine, Indonesian, and Japanese alerts still work keyless; elsewhere get_alerts returns today's not-covered message |
The NCEI and FIRMS keys are true free registrations. The two Google keys are not — each has a free usage tier, but Google requires a billing account with a payment method to issue them at all. That's why they aren't described as simply "free" anywhere in these docs, and why they stay strictly optional. They are separate variables on purpose: the recommended console restriction ties a key to one specific API, so a Pollen-restricted key cannot serve alerts and vice versa. If you prefer one unrestricted key, put the same string in both.
Standing key policy
So the "genuinely free" promise above stays meaningful, this project holds to three rules:
- Optional keys must always have a usable free tier. A key that only makes sense once you're paying doesn't belong here.
- No tool will ever require a key. Every feature has a keyless path, even if that path is "this data isn't available for your region".
- Features that would require a paid key are out of scope unless there's significant user demand for that specific service.
Optional dependency
Everything above installs by default and nothing here needs configuring — this section only matters if you want a smaller install.
One dependency, mqtt, exists for a single tool: get_lightning_activity streams live strikes
from Blitzortung.org over MQTT, and nothing else in the server uses that transport. It is declared
as an optionalDependency, so a normal install still includes it and lightning works exactly as
described above. You can decline it:
npm install -g @dangahagan/weather-mcp --omit=optional
That installs 121 packages instead of 163 — 42 fewer, mqtt and its transitive tree.
What you give up, on both paths that reach lightning:
get_lightning_activityreturns an error naming the package and how to get it back, rather than a result. It never reports "no strikes" — a missing dependency rendering as an all-clear on lightning is precisely the kind of confidently wrong safety answer this project treats as its worst failure.get_weather_summarystill works, but its optionallightningsection renders as## lightning (unavailable)with the same message. Every other section is unaffected.
Nothing else changes: all 17 remaining tools behave identically, and get_lightning_activity still
appears in tools/list.
To get lightning back, reinstall without the flag.
Source builds still use a plain
npm install. TypeScript needsmqtt's bundled type declarations at build time even though the emitted server loads the package only when lightning is actually requested, so--omit=optionalbelongs to the published package, not to a build from a clone.
Coverage & Limitations
Being honest about what free public data can and can't do:
| Capability | Global | US-only |
|---|---|---|
| Forecasts (up to 16 days) | ✅ | Richer detail via NOAA, but NOAA publishes only 7 days daily / ~6.5 days hourly — a longer request is disclosed, not silently truncated |
| Historical weather (1940+) | ✅ (>7 days old) | Station-level detail for last 7 days |
| Air quality, marine, radar, lightning | ✅ | — |
| Current conditions | ✅ (model data, or real station observations via source="metar") |
Station observations via NOAA (richer detail) |
| Weather alerts | ✅ US, Canada, 38 European countries, India, the Philippines, Indonesia, and Japan keyless; ~45+ more territories with an optional key | NWS zone-level precision; Europe and India country-level; Philippines and Indonesia polygon-level; Japan warning-area level |
| River conditions | ✅ (GloFAS modeled discharge; Environment Agency gauge observations in Great Britain) | Gauge observations + official flood stages via NWPS |
| Wildfires | ✅ (FIRMS satellite detections) | Named incidents with acreage + containment via NIFC |
| Fire weather | ✅ (computed Fosberg index + dryness context) | NOAA-published Haines, grassland, red-flag indices; the county's (or county-equivalent's) weekly US Drought Monitor category on every source |
| Aviation weather (TAF, METAR, SIGMETs, pilot reports) | ✅ (international SIGMETs as received by the Aviation Weather Center) | G-AIRMETs (contiguous US only) |
| Pollen | 🇪🇺 Europe keyless (CAMS, grains/m³); elsewhere needs an optional key | Universal Pollen Index with GOOGLE_POLLEN_API_KEY |
- A US hourly forecast and a US daily forecast come from the same NOAA product, and that product is human-adjusted. Its precipitation probability is a chance over the whole grid box, republished on the forecaster's cadence rather than a model run's, so at hourly resolution it can legitimately disagree with
source="openmeteo"'s faster model view — neither is wrong.source="auto"picks NOAA on geography alone and now says so on every hourly response, with the**Updated:**header line showing when NOAA last published the grid. Daily forecasts are unaffected. - European alerts are matched at country level — the keyless MeteoAlarm feeds carry no region polygons, so warnings for a large country may not affect the requested point; the output says so. Canadian alerts use a real bbox query with polygon-backed features.
- Philippine and Indonesian alerts are matched by the alert's own polygon, and Japanese alerts by JMA warning area, so a warning is shown only when it actually covers the requested point — finer than Europe's country-level matching. Japan resolves to one of the 143 areas JMA itself publishes warnings for; a point outside all of them, or one whose area is missing from the office's own bulletin, says so rather than reporting an all-clear. Indian alerts are currently country-level: SACHET publishes each alert's geometry from a separate endpoint that is not reliably reachable from servers, so Indian warnings are listed with an explicit note that they may not affect your exact location, exactly as Europe's are. Any alert whose geometry cannot be loaded is always listed rather than dropped — never silently treated as "not near you".
- Outside the US, Canada, Europe, India, the Philippines, Indonesia, and Japan, alerts need an optional
GOOGLE_WEATHER_API_KEY; without oneget_alertssays plainly that the region isn't covered rather than guessing. With a key, Google aggregates official national feeds for roughly 45 more territories — Australia, Brazil and Mexico among them, with Google's coverage page as the authoritative list. Matching is by provider polygon, so coverage alignment may not be exact and an empty answer means "no alerts found", not a guarantee of coverage; the output says so both ways. Alert text appears in the publisher's source language. The US, Canada, Europe, India, the Philippines, Indonesia, and Japan never contact Google — those authorities stay first choice, key or no key — and a key failure surfaces loudly rather than degrading to a possibly-false all-clear. - International current conditions default to model-interpolated values at the exact coordinates.
source="metar"returns a real instrument reading instead — but from the nearest airport, which may be tens of km away and up to an hour old. The output always names the station, its distance and bearing, and the observation age, so the tradeoff is visible rather than assumed. METAR coverage follows airports, so remote land and open ocean have real gaps. - Historical data older than 7 days comes from reanalysis models (9–25km grid), not direct station observations, and trails real time by ~5 days.
- Non-US wildfire results are satellite heat detections, not managed incidents — no fire names, sizes, or containment percentages exist in the data, detections can include industrial heat sources or agricultural burns, and a clear result is not an all-clear (cloud cover hides fires; small or new fires evade detection). The output frames all of this explicitly. Keyless data covers the last 24 hours; an optional free
FIRMS_MAP_KEYunlocks targeted queries and up to 5 days of detection history (day_range). - Frostbite-risk and heat-stress (WBGT) lines, on current conditions (every source, including
source="metar") and on forecast days (both the NOAA and Open-Meteo paths), are estimated by this server from temperature, humidity, and wind — not agency-published ratings. Where NWS publishes a wind chill (a NOAA station on current conditions, the NWS grid on a NOAA forecast), the frostbite line bands off that published value; elsewhere the wind chill is computed with the standard 2001 North American model; the frostbite time bands are adapted from Environment Canada's published categories and the WBGT is the Australian Bureau of Meteorology's simplified estimate, which assumes full sun and light wind and so can overestimate in shade or overcast; the heat line says so when the reading is at night or under an overcast sky. Exertion thresholds also genuinely shift with acclimatization. Treat both as context, not as an occupational-safety determination. - Non-US fire weather is a Fosberg Fire Weather Index computed by this server from current model values — or, with
source="metar", from the station's reported values — not an agency-published rating — US locations get NOAA's own Haines/grassland/red-flag indices instead. The output says which it is and defers to national fire authorities; its category bands are a project heuristic. - The US Drought Monitor line in the fire-weather section is county level: its percentages are shares of the county's (or county-equivalent's) area on the latest weekly map, not a reading at the point. It appears only where Census.gov returns a county and USDM publishes a statistic for it, and it is left out silently when either lookup fails, so its absence does not mean there is no drought.
- The mountain snowpack section on current conditions is measured at the SNOTEL site, not at the requested point, and snowpack changes sharply with elevation and exposure; the section names the site's elevation and its distance and direction from the point, and says so on every answer. It appears only within 25 km of an active SNOTEL site (western US and Alaska) and is left out silently when NRCS cannot be reached, so its absence does not mean there is no snow.
get_weather_summarydoes not include it. - Non-US river discharge is modeled, not observed, and has no official flood-stage thresholds — levels are shown relative to recent history and the forecast ensemble. The ~5km model grid means the reported channel may be a few km from the requested point; the output says so when it is.
- Pollen is Europe-only without a key: it rides the CAMS European model on the air-quality endpoint, which returns real grains/m³ in Europe and nothing anywhere else. An optional
GOOGLE_POLLEN_API_KEYfills the gap for 65+ countries including the US, as a grass/tree/weed Universal Pollen Index (0–5) rather than per-species counts. Europe keeps the richer keyless data and never contacts Google. - Marine data has limited coastal accuracy and is not suitable for navigation.
- Lightning coverage varies by region (community-operated detector network).
- Open-Meteo's fair-use limit is 10,000 requests/day; the built-in cache makes this hard to hit in normal use.
Development
npm run build # Compile TypeScript
npm run typecheck # Typecheck src/ and every test file
npm run dev # Run in development mode
npm test # Offline tests: unit + integration (what CI runs)
npm run test:live # Live-network tests against the real upstreams, by hand
npm test && npm run test:live # Run all 9,218 tests
npm run test:coverage # Coverage report
npm run audit # Dependency vulnerability scan
Quality bar: TypeScript strict mode, no any types, 100% test coverage on critical utilities (cache, validation, unit conversion, errors), 100% pass rate, minimal runtime dependencies.
Project structure, patterns, and contribution guidance:
- CONTRIBUTING.md — how to contribute
- CLAUDE.md — architecture and development guide
- docs/README.md — complete documentation index
Security
- All inputs validated (coordinates, dates, ranges) before any API call
- Error messages sanitized — no internal details leak to output
- Zero secrets by design: no keys means nothing to steal or misconfigure
- Automated dependency scanning (npm audit + Dependabot), minimal dependency footprint
- Security policy and supported versions: see SECURITY.md
To report a vulnerability, see SECURITY.md.
Documentation
- Examples — realistic sessions in cities around the world: prompt → assistant answer → verbatim server output
- Tool Reference — all 19 tools: parameters, examples, sample output
- Client Setup — step-by-step for 8 MCP clients
- Remote Hosting — run
weather-mcp-httpbehind your own OAuth authorization server - Error Handling — how failures are reported
- Testing Guide — manual testing procedures
- Changelog — version history
- Full documentation index
Contributing
Contributions are welcome — this is a single-maintainer project and issues, PRs, and feedback genuinely help. See CONTRIBUTING.md.
License
MIT — free to use, modify, and distribute.
Weather data provided by NOAA (including the Aviation Weather Center), the US Drought Monitor, USDA NRCS SNOTEL, Open-Meteo, MET Norway, USGS, NIFC, RainViewer, and Blitzortung.org. This project is not affiliated with or endorsed by any of these providers. Do not rely on this server as your sole source for safety-critical decisions — always consult official warnings and forecasts.