by isdaniel
Provides current and forecast weather data for specified cities via the Open-Meteo API and returns the current datetime for a given timezone.
The server delivers real‑time weather information and short‑term forecasts for any city by querying the free Open‑Meteo service. It also supplies the current date and time in a requested IANA timezone.
pip install mcp_weather_server
cline_mcp_settings.json
to include the server definition:
{
"mcpServers": {
"weather": {
"command": "python",
"args": ["-m", "mcp_weather_server"],
"disabled": false,
"autoApprove": []
}
}
}
<use_mcp_tool>
<server_name>weather</server_name>
<tool_name>get_weather</tool_name>
<arguments>
{"city": "Taipei"}
</arguments>
</use_mcp_tool>
get_weather
: current weather for a city.get_weather_by_datetime_range
: forecast data between two dates.get_current_datetime
: current time in any IANA timezone.python -m mcp_weather_server
.Q: Do I need an API key?
A: No. The server relies on Open‑Meteo, which is open and free.
Q: Which date format is required for forecasts?
A: ISO 8601 (YYYY‑MM‑DD
).
Q: What happens if the user doesn’t provide a timezone?
A: The server defaults to UTC.
Q: How do I start the server manually?
A: Run python -m mcp_weather_server
from the project directory or set PYTHONPATH
so Python can locate the package.
Q: Can I use this server in a non‑Python environment?
A: Yes, as long as the client supports MCP calls; the server runs independently as a subprocess.
A Model Context Protocol (MCP) server that provides weather information using the Open-Meteo API.
Pip Installation and Usage, This package can be installed using pip:
pip install mcp_weather_server
This server is designed to be installed manually by adding its configuration to the cline_mcp_settings.json
file.
mcpServers
object in your cline_mcp_settings.json
file:{
"mcpServers": {
"weather": {
"command": "python",
"args": [
"-m",
"mcp_weather_server"
],
"disabled": false,
"autoApprove": []
}
}
}
cline_mcp_settings.json
file.This server does not require an API key. It uses the Open-Meteo API, which is free and open-source.
This server provides several tools: get_weather
, get_weather_by_datetime_range
, and get_current_datetime
.
get_weather
Retrieves the current weather information for a given city.
Parameters:
city
(string, required): The name of the city.Example:
To get the weather in Taipei, you would use the tool like this:
<use_mcp_tool>
<server_name>weather</server_name>
<tool_name>get_weather</tool_name>
<arguments>
{
"city": "Taipei"
}
</arguments>
</use_mcp_tool>
get_weather_by_datetime_range
Retrieves weather information for a specified city between start and end dates.
Parameters:
city
(string, required): The name of the city.start_date
(string, required): Start date in format YYYY-MM-DD (ISO 8601).end_date
(string, required): End date in format YYYY-MM-DD (ISO 8601).Example:
To get the weather in London between 2024-01-01 and 2024-01-07, you would use the tool like this:
<use_mcp_tool>
<server_name>weather</server_name>
<tool_name>get_weather_by_datetime_range</tool_name>
<arguments>
{
"city": "London",
"start_date": "2024-01-01",
"end_date": "2024-01-07"
}
</arguments>
</use_mcp_tool>
get_current_datetime
Retrieves the current time in a specified timezone.
Parameters:
timezone_name
(string, required): IANA timezone name (e.g., 'America/New_York', 'Europe/London'). Use UTC timezone if no timezone provided by the user.Example:
To get the current time in New York, you would use the tool like this:
<use_mcp_tool>
<server_name>weather</server_name>
<tool_name>get_current_datetime</tool_name>
<arguments>
{
"timezone_name": "America/New_York"
}
</arguments>
</use_mcp_tool>
Change Working Directory Before Running Python
python -m mcp_weather_server
Or if you want Python to find your package no matter where you run from, you can set PYTHONPATH:
set PYTHONPATH=C:\xxx\mcp_weather_server\src
python -m mcp_weather_server
Please log in to share your review and rating for this MCP.
{ "mcpServers": { "weather": { "command": "python", "args": [ "-m", "mcp_weather_server" ], "env": {} } } }
Discover more MCP servers with similar functionality and use cases
by nanbingxyz
A cross‑platform desktop AI assistant that connects to major LLM providers, supports a local knowledge base, and enables tool integration via Model Context Protocol servers.
by loopwork
iMCP is a macOS application that provides a Model Context Protocol (MCP) server, enabling AI clients like Claude Desktop to securely access and utilize your personal data from Apple services such as Messages, Contacts, and Reminders. Its main purpose is to bridge your digital life with AI, allowing for AI-powered personal assistance and contextual interactions without collecting or storing your data.
by sunsetcoder
Flightradar24 MCP Server is a Claude Desktop Model Context Protocol (MCP) server that enables real-time flight tracking using Flightradar24 data, designed for aviation enthusiasts and travel planners.
by KyrieTangSheng
An MCP Server for the National Park Service (NPS) API, providing real-time information about U.S. National Parks, including park details, alerts, and activities.
by mfukushim
A virtual traveler library for MCP that integrates various APIs to simulate virtual travel experiences.
by aqara
An MCP server for controlling Aqara smart home devices using natural language.
by NitayRabi
Fitbit MCP (Model Context Protocol) enables AI assistants to access and analyze your Fitbit health and fitness data. It acts as an MCP server, connecting to the Fitbit API to provide a wide range of health metrics.
by mschneider82
mcp-openweather is an MCP server that provides current and forecast weather information using the free OpenWeatherMap API.
by netdata
Real-time, per‑second infrastructure monitoring platform that provides instant insights, auto‑discovery, edge‑based machine‑learning anomaly detection, and lightweight visualizations without requiring complex configuration.