MCP Weather 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., "@MCP Weather Server What's the 5-day forecast for New York City?"
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.
MCP Weather Server
This repository provides a simple Model Context Protocol (MCP) server written in Python that exposes weather data as tools. It is packaged so it can be published to GitHub and (optionally) to PyPI.
The server is built on the official mcp Python SDK and uses the free Open‑Meteo APIs (no API key required).
Features
MCP-compliant server using
FastMCPTwo tools:
get_current_weather– current conditions for a cityget_daily_forecast– daily forecast for a city for the next N days
Runs locally in Python (stdio transport by default)
Installation
From the project root:
pip install -e .Or, using uv:
uv syncRunning the MCP server locally
You can run the server directly via the console script:
python -m mcp_weather_server.serverOr, if installed as a package:
mcp-weather-serverBy default it uses the stdio transport, which works with MCP-compatible clients (e.g. IDE integrations or LLM apps that support MCP).
Connecting with MCP Inspector (optional)
To experiment via HTTP instead of stdio, you can set the transport to streamable-http inside server.py and then run:
uv run --with mcp python -m mcp_weather_server.serverThen start the MCP Inspector:
npx -y @modelcontextprotocol/inspectorand connect to http://localhost:8000/mcp.
Git conventions
Commit messages must follow Conventional Commits (e.g.
feat: add daily forecast tool,fix(server): handle API errors).A Cursor rule at
.cursor/rules/git-conventional-commits.mdcdocuments the allowed types and format.
Available Tools
2 toolsget_current_weatherA
Get current weather conditions for a city.
Args: city: City name, e.g. "Berlin". country: Optional country filter, e.g. "DE" or "Germany".
Returns: A JSON object with location info and current weather (temperature, wind speed, etc.).
Inputs: city (required), country. Returns: result
get_daily_forecastB
Get a simple daily weather forecast for the next N days for a city.
Args: city: City name, e.g. "Berlin". country: Optional country filter, e.g. "DE" or "Germany". days: Number of days to include (1–7).
Returns: A JSON object with location info and an array of daily forecasts.
Inputs: city (required), country, days. Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 2 tools
The two tools have clearly distinct purposes: get_current_weather retrieves current conditions, while get_daily_forecast provides future predictions. There is no overlap in functionality, and an agent can easily differentiate between immediate weather data and multi-day forecasts.
Both tools follow a consistent verb_noun pattern with 'get_' prefix and descriptive names (current_weather, daily_forecast). The naming is uniform and predictable across the toolset, making it easy for agents to understand and use them.
With only 2 tools, the server feels under-scoped for a weather domain. A typical weather API would include more operations such as historical data, alerts, or hourly forecasts. This minimal set limits agent capabilities and may require workarounds for common weather-related tasks.
The toolset is severely incomplete for a weather server. It lacks essential operations like historical weather data, severe weather alerts, air quality information, and hourly forecasts. Agents will face significant gaps when trying to perform comprehensive weather analysis or respond to diverse user queries.
Maintenance
Related MCP Connectors
Hosted MCP server for Xweather weather data: conditions, forecasts, alerts, and more.
OpenWeather MCP — wraps the OpenWeatherMap API (openweathermap.org)
Weather MCP — wraps Open-Meteo API (free, no auth)
Open-Meteo MCP — weather forecast + historical reanalysis + sister APIs
Related MCP Servers
- AlicenseAqualityDmaintenanceMCP server that provides current weather for any city using Open-Meteo APIs. It exposes a single tool 'get_weather' returning temperature, humidity, wind, and other weather data.112 npmMIT
- AlicenseAqualityCmaintenanceMCP server for weather forecasts via Open-Meteo (no API key needed), providing current weather, hourly, and daily forecasts with geocoding support.3MIT
- AlicenseNot gradedqualityDmaintenanceMCP server providing weather data via the Open-Meteo API, including geocoding, current conditions, daily and hourly forecasts, and city lookup. No API key required, with support for multiple units and transport types.1MIT
- FlicenseNot gradedqualityDmaintenanceA Python MCP server that provides current weather conditions and multi-day forecasts for cities worldwide using the Open-Meteo API. It exposes tools to get current weather and forecasts without requiring an API key.-