@cyanheads/open-meteo-mcp-server

v0.1.2 pre-1.0

Geocode places, fetch global weather forecasts, ERA5 historical climate, marine conditions, air quality, and terrain elevation via MCP. STDIO or Streamable HTTP.

@cyanheads/open-meteo-mcp-server
claude mcp add --transport http open-meteo-mcp-server https://open-meteo.caseyjhand.com/mcp
codex mcp add open-meteo-mcp-server --url https://open-meteo.caseyjhand.com/mcp
{
  "mcpServers": {
    "open-meteo-mcp-server": {
      "url": "https://open-meteo.caseyjhand.com/mcp"
    }
  }
}
gemini mcp add --transport http open-meteo-mcp-server https://open-meteo.caseyjhand.com/mcp
{
  "mcpServers": {
    "open-meteo-mcp-server": {
      "command": "bunx",
      "args": [
        "@cyanheads/open-meteo-mcp-server@latest"
      ]
    }
  }
}
{
  "mcpServers": {
    "open-meteo-mcp-server": {
      "type": "http",
      "url": "https://open-meteo.caseyjhand.com/mcp"
    }
  }
}
curl -X POST https://open-meteo.caseyjhand.com/mcp \
  -H "Content-Type: application/json" \
  -H "MCP-Protocol-Version: 2025-11-25" \
  -d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-11-25","capabilities":{},"clientInfo":{"name":"curl","version":"1.0.0"}}}'

Tools

8

openmeteo_geocode

Resolve a place name to ranked coordinate matches with country, region, elevation, timezone, and population. Required prerequisite for name-based queries — all weather tools take latitude/longitude, not place names. Returns up to 10 matches ranked by population/relevance; use country or admin1 to disambiguate when multiple cities share a name.

read
invocation
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "openmeteo_geocode",
    "arguments": {
      "name": "<name>"
    }
  }
}
schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "minLength": 1,
      "maxLength": 100,
      "description": "Place name to search. Can be a city, region, or landmark (e.g., \"Seattle\", \"Mount Rainier\"). Weather tools require coordinates — use the lat/lon from this result."
    },
    "count": {
      "default": 5,
      "description": "Max results to return (1–10). Default 5. Return more when disambiguating common names like \"Springfield\" or \"Portland\".",
      "type": "integer",
      "minimum": 1,
      "maximum": 10
    },
    "language": {
      "default": "en",
      "description": "Response language for place names (ISO 639-1, e.g., \"en\", \"de\", \"fr\"). Default \"en\".",
      "type": "string"
    }
  },
  "required": [
    "name",
    "count",
    "language"
  ],
  "additionalProperties": false
}
view source ↗

openmeteo_get_elevation

Terrain elevation from the Copernicus Digital Elevation Model (~90m resolution) for one or more coordinate pairs. Accepts up to 100 pairs per call. Useful for geographic context, elevation-adjusted weather interpretation, or route planning.

read
invocation
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "openmeteo_get_elevation",
    "arguments": {
      "latitudes": "<latitudes>",
      "longitudes": "<longitudes>"
    }
  }
}
schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "latitudes": {
      "minItems": 1,
      "maxItems": 100,
      "type": "array",
      "items": {
        "type": "number",
        "minimum": -90,
        "maximum": 90
      },
      "description": "Array of latitudes in decimal degrees (up to 100). Must be same length as longitudes."
    },
    "longitudes": {
      "minItems": 1,
      "maxItems": 100,
      "type": "array",
      "items": {
        "type": "number",
        "minimum": -180,
        "maximum": 180
      },
      "description": "Array of longitudes in decimal degrees (up to 100). Must be same length as latitudes."
    }
  },
  "required": [
    "latitudes",
    "longitudes"
  ],
  "additionalProperties": false
}
view source ↗

openmeteo_get_forecast

