Open Meteo MCP
A comprehensive MCP server providing access to Open-Meteo weather APIs for Large Language Models
Install / Use
/learn @cmer81/Open Meteo MCPQuality Score
Category
Development & EngineeringSupported Platforms
README
Open-Meteo MCP Server
A comprehensive Model Context Protocol (MCP) server that provides access to Open-Meteo weather APIs for use with Large Language Models.
Features
This MCP server provides complete access to Open-Meteo APIs, including:
Core Weather APIs
- Weather Forecast (
weather_forecast) - 7-day forecasts with hourly and daily resolution - Weather Archive (
weather_archive) - Historical ERA5 data from 1940 to present - Air Quality (
air_quality) - PM2.5, PM10, ozone, nitrogen dioxide, pollen, European/US AQI indices, UV index and other pollutants - Marine Weather (
marine_weather) - Wave height, wave period, wave direction and sea surface temperature - Elevation (
elevation) - Digital elevation model data for given coordinates - Geocoding (
geocoding) - Search locations worldwide by name or postal code, get coordinates and detailed location information
Specialized Weather Models
- DWD ICON (
dwd_icon_forecast) - German weather service high-resolution model for Europe - NOAA GFS (
gfs_forecast) - US weather service global model with high-resolution North America data - Météo-France (
meteofrance_forecast) - French weather service AROME and ARPEGE models - ECMWF (
ecmwf_forecast) - European Centre for Medium-Range Weather Forecasts - JMA (
jma_forecast) - Japan Meteorological Agency high-resolution model for Asia - MET Norway (
metno_forecast) - Norwegian weather service for Nordic countries - Environment Canada GEM (
gem_forecast) - Canadian weather service model
Advanced Forecasting Tools
- Flood Forecast (
flood_forecast) - River discharge and flood forecasts from GloFAS (Global Flood Awareness System) - Seasonal Forecast (
seasonal_forecast) - Long-range forecasts up to 9 months ahead - Climate Projections (
climate_projection) - CMIP6 climate change projections for different warming scenarios - Ensemble Forecast (
ensemble_forecast) - Multiple model runs showing forecast uncertainty
Installation
Requirements
- Node.js >= 22.0.0
Method 1: Using npx (Recommended)
No installation required! The server will run directly via npx.
Method 2: Global Installation via npm
npm install -g open-meteo-mcp-server
Method 3: From Source (Development)
# Clone the repository
git clone https://github.com/cmer81/open-meteo-mcp.git
cd open-meteo-mcp
# Install dependencies
npm install
# Build the project
npm run build
Configuration
Claude Desktop Configuration
Simple Configuration (Recommended)
Add the following configuration to your Claude Desktop config file:
{
"mcpServers": {
"open-meteo": {
"command": "npx",
"args": ["-y", "-p", "open-meteo-mcp-server", "open-meteo-mcp-server"]
}
}
}
Full Configuration (with environment variables)
{
"mcpServers": {
"open-meteo": {
"command": "npx",
"args": ["-y", "-p", "open-meteo-mcp-server", "open-meteo-mcp-server"],
"env": {
"OPEN_METEO_API_URL": "https://api.open-meteo.com",
"OPEN_METEO_AIR_QUALITY_API_URL": "https://air-quality-api.open-meteo.com",
"OPEN_METEO_MARINE_API_URL": "https://marine-api.open-meteo.com",
"OPEN_METEO_ARCHIVE_API_URL": "https://archive-api.open-meteo.com",
"OPEN_METEO_SEASONAL_API_URL": "https://seasonal-api.open-meteo.com",
"OPEN_METEO_ENSEMBLE_API_URL": "https://ensemble-api.open-meteo.com",
"OPEN_METEO_GEOCODING_API_URL": "https://geocoding-api.open-meteo.com",
"OPEN_METEO_FLOOD_API_URL": "https://flood-api.open-meteo.com",
"OPEN_METEO_CLIMATE_API_URL": "https://climate-api.open-meteo.com"
}
}
}
}
Local Development Configuration
If you're developing locally or installed from source:
{
"mcpServers": {
"open-meteo": {
"command": "node",
"args": ["/path/to/open-meteo-mcp/dist/index.js"],
"env": {
"OPEN_METEO_API_URL": "https://api.open-meteo.com",
"OPEN_METEO_AIR_QUALITY_API_URL": "https://air-quality-api.open-meteo.com",
"OPEN_METEO_MARINE_API_URL": "https://marine-api.open-meteo.com",
"OPEN_METEO_ARCHIVE_API_URL": "https://archive-api.open-meteo.com",
"OPEN_METEO_SEASONAL_API_URL": "https://seasonal-api.open-meteo.com",
"OPEN_METEO_ENSEMBLE_API_URL": "https://ensemble-api.open-meteo.com",
"OPEN_METEO_GEOCODING_API_URL": "https://geocoding-api.open-meteo.com",
"OPEN_METEO_FLOOD_API_URL": "https://flood-api.open-meteo.com",
"OPEN_METEO_CLIMATE_API_URL": "https://climate-api.open-meteo.com"
}
}
}
}
Custom Instance Configuration
If you're using your own Open-Meteo instance:
{
"mcpServers": {
"open-meteo": {
"command": "npx",
"args": ["-y", "-p", "open-meteo-mcp-server", "open-meteo-mcp-server"],
"env": {
"OPEN_METEO_API_URL": "https://your-meteo-api.example.com",
"OPEN_METEO_AIR_QUALITY_API_URL": "https://air-quality-api.example.com",
"OPEN_METEO_MARINE_API_URL": "https://marine-api.example.com",
"OPEN_METEO_ARCHIVE_API_URL": "https://archive-api.example.com",
"OPEN_METEO_SEASONAL_API_URL": "https://seasonal-api.example.com",
"OPEN_METEO_ENSEMBLE_API_URL": "https://ensemble-api.example.com",
"OPEN_METEO_GEOCODING_API_URL": "https://geocoding-api.example.com",
"OPEN_METEO_FLOOD_API_URL": "https://flood-api.example.com",
"OPEN_METEO_CLIMATE_API_URL": "https://climate-api.example.com"
}
}
}
}
Streamable HTTP Transport
The server also supports Streamable HTTP transport for remote deployments. Set the TRANSPORT environment variable to http:
TRANSPORT=http PORT=3000 npx open-meteo-mcp-server
This starts an Express server on the specified port (default: 3000) with the MCP endpoint at /mcp. The HTTP transport supports session management with unique session IDs per client.
For production deployments, enable authentication and rate limiting:
API_KEY=your-secret-key RATE_LIMIT_RPM=60 TRANSPORT=http PORT=3000 npx open-meteo-mcp-server
Clients must then include the key in every request:
Authorization: Bearer your-secret-key
# or
X-API-Key: your-secret-key
Using npm scripts
# Start in HTTP mode (production)
npm run start:http
# Development with auto-reload in HTTP mode
npm run dev:http
Docker Deployment
The server can be easily deployed using Docker.
Using Pre-built Image from GitHub Container Registry (Recommended)
Pull and run the official image:
# Pull the latest image
docker pull ghcr.io/cmer81/open-meteo-mcp:latest
# Run the container
docker run -d \
--name open-meteo-mcp \
-p 3000:3000 \
ghcr.io/cmer81/open-meteo-mcp:latest
# Check health
curl http://localhost:3000/health
Available tags:
latest- Latest stable releasev1.x.x- Specific version (e.g.,v1.1.3)1- Latest v1.x.x release1.1- Latest v1.1.x release
Using Docker Compose
The repository includes two Docker Compose configurations:
Production (uses pre-built image):
# Start with pre-built image from GitHub Container Registry
docker compose up -d
# View logs
docker compose logs -f
# Stop the server
docker compose down
Development (builds from source):
# Build and start from local source
docker compose -f docker-compose.dev.yml up -d
# Rebuild after code changes
docker compose -f docker-compose.dev.yml up -d --build
Building from Source
If you prefer to build the image yourself:
# Build the image
npm run docker:build
# or
docker build -t open-meteo-mcp-server .
# Run the container
npm run docker:run
# or
docker run -p 3000:3000 open-meteo-mcp-server
Environment Configuration
Copy .env.example to .env and customize as needed:
cp .env.example .env
# Edit .env with your configuration
Then update docker-compose.yml to use the .env file or pass environment variables directly.
Health Check
The HTTP server includes a health check endpoint:
curl http://localhost:3000/health
# Response: {"status":"ok"}
This endpoint is used by Docker's HEALTHCHECK and can be integrated with container orchestration platforms (Kubernetes, Docker Swarm, etc.).
Environment Variables
All environment variables are optional and have sensible defaults:
OPEN_METEO_API_URL- Base URL for Open-Meteo forecast API (default: https://api.open-meteo.com)OPEN_METEO_AIR_QUALITY_API_URL- Air quality API URL (default: https://air-quality-api.open-meteo.com)OPEN_METEO_MARINE_API_URL- Marine weather API URL (default: https://marine-api.open-meteo.com)OPEN_METEO_ARCHIVE_API_URL- Historical data API URL (default: https://archive-api.open-meteo.com)OPEN_METEO_SEASONAL_API_URL- Seasonal forecast API URL (default: https://seasonal-api.open-meteo.com)OPEN_METEO_ENSEMBLE_API_URL- Ensemble forecast API URL (default: https://ensemble-api.open-meteo.com)OPEN_METEO_GEOCODING_API_URL- Geocoding API URL (default: https://geocoding-api.open-meteo.com)OPEN_METEO_FLOOD_API_URL- Flood forecast API URL (default: https://flood-api.open-meteo.com)OPEN_METEO_CLIMATE_API_URL- Climate projection API URL (default: https://climate-api.open-meteo.com)TRANSPORT- Transport mode:httpfor Streamable HTTP, omit for stdio (default: stdio)PORT- HTTP server port when using H
