Weather MCP Server
This is a Model Context Protocol (MCP) server using the OpenWeather API to fetch weather data and air quality information.
Features
- Detailed weather forecast for any city (up to 5 days)
- Current air quality information for any city
Installation
Prerequisites
- Python 3.11+
- OpenWeather API key (available from OpenWeather)
- Anthropic Claude Desktop app (or other MCP client)
- UV package management tool (https://github.com/astral-sh/uv)
Steps
- Clone the repository
- Connect to the MCP server by adding the JSON configuration to your MCP client.
Usage
After connecting, you can use the Weather MCP Server to:
- Ask for the weather forecast of any city
- Request air quality information for any city
Example prompts:
- "What is the weather forecast for the next 3 days in Beijing?"
- "How is the air quality in Shanghai now?"
Troubleshooting
- Ensure API key is correctly provided in the command line
- Make sure your network can access the OpenWeather API
- Verify your MCP client server configuration is correct
Technical Details
- Uses OpenWeather API for weather data
- FastMCP framework for implementing MCP protocol
- Python's requests library for API interaction