This repository hosts a Model Context Protocol (MCP) server that fetches and provides 5-day weather forecasts for locations in Canada using the Government of Canada Weather API, integrating with Claude
This repository hosts a Model Context Protocol (MCP) server designed to provide weather forecast data sourced from the Government of Canada Weather API. It allows users to retrieve weather forecasts for any location within Canada by specifying its latitude and longitude coordinates.
Detailed instructions are provided for cloning the repository, setting up a virtual environment (recommended), and installing the necessary dependencies using pip install -e .
.
The server can be run directly using python weather.py
.
Configuration steps are outlined for integrating the server with Claude Desktop by modifying the claude_desktop_config.json
file to include the path to the weather.py
script.
Instructions are provided for configuring other MCP hosts to execute weather.py
using Python 3.13 or higher.
This function retrieves a 5-day weather forecast for a given location, specified by latitude and longitude. The function returns a formatted string containing the forecast.
The project includes tests that can be run using pytest
.
Contributions are encouraged through Pull Requests.
The project is licensed under the terms specified in the repository's license file.
SeanLF/weather-mcp
March 3, 2025
March 3, 2025
Python