Skip to content

Spencer04Hire/open-meteo-mcp

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Open-Meteo MCP Server (Python)

A Model Context Protocol (MCP) server providing access to Open-Meteo weather APIs using the Dedalus MCP framework.

Features

This server provides 17 weather tools:

Main Weather Tools

  • weather_forecast - Get weather forecast data for any location
  • weather_archive - Get historical weather data from ERA5 reanalysis (1940-present)
  • air_quality - Get air quality forecast data (PM2.5, PM10, ozone, etc.)
  • marine_weather - Get marine weather forecast (waves, sea temperature)
  • elevation - Get elevation data for coordinates

Weather Model Tools

  • dwd_icon_forecast - German DWD ICON model
  • gfs_forecast - US NOAA GFS model
  • meteofrance_forecast - French Météo-France models
  • ecmwf_forecast - ECMWF global forecasts
  • jma_forecast - Japan Meteorological Agency
  • metno_forecast - Norwegian weather service
  • gem_forecast - Canadian GEM model

Advanced Weather Tools

  • flood_forecast - River discharge and flood forecasts (GloFAS)
  • seasonal_forecast - Long-range seasonal forecasts (up to 9 months)
  • climate_projection - CMIP6 climate change projections
  • ensemble_forecast - Ensemble forecasts with uncertainty
  • geocoding - Search for locations by name or postal code

Installation

# Using uv (recommended)
uv sync

# Or using pip
pip install -e .

Usage

Running the Server

# Using uv
uv run python src/main.py

# Or directly
cd src && python main.py

The server will start on port 8080 by default.

Configuration

Configure the server using environment variables:

# Server port
PORT=8080

# Custom API URLs (optional - defaults to public Open-Meteo APIs)
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

You can also create a .env file in the project root.

Example Tool Usage

Weather Forecast

{
	"name": "weather_forecast",
	"arguments": {
		"latitude": 48.8566,
		"longitude": 2.3522,
		"hourly": ["temperature_2m", "precipitation", "wind_speed_10m"],
		"daily": ["temperature_2m_max", "temperature_2m_min"],
		"timezone": "Europe/Paris"
	}
}

Geocoding

{
	"name": "geocoding",
	"arguments": {
		"name": "Paris",
		"count": 5,
		"country_code": "FR"
	}
}

Air Quality

{
	"name": "air_quality",
	"arguments": {
		"latitude": 48.8566,
		"longitude": 2.3522,
		"hourly": ["pm10", "pm2_5", "ozone", "nitrogen_dioxide"]
	}
}

Development

# Install dev dependencies
uv sync --group dev

# Run linting
uv run ruff check src/
uv run ruff format src/

# Run tests
uv run pytest

License

MIT License - see LICENSE for details.

Credits

About

MCP server hosting the Open-Meteo API.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%