Overview
What is MCP Server Weather?
MCP Server Weather is a lightweight microservice built with FastMCP that provides weather forecasts and current weather data using the free Open‑Meteo API. It is designed for developers who want to integrate weather information into LLM‑powered applications through the Model Context Protocol.
How to use MCP Server Weather?
Install Python 3.13+, clone the repository, install dependencies with pip install -r requirements.txt, then run python server.py. The server exposes two tools: get_forecast(latitude, longitude) and get_current_weather(latitude, longitude). For testing, use mcp dev server.py and connect via the inspector at http://localhost:5173.
Key features of MCP Server Weather
- Get daily weather forecast for any latitude/longitude
- Get current weather data (temperature, wind, humidity, etc.)
- Asynchronous HTTP requests for fast responses
- Easy integration as an MCP tool via stdio
- No API key required – uses free Open‑Meteo API
Use cases of MCP Server Weather
- Provide weather context to LLMs for travel planning
- Enable conversational agents to answer current weather questions
- Translate raw weather data into natural language recommendations
- Build automated alerts or summaries for any location
FAQ from MCP Server Weather
What data does the forecast tool return?
It returns a formatted string with daily maximum and minimum temperature, precipitation, and a weather code for each day.
What data does the current weather tool return?
It returns a JSON object containing current temperature, wind speed and direction, humidity, pressure, precipitation, cloud cover, and more.
What are the runtime requirements?
Python 3.13 or newer, and the Python packages httpx >= 0.28.1 and mcp[cli] >= 1.9.2.
Where does the weather data come from?
All data is fetched on demand from the Open‑Meteo API – no local storage or third‑party API keys are needed.
How is the server connected to clients?
The server uses the stdio transport, meaning it communicates with clients (e.g., Claude Desktop) via standard input/output.