Weather MCP Server š¤ļø
A Model Context Protocol (MCP) server that provides real-time weather information for any city using the Open-Meteo API.
Features
š Get current weather for any city worldwide
š”ļø Returns temperature in Celsius
šØ Provides wind speed in km/h
š Includes geographic coordinates
š³ Fully containerized with Docker
š Easy to deploy and use
Quick Start
Using Docker (Recommended)
Pull and run the pre-built image from Docker Hub:
The server will be available at: http://localhost:8000/mcp
Building from Source
Clone this repository:
Build the Docker image:
Run the container:
Usage
This MCP server exposes a weather tool that can be used by MCP clients like Claude Desktop.
Available Tool
weather(city: str)
Returns current temperature (°C) and wind speed (km/h) for the specified city
Default city: Philadelphia
Example Response
Configuration
The server runs on:
Host:
0.0.0.0(accessible from outside the container)Port:
8000Endpoint:
/mcp
Using with MCP Clients
Claude Desktop
Add this to your Claude Desktop MCP settings:
Development
Prerequisites
Python 3.11+
Docker (optional, for containerization)
Local Development
Install dependencies:
Run the server:
Testing
Run the complete test script to verify the server is working:
This will:
Initialize a session with the MCP server
List available tools
Test the weather tool with multiple cities (London, Paris, Tokyo)
Display real-time weather data
Expected Output:
Or use the quick health check:
Project Structure
How It Works
Geocoding: Converts city names to coordinates using Open-Meteo Geocoding API
Weather Data: Fetches current weather data using Open-Meteo Weather API
MCP Protocol: Exposes weather data through the Model Context Protocol
API Credits
This server uses the Open-Meteo API which is free and requires no API key.
Docker Hub
Pre-built images are available on Docker Hub:
Latest:
125478963/weather-mcp:latestVersion 1:
125478963/weather-mcp:v1
Troubleshooting
Server not responding?
Check if the container is running:
View logs:
Port already in use?
Use a different port:
License
MIT License - feel free to use and modify as needed.
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Support
For issues and questions, please open an issue on GitHub.
Made with ā¤ļø using the Model Context Protocol
This server cannot be installed
remote-capable server
The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.
Provides real-time weather information for any city worldwide using the Open-Meteo API, returning current temperature, wind speed, and geographic coordinates through a containerized MCP server.