weather-mcp-server

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

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 city
  • getForecast - Get the weather forecast for a specified city (supports 1-7 days)

Failover Mechanism

This server simultaneously uses multiple weather API sources:

  1. Requests both QWeather and Seniverse in parallel
  2. Utilizes the API result that returns first
  3. If one API fails, it automatically uses the other API's result
  4. Only returns an error if all APIs fail