Weather MCP Server
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Weather MCP ServerWhat's the air quality in Tokyo right now?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
π¦οΈ Weather MCP Server (Python)
A high-performance Model Context Protocol (MCP) server providing real-time weather observations, hourly forecasts, multi-day daily forecasts, and air quality analysis for any location globally.
Built with Python and the official Model Context Protocol SDK (mcp / FastMCP), powered by the free and keyless Open-Meteo API.
β¨ Features
π Global Geocoding: Automatically resolves city names, regions, countries, and landmarks to exact coordinates and timezones.
π‘οΈ Current Weather: Real-time temperature, apparent ("feels-like") temperature, humidity, precipitation, cloud cover, wind speed & cardinal direction, and pressure.
π Daily Forecasts: Up to 16-day forecasts with daily highs/lows, precipitation probabilities & volume, max UV index, and sunrise/sunset times.
β±οΈ Hourly Forecasts: Granular hour-by-hour forecast tables with rain chances, temperatures, and conditions.
π Air Quality & UV: Comprehensive US & European AQI, PM2.5, PM10, Ozone, NOβ, SOβ, CO, dust levels, and health recommendations.
π Zero API Keys Required: Powered by Open-Meteo with no authentication or account needed.
β‘ Async & Non-blocking: Uses
httpxfor fast, lightweight network requests.
Related MCP server: mcp-weather-plus
π οΈ MCP Tools Reference
1. get_current_weather
Fetch live weather conditions for any location.
Parameters:
location(str, required): City, region, or landmark (e.g."Tokyo","London","San Francisco, US").units(str, optional): Temperature unit β"celsius"(default) or"fahrenheit".
2. get_daily_forecast
Get a multi-day forecast breakdown.
Parameters:
location(str, required): City or landmark.days(int, optional): Number of forecast days from 1 to 16 (default:5).units(str, optional):"celsius"(default) or"fahrenheit".
3. get_hourly_forecast
Get an hour-by-hour forecast.
Parameters:
location(str, required): City or landmark.hours(int, optional): Number of hours ahead from 1 to 48 (default:24).units(str, optional):"celsius"(default) or"fahrenheit".
4. get_air_quality
Get current air quality, particulate concentrations, and UV index.
Parameters:
location(str, required): City or landmark.
π MCP Prompts & Resources
Resource:
weather://{location}/currentβ Dynamic resource to read current weather data.Prompt:
weather_briefingβ Pre-built prompt to generate tailored morning, travel, or outdoor activity advisories.
π Installation & Setup
Prerequisites
Python 3.10+
uv(recommended) orpip
1. Clone or Navigate to Project
cd C:\Users\Bhargav-Kahar\.gemini\antigravity\scratch\weather-mcp-server2. Install Dependencies
Using uv:
uv venv
uv pip install -e .Or using standard pip:
python -m venv .venv
.venv\Scripts\activate
pip install -e .3. Run Verification Tests
.venv\Scripts\python test_server.pyπ MCP Client Configuration
Claude Desktop Configuration
Add the server to your Claude Desktop config file:
Windows:
%APPDATA%\Claude\claude_desktop_config.jsonmacOS:
~/Library/Application Support/Claude/claude_desktop_config.json
{
"mcpServers": {
"weather": {
"command": "C:\\Users\\Bhargav-Kahar\\.gemini\\antigravity\\scratch\\weather-mcp-server\\.venv\\Scripts\\python.exe",
"args": [
"C:\\Users\\Bhargav-Kahar\\.gemini\\antigravity\\scratch\\weather-mcp-server\\weather_server.py"
]
}
}
}Or using uv directly:
{
"mcpServers": {
"weather": {
"command": "uv",
"args": [
"--directory",
"C:\\Users\\Bhargav-Kahar\\.gemini\\antigravity\\scratch\\weather-mcp-server",
"run",
"weather_server.py"
]
}
}
}Antigravity / Gemini MCP Configuration
In your workspace .agents/mcp_config.json or ~/.gemini/config/mcp_config.json:
{
"mcpServers": {
"weather": {
"command": "C:\\Users\\Bhargav-Kahar\\.gemini\\antigravity\\scratch\\weather-mcp-server\\.venv\\Scripts\\python.exe",
"args": [
"C:\\Users\\Bhargav-Kahar\\.gemini\\antigravity\\scratch\\weather-mcp-server\\weather_server.py"
]
}
}
}π Project Structure
weather-mcp-server/
βββ pyproject.toml # Package metadata and dependencies
βββ weather_server.py # Main MCP server implementation
βββ test_server.py # Automated verification test suite
βββ README.md # Documentation and client setup guideπ License
MIT License
This server cannot be deployed
Maintenance
Related MCP Connectors
Global weather API: forecasts, historical data, marine, ski, astronomy and timezone.
Global weather via Open-Meteo: forecast, historical, marine, air quality, geocoding, elevation.
Free, keyless real-time weather and 7-day forecasts for any city worldwide.
Provide real-time and forecast weather information for locations in the United States using naturaβ¦
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceProvides access to real-time weather data, 5-day forecasts, and air quality information for any city using the OpenWeatherMap API.MIT
- FlicenseNot gradedqualityDmaintenanceProvides real-time weather forecasts, air quality data, and timezone information via Open-Meteo API, with no API key required.-
- AlicenseNot gradedqualityDmaintenanceProvides real-time weather data and multi-day forecasts for any location worldwide.33 npmMIT
- FlicenseNot gradedqualityCmaintenanceProvides global weather data (current conditions, forecasts, air quality) without requiring an API key.-