Weather forecast for coordinates: hourly and/or daily variables for up to 16 days ahead, with optional past_days (up to 92) for recent history. Use past_days instead of openmeteo_get_historical for dates within the last 1–5 days, since ERA5 has a variable lag. Returns per-timestamp records — each hourly entry contains a "time" field (ISO 8601) plus one key per requested variable; each daily entry contains a "time" field (YYYY-MM-DD) plus requested variables. Common hourly variables: temperature_2m, precipitation, wind_speed_10m, relative_humidity_2m, cloud_cover, uv_index, apparent_temperature, precipitation_probability, weather_code, surface_pressure, visibility, wind_direction_10m, wind_gusts_10m, dew_point_2m. Common daily variables: temperature_2m_max, temperature_2m_min, precipitation_sum, wind_speed_10m_max, sunrise, sunset, uv_index_max, precipitation_hours, weather_code. At least one of hourly_variables or daily_variables is required.

read
invocation
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "openmeteo_get_forecast",
    "arguments": {
      "latitude": "<latitude>",
      "longitude": "<longitude>"
    }
  }
}
schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "latitude": {
      "type": "number",
      "minimum": -90,
      "maximum": 90,
      "description": "Latitude in decimal degrees (e.g., 47.6062 for Seattle). Use openmeteo_geocode to resolve a place name to coordinates."
    },
    "longitude": {
      "type": "number",
      "minimum": -180,
      "maximum": 180,
      "description": "Longitude in decimal degrees (e.g., -122.3321 for Seattle)."
    },
    "hourly_variables": {
      "description": "Hourly variables to fetch (e.g., [\"temperature_2m\", \"precipitation\", \"wind_speed_10m\", \"relative_humidity_2m\", \"cloud_cover\", \"uv_index\", \"apparent_temperature\"]). At least one of hourly_variables or daily_variables is required.",
      "maxItems": 50,
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "daily_variables": {
      "description": "Daily summary variables (e.g., [\"temperature_2m_max\", \"temperature_2m_min\", \"precipitation_sum\", \"wind_speed_10m_max\", \"sunrise\", \"sunset\", \"uv_index_max\"]). At least one of hourly_variables or daily_variables is required.",
      "maxItems": 50,
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "forecast_days": {
      "default": 7,
      "description": "Number of forecast days (1–16). Default 7.",
      "type": "integer",
      "minimum": 1,
      "maximum": 16
    },
    "past_days": {
      "default": 0,
      "description": "Include this many days of past data before today (0–92). Use for recent history — ERA5 archive has a variable ~5-day lag. Default 0.",
      "type": "integer",
      "minimum": 0,
      "maximum": 92
    },
    "temperature_unit": {
      "default": "celsius",
      "description": "Temperature unit. Default \"celsius\".",
      "type": "string",
      "enum": [
        "celsius",
        "fahrenheit"
      ]
    },
    "wind_speed_unit": {
      "default": "kmh",
      "description": "Wind speed unit: \"kmh\" (km/h), \"mph\", \"ms\" (m/s), or \"kn\" (knots). Default \"kmh\".",
      "type": "string",
      "enum": [
        "kmh",
        "mph",
        "ms",
        "kn"
      ]
    },
    "precipitation_unit": {
      "default": "mm",
      "description": "Precipitation unit: \"mm\" or \"inch\". Default \"mm\".",
      "type": "string",
      "enum": [
        "mm",
        "inch"
      ]
    },
    "timezone": {
      "default": "auto",
      "description": "IANA timezone (e.g., \"America/Los_Angeles\") or \"auto\" to use the location's local timezone. Default \"auto\". The timezone from openmeteo_geocode is ideal to pass here.",
      "type": "string"
    }
  },
  "required": [
    "latitude",
    "longitude",
    "forecast_days",
    "past_days",
    "temperature_unit",
    "wind_speed_unit",
    "precipitation_unit",
    "timezone"
  ],
  "additionalProperties": false
}
view source ↗

openmeteo_get_historical

Historical weather from the ERA5 reanalysis archive (1940–present). Requires start_date and end_date (ISO 8601 date, e.g., "2024-07-01"). ERA5 has a variable lag of up to ~5 days — for dates within the last week, use openmeteo_get_forecast with past_days instead. Uses the same variable names as the forecast API for direct comparison. Large date ranges (multi-year hourly) produce thousands of records — these spill to DataCanvas for SQL querying when canvas is enabled. At least one of hourly_variables or daily_variables is required.

