aemet-mcp

v0.3.3
io.github.jocarrd/aemet-mcp Checked 1 day ago Published 1 month ago

MCP server for AEMET: Spain's official forecasts, warnings, observations and climate data.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

get_forecast Weather forecast for a Spanish municipality

Returns the AEMET forecast for any of Spain's 8000+ municipalities. Accepts a name (with or without accents) or INE code. Daily granularity returns temperature min/max, sky state, precipitation probability and wind for each day. Hourly returns the next ~40h.

ParameterTypeDescription
location *stringSpanish municipality, either by name (e.g. 'Madrid', 'Logroño', 'A Coruña') or by 5-digit INE code (e.g. '28079').
daysintegerDaily forecasts: number of days to include (1-7, default 3). Ignored when granularity='hourly'.
granularitystring'daily' (default) summarises up to 7 days. 'hourly' returns hour-by-hour values for the next ~40 hours.

get_warnings Active CAP weather warnings for a Spanish region

Returns the most recent CAP (Common Alerting Protocol) weather warnings issued by AEMET for the given autonomous community, or for the whole country ('esp'). Severity follows the CAP standard: Minor, Moderate, Severe, Extreme.

ParameterTypeDescription
area *stringSpanish autonomous community: name ('Cataluña', 'Madrid', 'La Rioja'), 2-digit AEMET code (61-78), or 'esp' for national.
languagestringPreferred warning language (default 'es'). 'any' returns the first available.
minSeveritystringOnly return warnings at or above this severity.

get_nearest_observation Latest real-time observation from the nearest AEMET weather station

Finds the AEMET weather station closest to the requested location and returns its most recent reading (temperature, humidity, wind, precipitation, pressure). Useful for 'what's the weather right now' style questions.

ParameterTypeDescription
location *stringWhere to observe. Accepts a Spanish municipality name ('Madrid'), 5-digit INE code ('28079'), or a decimal coordinate pair ('40.4168,-3.7038').

get_climate_history Historical climate records from the nearest AEMET climatological station

Finds the AEMET climatological station closest to the requested location and returns its measured history. mode='range' returns daily records (temperature, precipitation, wind, humidity, sunshine) between two dates; AEMET serves at most 6 months (186 days) per call, so longer histories need several calls. Ranges longer than 31 days are condensed into one line per month (mean max/min, total precipitation, rainy days, extremes) instead of one line per day. mode='normals' returns the station's long-term monthly averages. Use this for past weather and climate questions, not for forecasts.

ParameterTypeDescription
location *stringWhere to look. Accepts a Spanish municipality name ('Madrid'), 5-digit INE code ('28079'), or a decimal coordinate pair ('40.4168,-3.7038').
fromstringStart date as YYYY-MM-DD. Required when mode='range'.
modestring'range' (default) returns observed daily records between `from` and `to`. 'normals' returns the station's long-term monthly averages and ignores the dates.
tostringEnd date as YYYY-MM-DD. Defaults to today when mode='range'.

get_beach_forecast Beach forecast for a Spanish beach

Returns the AEMET beach forecast for the next three days: sky, wind and waves for morning and afternoon, plus maximum temperature, water temperature, thermal sensation and maximum UV index. Covers the 591 beaches AEMET forecasts during the bathing season. Accepts a beach name (accents optional), optionally narrowed by municipality, or the 7-digit AEMET beach code.

ParameterTypeDescription
location *stringBeach name, with or without accents ('La Concha', 'Sant Joan', 'Playa de las Canteras'). Add the municipality after a comma when the name repeats ('La Concha, Suances'), or pass the 7-digit AEMET beac…
daysintegerNumber of days to include (1-3, default 3). AEMET publishes three days per beach.
municipalitystringMunicipality or province used to disambiguate beaches that share a name ('Suances', 'Cantabria').

get_mountain_forecast Mountain bulletin for a Spanish mountain area

Returns the AEMET mountain bulletin for one of Spain's nine mountain areas (Picos de Europa, the three Pyrenean areas, the two Iberian System areas, Guadarrama and Somosierra, Sierra de Gredos, Sierra Nevada). Written for mountaineers and skiers: sky state, precipitation, storms, temperature and wind as forecaster prose, plus the freezing and -10 °C levels, free-atmosphere winds at 1500 and 3000 m, and minimum and maximum temperatures with thermal sensation at named refuges, passes and resorts. mode='forecast' covers today (day 0) to day 3; mode='past' summarises the last 24 hours. These bull…

ParameterTypeDescription
area *stringAEMET mountain area, by name ('Picos de Europa', 'Pirineo Aragonés', 'Sierra Nevada', 'Guadarrama', 'Gredos', 'Moncayo') or by code ('peu1', 'nav1', 'arn1', 'cat1', 'rio1', 'arn2', 'mad2', 'gre1', 'n…
daynumberWhich forecast day to read: 0 (today, default) to 3. AEMET rejects day 4 and beyond. Ignored when mode='past'.
modestring'forecast' (default) returns the bulletin for the requested day. 'past' returns AEMET's summary of the last 24 hours and ignores `day`.

get_maritime_forecast Maritime forecast for Spanish coastal waters and high seas

Returns the AEMET maritime bulletin for a sea area: sea state, wind, visibility, warnings and the validity period. Two products are covered: coastal waters (8 bulletins, one per stretch of the Spanish coast, each split into per-province zones and carrying the marine warnings) and high seas (3 bulletins covering the Atlantic north of 30N, the Atlantic south of 35N and the Mediterranean). Areas can be named the way people and the media name them, or given as AEMET codes.

ParameterTypeDescription
area *stringSea area to forecast. Accepts the name people use ('Cantábrico', 'Golfo de Cádiz', 'Baleares', 'Canarias', 'Mediterráneo', 'Atlántico'), a coastal community or province ('Asturias', 'Málaga', 'Gi…
productstringWhich AEMET product to read. 'coastal' covers Spanish coastal waters out to a few miles and carries warnings; 'high_seas' covers the open Atlantic and Mediterranean zones. Omit to pick the one that ma…

get_air_quality Background air pollution at an AEMET EMEP/VAG rural station

Returns the latest reading of AEMET's background pollution network (EMEP/VAG/CAMP): 13 rural reference stations that measure the regional baseline of O3, NO, NO2, SO2 and PM10, plus temperature, humidity, pressure, wind, radiation and precipitation. This is BACKGROUND pollution, measured far from towns and roads on purpose. It does NOT answer 'how is the air in Madrid/Barcelona today': urban air quality is measured by the city and regional networks, not by AEMET, and this tool must not be used as a proxy for it.

ParameterTypeDescription
locationstringWhere to look from, when the station is unknown: a Spanish municipality name ('Madrid'), a 5-digit INE code ('28079') or a decimal coordinate pair ('40.4168,-3.7038'). The nearest background station i…
stationstringBackground station, by name ('Campisábalos', 'Doñana', 'Els Torms') or by its 2-digit AEMET code ('09'). Takes precedence over 'location' when both are given.