weather-mcp-server
1
The Dual Source Weather MCP Server is a Model Context Protocol-based weather server that uses multiple API sources to provide weather data efficiently. It supports failover and prioritizes the fastest response, targeting use cases involving large language models.
Dual Source Weather MCP Server
A weather server based on the Model Context Protocol (MCP), which uses the QWeather and Seniverse APIs to provide weather data, supporting failover and prioritizing the fastest response.
Features
- View current weather (as a resource provider)
- Get current weather for a specified city (tool)
- Get weather forecast for a specified city (tool)
- Simultaneous use of multiple API sources, automatically selecting the fastest response
- Supports minimum/maximum temperature, humidity, and wind speed data
API Key Acquisition
- QWeather API: Register and create an application at QWeather Developer Service
- Seniverse API: Register and create an application at Seniverse Developer Service
MCP Mode Description
This server only supports running in Model Context Protocol (MCP) mode and does not provide HTTP server functionality. MCP is a protocol designed for large language models to interact with external tools and resources.
MCP Server Features
- Communicates with clients through standard input/output (stdio)
- Provides resources and tools for large language models to use
- Supports structured data exchange and error handling
Available Resources
weather://{city}
- Get the current weather for a specified city
Available Tools
getCurrentWeather
- Get the current weather for a specified citygetForecast
- Get the weather forecast for a specified city (supports 1-7 days)
Failover Mechanism
This server simultaneously uses multiple weather API sources:
- Requests both QWeather and Seniverse in parallel
- Utilizes the API result that returns first
- If one API fails, it automatically uses the other API's result
- Only returns an error if all APIs fail