About open-meteo-mcp-server
open-meteo-mcp-server is an MCP server for retrieving global weather and environmental data, aimed at clients that need forecasts, historical records, and location lookup. It also supports querying staged results with read-only SQL.
Key features
- 01Place-name geocoding
- 02Forecasts and historical climate
- 03Marine and air-quality data
- 04Elevation, ensemble, flood, and climate data
- 05Read-only SQL on staged results
Use cases
- 01Retrieve forecasts for a named place
- 02Review historical weather since 1940
- 03Check marine conditions or air quality
- 04Query staged weather results with SQL
MCP support
Exposes 12 weather, geocoding, elevation, and dataframe tools to MCP clients. Supports STDIO and Streamable HTTP, with a public hosted server.
Configuration
Remote servers need no local install. Pick your client, then copy the config or install in one click.
https://open-meteo.caseyjhand.com/mcpclaude mcp add --transport http cyanheads-open-meteo https://open-meteo.caseyjhand.com/mcp{"mcpServers":{"cyanheads-open-meteo":{"type":"http","url":"https://open-meteo.caseyjhand.com/mcp"}}}Open in Cursor{"servers":{"cyanheads-open-meteo":{"type":"http","url":"https://open-meteo.caseyjhand.com/mcp"}}}Open in VS Code{"mcpServers":{"cyanheads-open-meteo":{"type":"http","url":"https://open-meteo.caseyjhand.com/mcp"}}}{"mcpServers":{"cyanheads-open-meteo":{"serverUrl":"https://open-meteo.caseyjhand.com/mcp"}}}Run commands in a terminal; paste JSON into the client’s MCP config and restart. Servers that need sign-in will prompt on first connect.
Tools
11| Parameter | Type | Required | Description |
|---|---|---|---|
| name | string | Yes | Place name to search — a bare city, region, or landmark ("Seattle", "Mount Rainier"). Do not fold in a region or country qualifier ("Baoding", not "Baoding Hebei"); use the country input to disambiguate. A one- or two-character native-script name ("서울", "大阪") needs the full administrative name ("서울특별시", "大阪市") or the romanized name ("Seoul", "Osaka") — see the language field. Weather tools require coordinates — use the lat/lon from this result. |
| count | integer | No | Max results to return (1–10). Default 5. Return more when disambiguating common names like "Springfield" or "Portland". |
| country | string | No | ISO 3166-1 alpha-2 country code (e.g. "US", "FR") to disambiguate places that share a name. Omit for a global search. |
| language | string | No | Language for matching and returning place names (ISO 639-1, e.g., "en", "de", "zh"). The API matches name against the localized index for this language, so set it to match the script of name — e.g. language "zh" for "上海", "ru" for "Москва". This resolves a native-script name of three or more characters, which is matched by normalized prefix; a one- or two-character name must equal an index entry exactly, so setting language alone will not find "서울" or "大阪" — retry those with the full administrative name ("서울특별시", "大阪市") or the romanized name ("Seoul", "Osaka"). Default "en"; a query in a recognized non-Latin script (CJK, Hangul, Cyrillic, Arabic, Greek, Hebrew, Thai, Devanagari) that misses under "en" is retried once with the language inferred from its script, and effective_language on the response names that language when the retry supplied the results. |
Details
From the project README@cyanheads/open-meteo-mcp-server
Geocode places, fetch global weather forecasts, historical climate, marine conditions, air quality, and terrain elevation via MCP. STDIO or Streamable HTTP.
Public Hosted Server: https://open-meteo.caseyjhand.com/mcp
Overview
Global weather from Open-Meteo: forecasts, history back to 1940, marine conditions, air quality, probabilistic ensembles, river discharge, and climate projections. Look up any place by name, pull hourly and daily variables, and run SQL over large results. No API key required.
Tools
| Tool | Description |
|---|---|
openmeteo_search_locations | Resolve a place name to ranked coordinates with country, region, timezone, and population |
openmeteo_get_forecast | Current conditions and hourly/daily forecast up to 16 days, with up to 92 past days, from best match or chosen models side by side |
openmeteo_get_historical | Hourly/daily history from the reanalysis archive, 1940 to present |
openmeteo_get_marine | Wave, swell, and sea-surface conditions: current, up to 8 forecast days, or an archive range, in metric or imperial units |
openmeteo_get_air_quality | Modeled CAMS pollutants, pollen, and AQI: current, up to 7 forecast days, or an archive range |
openmeteo_get_elevation | Copernicus DEM terrain elevation: up to 1,000 coordinate pairs, the first 100 sampled per call with the rest reported for resubmission |
openmeteo_get_ensemble | Per-member ensemble forecast (up to 64 members, up to 35 days) for exceedance and uncertainty |
openmeteo_get_flood | GloFAS river discharge: a ~6-month forecast or a date range from 1984, from seamless or chosen v4 models |
openmeteo_get_climate | Bias-corrected daily CMIP6 projections, 1950–2050, across up to 7 models |
openmeteo_dataframe_describe | List the tables and columns staged on a DataCanvas |
openmeteo_dataframe_query | Run a read-only SQL SELECT against staged tables |
openmeteo_dataframe_drop | Remove one staged table or view from a DataCanvas (opt-in) |
Capability reference
openmeteo_search_locations tool
- A bare place
name("Paris", not "Paris, France"), with optionalcountry(ISO 3166-1 alpha-2) andlanguage(defaulten);count1–10, default 5 - Each result carries coordinates, an IANA
timezone,country/country_code,admin1/admin2,population, andfeature_code; no match fails asno_results - A
noticeflags a top match with null or sub-100,000 population, which often means a historic exonym ("Bangalore", "Calcutta") - A native-script query that misses under
enis retried once in the language its script implies;effective_languagenames it when the retry succeeds (上海→zh), and results come back localized
openmeteo_get_forecast tool
- At least one of
current_variables,hourly_variables, ordaily_variables(up to 50 each);forecast_days1–16 (default 7),past_days0–92 (default 0) - Per-timestamp
hourly/dailyrecords withhourly_units/daily_units;current_variablesadds acurrentobject from 15-minute data (interval900) pluscurrent_units - Omitting
modelsreads Open-Meteobest_match;modelscompares deterministic models (e.g.ncep_gfs_seamless,ecmwf_ifs025,dwd_icon_seamless; older spellings likegfs_seamlessstill resolve). With 2+ models each hourly and daily column carries a model-name suffix, andmodelsis echoed.current_variablestakes at most one model (current_multi_model) - A regional model with no data at the point is dropped from a multi-model response: the
noticenames it, or, when one model is left with unsuffixed columns, says the values cannot be attributed to a model; when every requested model misses, the call fails ascoverage_gap - Prefer
past_daysoveropenmeteo_get_historicalfor the last ~5 days, where the archive's ERA5 components lag
openmeteo_get_historical tool
start_dateandend_daterequired (YYYY-MM-DD, from 1940-01-01), plus at least one ofhourly_variables/daily_variables, named as on the forecast tool- Omitting
modelsreads Best Match (IFS HRES + ERA5 + ERA5-Land, source varies by date); up to 8modelspin a source. The ERA5 family runs ~5 days behind,ecmwf_ifshas no delay, andcerracovers Europe only - Output echoes
modelsand the returneddate_range; with 2+ models each column carries a model-name suffix. A model with no data at the point (cerraoutside Europe) is dropped from a multi-model response; thenoticenames it, or, when one model is left with unsuffixed columns (era5,cerra), says the values cannot be attributed to a model
openmeteo_get_marine tool
- One window per call:
forecast_days1–8 (upstream default 7) withpast_days0–92, or astart_date/end_datearchive range back to at least 2022. Mixing them fails asforecast_window_conflict, a lone date asdate_range_incomplete - At least one of
current_variables,hourly_variables, ordaily_variables(wave height, period, and direction, swell, sea-surface temperature); sheltered water returns near-zero waves, a land point returns nulls (named in thenotice), andocean_current_velocityis null off the open ocean current_variablestakes the hourly names and adds acurrentobject from 15-minute data (interval900) pluscurrent_units, alongside either window; a daily name there fails asvariable_wrong_cadencelength_unit(metric/imperial) sets every height,sea_level_height_mslincluded, in m or ft;wind_speed_unit(kmh,mph,ms,kn) setsocean_current_velocity;temperature_unit(celsius/fahrenheit) setssea_surface_temperature. Open-Meteo converts the values, and the*_unitsmaps label them (mphreadsmp/h)
openmeteo_get_air_quality tool
- One window per call:
forecast_days1–7 (upstream default 5) withpast_days0–92, or astart_date/end_datearchive range from August 2022 (us_aqistarts a day later). Sameforecast_window_conflictanddate_range_incompleterejections as the marine tool - At least one of
current_variables(acurrentobject,interval3600) orhourly_variables: PM2.5, PM10, NO2, SO2, O3, CO, dust, pollen, European and US AQI. Pollen is modeled for Europe only, in pollen season; elsewhere it comes back null and thenoticenames it data_source: "CAMS"marks every response as modeled grid data, not station measurements
openmeteo_get_elevation tool
- Parallel
latitudes[]/longitudes[]arrays of up to 1,000 pairs; unequal lengths fail ascoordinate_count_mismatch, compared on the full arrays - Samples the first 100 pairs (the Elevation API's per-request limit) in one upstream request;
unprocessed_countsays how many were left andnext_offsetis where to resume — resubmitlatitudes.slice(next_offset)andlongitudes.slice(next_offset)untilnext_offsetisnull. A call of 100 or fewer returns0/null. Each sampled pair counts as one call against Open-Meteo's per-IP limits (600 a minute), so a seventh 100-pair slice inside one minute comes backrate_limited elevations[]in input order, each{ latitude, longitude, elevation_m }from the Copernicus DEM (~90 m);elevation_misnullwhere the DEM has no value (latitude 90), without failing the rest of the call
openmeteo_get_ensemble tool
- At least one of
hourly_variables/daily_variables;forecast_days1–35 (default 7),past_days0–92. Most models end within 16 days (ncep_gefs05runs to about day 34); past that, columns are null and thenoticesays where data ends modelstakes one ensemble name (e.g.ecmwf_ifs025_ensemble, 51 members;gem_global_ensemble, 21); omitted or blank selectsecmwf_ifs025_ensemble, echoed inmodel- Each variable returns per-member columns (
temperature_2m_member01, …) across up to 64 members;member_countexcludes the control run. A regional model queried outside its coverage fails as a non-retryable input error; switch to a global model
openmeteo_get_flood tool
daily_variablesrequired (up to 20), all in m³/s:river_dischargeplus the statisticsriver_discharge_mean/_median/_min/_max/_p25/_p75, which carry ensemble spread on forecast-run days and repeatriver_dischargeon reanalysis days- One mode per call:
forecast_days1–210 (the current GloFAS run reaches about six months; later days are null), or astart_date/end_daterange from 1984-01-01. Mixing them fails asforecast_days_conflict, a lone date asdate_range_incomplete - Omitting
modelsreadsseamless_v4:consolidated_v4reanalysis before 2023-08-05,forecast_v4runs from then on.models: ["consolidated_v4"]reads the reanalysis through 2025-05-31 (null after, and onforecast_days);forecast_v4starts 2023-06-01. Output echoesmodels; with 2+ models each column carries a model-name suffix, and thenoticenames null spans - Discharge comes from the largest modeled river within 5 km, not always the closest; vary the coordinate by ~0.1° when a value looks off. Null outside GloFAS coverage
openmeteo_get_climate tool
start_date/end_datewithin 1950-01-01 to 2050-12-31 anddaily_variablesrequired (the API is daily-only); up to 7 CMIP6models, e.g.CMCC_CM2_VHR4,MRI_AGCM3_2_S- With 2+ models each variable is suffixed with the model name; a single or omitted model returns plain names. A variable a model doesn't carry comes back null
openmeteo_dataframe_describe tool
- Takes the
canvas_ida spilled weather tool returned; lists each table'sname,kind,row_count, and columns (name, type, nullability), plus the canvasexpires_at - Fails as
canvas_not_enabledwhen canvas is off, orcanvas_not_foundwhen the ID is unknown or past its 24-hour sliding TTL
openmeteo_dataframe_query tool
canvas_idplus a read-onlySELECTagainst the stagedtable_name;rowsholds up to 100 rows, fewer when wide rows would pass the 80,000-character inline ceiling (values are never cut).row_countis the exact total; page withOFFSET <rows.length>under anORDER BY- If the count fails or runs past 5 seconds, rows still return,
row_countis a lower bound, andcount_errornames the reason (e.g.count_timeout) - Fails as
canvas_not_enabled,canvas_not_found,missing_table,system_catalog_access(system catalogs are blocked), orrow_too_large(the first row alone exceeds the ceiling: select fewer columns, or shorten values withleft(),substr(), orlist_slice())
openmeteo_dataframe_drop tool
- Off by default: listed as disabled until
OPENMETEO_DATAFRAME_DROP_ENABLED=true canvas_idplus the exacttable_namefromopenmeteo_dataframe_describe; removes that one table or view and returnsdroppedand theremaining_tables. A name that is not staged returnsdropped: false, so a repeated drop is safe- Fails as
canvas_not_enabled,canvas_not_found, orinvalid_table_name(not a plain SQL identifier, or a reserved keyword)
Features
Built on @cyanheads/mcp-ts-core: stdio and Streamable HTTP transports, pluggable auth (none / jwt / oauth), swappable storage (in-memory, filesystem, Supabase, Cloudflare KV/R2/D1), structured logging with optional OpenTelemetry tracing.
Open-Meteo-specific:
- No API key for non-commercial use; commercial use requires Open-Meteo's paid API tier
- Columnar API responses reshaped into per-timestamp records with
*_unitsmaps, on the same variable names across forecast and archive - DataCanvas spillover on the seven weather tools: with
CANVAS_PROVIDER_TYPE=duckdb(the default) an over-budget result is staged as a DuckDB table (response carriescanvas_id,table_name,truncated: true); withnoneit returns a bounded preview andtruncated: true modelson the forecast, historical, ensemble, climate, and flood tools is not an allowlist, so a model Open-Meteo adds later works without a server update
Agent-friendly output:
- Location-first workflow:
openmeteo_search_locationsreturns the IANAtimezonealongside coordinates, ready for any weather tool'stimezoneinput (defaultauto) - Typed rejections:
variable_wrong_cadence(names the correct field),request_too_large(names the inputs to narrow),coverage_gap(a coordinate outside the dataset's grid or the model's domain), andrate_limited; onlyToo many concurrent requestsis retried first. An outage that outlasts three attempts fails asupstream_unavailable, orupstream_timeoutwhen the last attempt timed out - Request URLs never appear in error data or client-visible logs
- One
noticeper response for what the data alone won't show: unserved variable names, nulls outside a dataset's coverage, and where spilled rows went
Getting started
Public Hosted Instance
A public instance is available at https://open-meteo.caseyjhand.com/mcp — no installation required. Point any MCP client at it via Streamable HTTP:
{
"mcpServers": {
"open-meteo-mcp-server": {
"type": "streamable-http",
"url": "https://open-meteo.caseyjhand.com/mcp"
}
}
}
Self-Hosted / Local
Add the following to your MCP client configuration file.
{
"mcpServers": {
"open-meteo-mcp-server": {
"type": "stdio",
"command": "bunx",
"args": ["@cyanheads/open-meteo-mcp-server@latest"],
"env": {
"MCP_TRANSPORT_TYPE": "stdio",
"MCP_LOG_LEVEL": "info"
}
}
}
}
Or with npx (no Bun required):
{
"mcpServers": {
"open-meteo-mcp-server": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@cyanheads/open-meteo-mcp-server@latest"],
"env": {
"MCP_TRANSPORT_TYPE": "stdio",
"MCP_LOG_LEVEL": "info"
}
}
}
}
Or with Docker:
{
"mcpServers": {
"open-meteo-mcp-server": {
"type": "stdio",
"command": "docker",
"args": ["run", "-i", "--rm", "-e", "MCP_TRANSPORT_TYPE=stdio", "ghcr.io/cyanheads/open-meteo-mcp-server:latest"]
}
}
}
For Streamable HTTP, set the transport and start the server:
MCP_TRANSPORT_TYPE=http MCP_HTTP_PORT=3010 bun run start:http
# Server listens at http://localhost:3010/mcp
Prerequisites
- Bun v1.4.0 or higher (or Node.js v24+).
- No API key required. Non-commercial use is free and keyless.
- Commercial use requires Open-Meteo's paid API tier.
Installation
- Clone the repository:
git clone https://github.com/cyanheads/open-meteo-mcp-server.git
- Navigate into the directory:
cd open-meteo-mcp-server
- Install dependencies:
bun install
Configuration
Every variable is optional.
| Variable | Description | Default |
|---|---|---|
OPEN_METEO_API_BASE_URL | Forecast and elevation API base URL. | https://api.open-meteo.com |
OPEN_METEO_ARCHIVE_BASE_URL | Historical archive API base URL. | https://archive-api.open-meteo.com |
OPEN_METEO_MARINE_BASE_URL | Marine API base URL. | https://marine-api.open-meteo.com |
OPEN_METEO_AIR_QUALITY_BASE_URL | CAMS air quality API base URL. | https://air-quality-api.open-meteo.com |
OPEN_METEO_GEOCODING_BASE_URL | Geocoding API base URL. | https://geocoding-api.open-meteo.com |
OPEN_METEO_ENSEMBLE_BASE_URL | Ensemble API base URL. | https://ensemble-api.open-meteo.com |
OPEN_METEO_FLOOD_BASE_URL | GloFAS flood API base URL. | https://flood-api.open-meteo.com |
OPEN_METEO_CLIMATE_BASE_URL | CMIP6 climate API base URL. | https://climate-api.open-meteo.com |
CANVAS_PROVIDER_TYPE | duckdb stages over-budget weather results on a DataCanvas and enables the dataframe tools; none returns a bounded preview. | duckdb |
OPENMETEO_DATAFRAME_DROP_ENABLED | true makes openmeteo_dataframe_drop callable; otherwise it is listed as disabled. | false |
MCP_TRANSPORT_TYPE | Transport: stdio or http. | stdio |
MCP_HTTP_PORT | HTTP server port. | 3010 |
MCP_SESSION_MODE | HTTP session mode: stateless, stateful, or auto. | stateless |
MCP_AUTH_MODE | Authentication: none, jwt, or oauth. | none |
MCP_LOG_LEVEL | Log level (debug, info, notice, warning, error). | info |
LOGS_DIR | Directory for log files (Node.js only). | <project-root>/logs |
STORAGE_PROVIDER_TYPE | Storage backend: in-memory, filesystem, supabase, cloudflare-kv/r2/d1. | in-memory |
OTEL_ENABLED | Enable OpenTelemetry. | false |
See .env.example for the full list of optional overrides.
Running the server
Local development
-
Build and run the production version:
# One-time build bun run rebuild # Run the built server bun run start:http # or bun run start:stdio -
Run checks and tests:
bun run devcheck # Lint, format, typecheck, security bun run test # Vitest test suite
Docker
docker build -t open-meteo-mcp-server .
docker run --rm -p 3010:3010 open-meteo-mcp-server
The Dockerfile defaults to HTTP transport, stateless session mode, and logs to /var/log/open-meteo-mcp-server. OpenTelemetry peer dependencies are installed by default — build with --build-arg OTEL_ENABLED=false to omit them.
Project structure
| Directory | Purpose |
|---|---|
src/index.ts | createApp() entry point — registers tools, initializes the Open-Meteo service and DataCanvas. |
src/config | Server-specific environment variable parsing and validation with Zod. |
src/mcp-server/tools/definitions | Tool definitions (*.tool.ts), one file per tool. |
src/mcp-server/tools | Shared tool helpers — model catalog, cadence validation, columnar reshape, spillover, response notices. |
src/services/open-meteo | HTTP client for the Open-Meteo APIs — retry, error classification, coverage-gap rejection. |
src/services/canvas-accessor.ts | DataCanvas accessor shared by the spill-capable tools. |
tests/ | Unit, integration, fuzz, and smoke tests. |
Development guide
See CLAUDE.md for development guidelines and architectural rules. The short version:
- Handlers throw, framework catches — no
try/catchin tool logic - Use
ctx.logfor request-scoped logging,ctx.statefor tenant-scoped storage - Register new tools in the
tools[]array insrc/index.ts - Wrap external API calls: validate raw → normalize to domain type → return output schema; never fabricate missing fields
Attribution
Weather data by Open-Meteo.com, licensed CC BY 4.0.
Contributing
Issues are welcome. Run checks and tests before submitting:
bun run devcheck
bun run test
License
Apache-2.0 — see LICENSE for details.
Comments
New to MCP?
From what the protocol is to installing your first server, these answers cover most first questions.
An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.