aemet-mcp
v0.3.3MCP 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.
| Parameter | Type | Description |
|---|---|---|
location * | string | Spanish municipality, either by name (e.g. 'Madrid', 'Logroño', 'A Coruña') or by 5-digit INE code (e.g. '28079'). |
days | integer | Daily forecasts: number of days to include (1-7, default 3). Ignored when granularity='hourly'. |
granularity | string | '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.
| Parameter | Type | Description |
|---|---|---|
area * | string | Spanish autonomous community: name ('Cataluña', 'Madrid', 'La Rioja'), 2-digit AEMET code (61-78), or 'esp' for national. |
language | string | Preferred warning language (default 'es'). 'any' returns the first available. |
minSeverity | string | Only 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.
| Parameter | Type | Description |
|---|---|---|
location * | string | Where 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.
| Parameter | Type | Description |
|---|---|---|
location * | string | Where to look. Accepts a Spanish municipality name ('Madrid'), 5-digit INE code ('28079'), or a decimal coordinate pair ('40.4168,-3.7038'). |
from | string | Start date as YYYY-MM-DD. Required when mode='range'. |
mode | string | 'range' (default) returns observed daily records between `from` and `to`. 'normals' returns the station's long-term monthly averages and ignores the dates. |
to | string | End 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.
| Parameter | Type | Description |
|---|---|---|
location * | string | Beach 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… |
days | integer | Number of days to include (1-3, default 3). AEMET publishes three days per beach. |
municipality | string | Municipality 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…
| Parameter | Type | Description |
|---|---|---|
area * | string | AEMET 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… |
day | number | Which forecast day to read: 0 (today, default) to 3. AEMET rejects day 4 and beyond. Ignored when mode='past'. |
mode | string | '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.
| Parameter | Type | Description |
|---|---|---|
area * | string | Sea 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… |
product | string | Which 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.
| Parameter | Type | Description |
|---|---|---|
location | string | Where 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… |
station | string | Background 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. |