A Model Context Protocol (MCP) server that provides weather information using the Open-Meteo API.
6.8K
A Model Context Protocol (MCP) server that provides weather information using the Open-Meteo API. This server supports multiple transport modes: standard stdio, HTTP Server-Sent Events (SSE), and the new Streamable HTTP protocol for web-based integration.
This MCP server supports stdio, SSE, and streamable-http modes in a single unified server:
| Feature | stdio | SSE | streamable-http |
|---|---|---|---|
| Use Case | Desktop MCP clients | Web applications (legacy) | Web applications (modern) |
| Protocol | Standard I/O streams | Server-Sent Events | MCP Streamable HTTP |
| Session Management | N/A | Stateful | Stateful or Stateless |
| Endpoints | N/A | /sse, /messages/ | /mcp (single) |
| Best For | Claude Desktop, Cline | Browser-based apps | Modern web apps, APIs |
| State Options | N/A | Stateful only | Stateful or Stateless |
This server does not require an API key. It uses the Open-Meteo API, which is free and open-source.
This server provides several tools for weather and time-related operations:
get_current_weather - Get current weather for a city with comprehensive metricsget_weather_by_datetime_range - Get weather data for a date range with hourly detailsget_weather_details - Get detailed weather information as structured JSON dataget_air_quality - Get air quality information with pollutant levels and health adviceget_air_quality_details - Get detailed air quality data as structured JSONget_current_datetime - Get current time in any timezoneget_timezone_info - Get timezone informationconvert_time - Convert time between timezonesget_current_weatherRetrieves comprehensive current weather information for a given city with enhanced metrics.
Parameters:
city (string, required): The name of the city (English names only)Returns: Detailed weather data including:
Example Response:
The weather in Tokyo is Mainly clear with a temperature of 22.5°C (feels like 21.0°C),
relative humidity at 65%, and dew point at 15.5°C. Wind is blowing from the NE at 12.5 km/h
with gusts up to 18.5 km/h. Atmospheric pressure is 1013.2 hPa with 25% cloud cover.
UV index is 5.5 (Moderate). Visibility is 10.0 km.
get_weather_by_datetime_rangeRetrieves hourly weather information with comprehensive metrics for a specified city between start and end dates.
Parameters:
city (string, required): The name of the city (English names only)start_date (string, required): Start date in format YYYY-MM-DD (ISO 8601)end_date (string, required): End date in format YYYY-MM-DD (ISO 8601)Returns: Comprehensive weather analysis including:
Example Response:
[Analysis of weather trends over 2024-01-01 to 2024-01-07]
- Temperature ranges from 5°C to 15°C
- Precipitation expected on Jan 3rd and 5th (60% probability)
- Wind speeds averaging 15 km/h from SW direction
- UV index moderate (3-5) throughout the period
- Recommendation: Umbrella needed for midweek
get_weather_detailsGet detailed weather information for a specified city as structured JSON data for programmatic use.
Parameters:
city (string, required): The name of the city (English names only)Returns: Raw JSON data with all weather metrics suitable for processing and analysis
get_air_qualityGet current air quality information for a specified city with pollutant levels and health advisories.
Parameters:
city (string, required): The name of the city (English names only)variables (array, optional): Specific pollutants to retrieve. Options:
pm10 - Particulate matter ≤10μmpm2_5 - Particulate matter ≤2.5μmcarbon_monoxide - CO levelsnitrogen_dioxide - NO2 levelsozone - O3 levelssulphur_dioxide - SO2 levelsammonia - NH3 levelsdust - Dust particle levelsaerosol_optical_depth - Atmospheric turbidityReturns: Comprehensive air quality report including:
Example Response:
Air quality in Beijing (lat: 39.90, lon: 116.41):
PM2.5: 45.3 μg/m³ (Unhealthy for Sensitive Groups)
PM10: 89.2 μg/m³ (Moderate)
Ozone (O3): 52.1 μg/m³
Nitrogen Dioxide (NO2): 38.5 μg/m³
Carbon Monoxide (CO): 420.0 μg/m³
Health Advice: Sensitive groups (children, elderly, people with respiratory conditions)
should limit outdoor activities.
get_air_quality_detailsGet detailed air quality information as structured JSON data for programmatic analysis.
Parameters:
city (string, required): The name of the city (English names only)variables (array, optional): Specific pollutants to retrieve (same options as get_air_quality)Returns: Raw JSON data with complete air quality metrics and hourly data
get_current_datetimeRetrieves the current time in a specified timezone.
Parameters:
timezone_name (string, required): IANA timezone name (e.g., 'America/New_York', 'Europe/London'). Use UTC if no timezone provided.Returns: Current date and time in the specified timezone
Example:
{
"timezone": "America/New_York",
"current_time": "2024-01-15T14:30:00-05:00",
"utc_time": "2024-01-15T19:30:00Z"
}
get_timezone_infoGet information about a specific timezone.
Parameters:
timezone_name (string, required): IANA timezone nameReturns: Timezone details including offset and DST information
convert_timeConvert time from one timezone to another.
Parameters:
time_str (string, required): Time to convert (ISO format)from_timezone (string, required): Source timezoneto_timezone (string, required): Target timezoneReturns: Converted time in target timezone
The project is available as a Docker image on Docker Hub and includes configurations for easy deployment.
Pull and run the latest image directly from Docker Hub:
# Pull the latest image
docker pull dog830228/mcp_weather_server:latest
# Run in stdio mode (default)
docker run dog830228/mcp_weather_server:latest
# Run in SSE mode on port 8080
docker run -p 8080:8080 dog830228/mcp_weather_server:latest --mode sse
# Run in streamable-http mode on port 8080
docker run -p 8080:8080 dog830228/mcp_weather_server:latest --mode streamable-http
# Pull a specific version
docker pull dog830228/mcp_weather_server:0.5.0
docker run -p 8080:8080 dog830228/mcp_weather_server:0.5.0 --mode sse
dog830228/mcp_weather_server:latestdog830228/mcp_weather_server:<version> (e.g., 0.5.0)Images are automatically built and published when new versions are released.
Content type
Image
Digest
sha256:eb3aba058…
Size
83.9 MB
Last updated
7 days ago
docker pull dog830228/mcp_weather_server