read
invocation
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "openmeteo_get_historical",
    "arguments": {
      "latitude": "<latitude>",
      "longitude": "<longitude>",
      "start_date": "<start_date>",
      "end_date": "<end_date>"
    }
  }
}
schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "latitude": {
      "type": "number",
      "minimum": -90,
      "maximum": 90,
      "description": "Latitude in decimal degrees. Use openmeteo_geocode to resolve a place name to coordinates."
    },
    "longitude": {
      "type": "number",
      "minimum": -180,
      "maximum": 180,
      "description": "Longitude in decimal degrees."
    },
    "start_date": {
      "type": "string",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
      "description": "Start date (YYYY-MM-DD, e.g., \"2024-07-01\"). ERA5 covers from 1940-01-01 to approximately 5 days ago."
    },
    "end_date": {
      "type": "string",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
      "description": "End date (YYYY-MM-DD, inclusive). Must be on or after start_date. For dates within the last ~5 days, use openmeteo_get_forecast with past_days instead."
    },
    "hourly_variables": {
      "description": "Hourly ERA5 variables (e.g., [\"temperature_2m\", \"precipitation\", \"wind_speed_10m\", \"relative_humidity_2m\", \"cloud_cover\", \"soil_moisture_0_to_7cm\"]). At least one of hourly_variables or daily_variables required.",
      "maxItems": 50,
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "daily_variables": {
      "description": "Daily summary variables (e.g., [\"temperature_2m_max\", \"temperature_2m_min\", \"precipitation_sum\", \"wind_speed_10m_max\"]). At least one of hourly_variables or daily_variables required.",
      "maxItems": 50,
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "temperature_unit": {
      "default": "celsius",
      "description": "Temperature unit. Default \"celsius\".",
      "type": "string",
      "enum": [
        "celsius",
        "fahrenheit"
      ]
    },
    "wind_speed_unit": {
      "default": "kmh",
      "description": "Wind speed unit. Default \"kmh\".",
      "type": "string",
      "enum": [
        "kmh",
        "mph",
        "ms",
        "kn"
      ]
    },
    "precipitation_unit": {
      "default": "mm",
      "description": "Precipitation unit. Default \"mm\".",
      "type": "string",
      "enum": [
        "mm",
        "inch"
      ]
    },
    "timezone": {
      "default": "auto",
      "description": "IANA timezone or \"auto\". Default \"auto\".",
      "type": "string"
    },
    "canvas_id": {
      "description": "DataCanvas token for multi-year or multi-variable queries. When a query exceeds ~500 records, results spill to this canvas for SQL querying. Omit to create a fresh canvas.",
      "type": "string"
    }
  },
  "required": [
    "latitude",
    "longitude",
    "start_date",
    "end_date",
    "temperature_unit",
    "wind_speed_unit",
    "precipitation_unit",
    "timezone"
  ],
  "additionalProperties": false
}
view source ↗

openmeteo_get_marine

Marine weather forecast for a coastal or ocean coordinate: wave height, wave period, wave direction, wind-wave height, swell height, sea-surface temperature. Forecast horizon up to 7 days. Returns per-timestamp records — each entry contains a "time" field plus one key per requested variable. Best for open-ocean and coastal exposed points — sheltered inland waters return near-zero wave values. Common hourly variables: wave_height, wave_direction, wave_period, wind_wave_height, wind_wave_direction, wind_wave_period, swell_wave_height, swell_wave_direction, swell_wave_period. Common daily: wave_height_max, wave_direction_dominant, wave_period_max. Note: ocean_current_velocity is null for non-open-ocean coordinates.

read
invocation
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "openmeteo_get_marine",
    "arguments": {
      "latitude": "<latitude>",
      "longitude": "<longitude>"
    }
  }
}
schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "latitude": {
      "type": "number",
      "minimum": -90,
      "maximum": 90,
      "description": "Latitude of a coastal or ocean point. Use openmeteo_geocode to resolve a place name. Inland points return near-zero wave values."
    },
    "longitude": {
      "type": "number",
      "minimum": -180,
      "maximum": 180,
      "description": "Longitude in decimal degrees."
    },
    "hourly_variables": {
      "description": "Hourly marine variables (e.g., [\"wave_height\", \"wave_direction\", \"wave_period\", \"wind_wave_height\", \"swell_wave_height\"]). At least one of hourly_variables or daily_variables required.",
      "maxItems": 50,
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "daily_variables": {
      "description": "Daily marine summary variables (e.g., [\"wave_height_max\", \"wave_direction_dominant\", \"wave_period_max\"]). At least one of hourly_variables or daily_variables required.",
      "maxItems": 50,
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "forecast_days": {
      "default": 7,
      "description": "Forecast horizon in days (1–7). Default 7.",
      "type": "integer",
      "minimum": 1,
      "maximum": 7
    },
    "timezone": {
      "default": "auto",
      "description": "IANA timezone or \"auto\". Default \"auto\".",
      "type": "string"
    }
  },
  "required": [
    "latitude",
    "longitude",
    "forecast_days",
    "timezone"
  ],
  "additionalProperties": false
}
view source ↗

