weekly-weather
Weather MCP server which returns 7 days of detailed weather forecasts anywhere in the world
claude mcp add --transport stdio rossshannon-weekly-weather-mcp python weather_mcp_server.py \ --env OPENWEATHER_API_KEY="your_openweathermap_api_key_here"
How to use
The weekly-weather MCP server provides two tools: get_weather and get_current_weather. get_current_weather returns current conditions for a specified location, while get_weather provides a full 8-day forecast (today plus the next 7 days) with detailed data points such as morning, afternoon, and evening times, hourly projections for the next 48 hours, and precipitation summaries. The server uses OpenWeatherMap One Call API 3.0 under the hood and accepts a location name that is geocoded to coordinates, along with an optional timezone_offset to present results in your preferred time zone. To integrate with an MCP client, configure the weather_forecast tool block to point at the Python script and supply your OpenWeatherMap API key via environment variables or inline in the config.
Example usage in an MCP client would call get_weather("Beijing", timezone_offset=8) or get_current_weather("New York", timezone_offset=-4) to obtain tailored responses for planning activities or quick current conditions.
How to install
Prerequisites:
- Python 3.8+ installed on your system
- Access to install Python packages (pip)
- OpenWeatherMap API key (for One Call API 3.0)
Installation steps:
- Clone the repository git clone https://github.com/rossshannon/weekly-weather-mcp.git cd weekly-weather-mcp
- (Optional but recommended) Create and activate a virtual environment python3 -m venv venv source venv/bin/activate # Linux/Mac venv\Scripts\activate # Windows
- Install dependencies pip install -r requirements.txt
- Set up your API key (example for Linux/Mac)
export OPENWEATHER_API_KEY="your_openweathermap_api_key"
Windows Command Prompt
set OPENWEATHER_API_KEY=your_openweathermap_api_key - Run the MCP server python weather_mcp_server.py
- Connect from an MCP client by referencing the server script path and ensuring the OPENWEATHER_API_KEY is available in the environment or config.
Additional notes
Tips and considerations:
- Ensure you have a valid OpenWeatherMap One Call API 3.0 key; if the key is invalid or rate-limited, the MCP tool will return errors.
- Timezone handling is supported via timezone_offset; set it to your local offset to receive times in your preferred zone.
- The get_weather tool provides 48 hours of hourly data plus an 8-day daily forecast with segmented morning, afternoon, and evening data points for each day.
- If using MCP clients, you may embed the environment variable in the client configuration or rely on the host environment where the server runs.
- Be mindful of API call limits on the OpenWeatherMap account to avoid HTTP 429 responses; you can cap usage in your OpenWeatherMap account settings.
Related MCP Servers
mcp
Official MCP Servers for AWS
MCP-Bridge
A middleware to provide an openAI compatible endpoint that can call MCP tools
mcp -odoo
A Model Context Protocol (MCP) server that enables AI assistants to securely interact with Odoo ERP systems through standardized resources and tools for data retrieval and manipulation.
pfsense
pfSense MCP Server enables security administrators to manage their pfSense firewalls using natural language through AI assistants like Claude Desktop. Simply ask "Show me blocked IPs" or "Run a PCI compliance check" instead of navigating complex interfaces. Supports REST/XML-RPC/SSH connections, and includes built-in complian
mcp -memos-py
A Python package enabling LLM models to interact with the Memos server via the MCP interface for searching, creating, retrieving, and managing memos.
cbi
CB Insights' MCP Server