openmeteo_get_air_quality

Modeled CAMS (Copernicus Atmosphere Monitoring Service) air quality forecast: PM2.5, PM10, nitrogen dioxide, sulphur dioxide, ozone, carbon monoxide, dust, pollen, and European/US AQI indices. This is modeled grid data, not measured station readings — for measured data, use openaq-mcp-server. Forecast only (no historical archive). Common variables: pm2_5, pm10, carbon_monoxide, nitrogen_dioxide, sulphur_dioxide, ozone, dust, european_aqi, us_aqi, alder_pollen, birch_pollen, grass_pollen, mugwort_pollen, olive_pollen, ragweed_pollen.

read
invocation
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "openmeteo_get_air_quality",
    "arguments": {
      "latitude": "<latitude>",
      "longitude": "<longitude>"
    }
  }
}
schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "latitude": {
      "type": "number",
      "minimum": -90,
      "maximum": 90,
      "description": "Latitude in decimal degrees. Use openmeteo_geocode to resolve a place name."
    },
    "longitude": {
      "type": "number",
      "minimum": -180,
      "maximum": 180,
      "description": "Longitude in decimal degrees."
    },
    "hourly_variables": {
      "description": "Hourly air quality variables (e.g., [\"pm2_5\", \"pm10\", \"ozone\", \"nitrogen_dioxide\", \"european_aqi\", \"us_aqi\"]). At least one required.",
      "maxItems": 50,
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "forecast_days": {
      "default": 5,
      "description": "Forecast horizon in days (1–7). Default 5.",
      "type": "integer",
      "minimum": 1,
      "maximum": 7
    },
    "timezone": {
      "default": "auto",
      "description": "IANA timezone or \"auto\". Default \"auto\".",
      "type": "string"
    }
  },
  "required": [
    "latitude",
    "longitude",
    "forecast_days",
    "timezone"
  ],
  "additionalProperties": false
}
view source ↗

openmeteo_dataframe_query

Run a read-only SQL SELECT against tables staged on a DataCanvas by openmeteo_get_historical. Pass the canvas_id returned when openmeteo_get_historical spills (truncated: true). Tables are named by the spillover helper (e.g. spilled_<id>); use openmeteo_dataframe_describe to list available tables and their columns before querying.

read
invocation
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "openmeteo_dataframe_query",
    "arguments": {
      "canvas_id": "<canvas_id>",
      "sql": "<sql>"
    }
  }
}
schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "canvas_id": {
      "type": "string",
      "description": "Canvas ID returned by openmeteo_get_historical when truncated: true."
    },
    "sql": {
      "type": "string",
      "description": "Read-only SELECT statement. Reference table names from openmeteo_dataframe_describe. Example: SELECT AVG(temperature_2m) AS avg_temp, strftime(time, '%Y-%m') AS month FROM spilled_abc123 GROUP BY month ORDER BY month"
    }
  },
  "required": [
    "canvas_id",
    "sql"
  ],
  "additionalProperties": false
}
view source ↗

openmeteo_dataframe_describe

List the tables and their columns on a DataCanvas staged by openmeteo_get_historical. Call this first to discover table names before querying with openmeteo_dataframe_query.

read
invocation
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "openmeteo_dataframe_describe",
    "arguments": {
      "canvas_id": "<canvas_id>"
    }
  }
}
schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "canvas_id": {
      "type": "string",
      "description": "Canvas ID returned by openmeteo_get_historical when truncated: true."
    }
  },
  "required": [
    "canvas_id"
  ],
  "additionalProperties": false
}
view source ↗