MCP weather server using MSN Weather API
Project description
MCP Server MSN Weather
A Model Context Protocol (MCP) server that provides weather data using the MSN Weather API. This server enables access to weather alerts and forecasts for any location using latitude and longitude coordinates.
Installation
pip install mcp-server-msnweather
Requirements
- Python >= 3.10
- httpx >= 0.28.1
- mcp[cli] >= 1.2.0
Usage
-
First, obtain an MSN Weather API key from Microsoft.
-
Start the server with your API key:
mcp-server-msnweather --apikey YOUR_API_KEY
Available Tools
get_alerts
Fetches weather alerts for a specific location.
Parameters:
latitude(float): Latitude of the locationlongitude(float): Longitude of the location
Example:
result = await mcp.call_tool("get_alerts", {
"latitude": 47.6062,
"longitude": -122.3321
})
get_forecast
Gets a 7-day weather forecast for a specific location.
Parameters:
latitude(float): Latitude of the locationlongitude(float): Longitude of the location
Example:
result = await mcp.call_tool("get_forecast", {
"latitude": 47.6062,
"longitude": -122.3321
})
Development
To set up the development environment:
# Clone the repository
git clone https://github.com/yourusername/mcp-server-msnweather.git
cd mcp-server-msnweather
# Create a virtual environment
python -m venv .venv
source .venv/bin/activate # On Windows use: .venv\Scripts\activate
# Install in development mode
pip install -e .
License
See the LICENSE file for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mcp_server_msnweather-0.1.0.tar.gz.
File metadata
- Download URL: mcp_server_msnweather-0.1.0.tar.gz
- Upload date:
- Size: 15.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4b4d2a0e0ca8fb33fdd40de5c51f1894b103a156cf0f92805d7c54f2072efdbb
|
|
| MD5 |
d80c27fd3ff68c41be6a09354d3a4da1
|
|
| BLAKE2b-256 |
9adce8135123aa01429f3527fce9a04cdba3deb3d274c394d223e0206ef0608f
|
File details
Details for the file mcp_server_msnweather-0.1.0-py3-none-any.whl.
File metadata
- Download URL: mcp_server_msnweather-0.1.0-py3-none-any.whl
- Upload date:
- Size: 4.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
24fb2e7e5733ef4b5ed1ae235353307e735848cfa96ab4e01d29dcf01885b066
|
|
| MD5 |
3e90f0d0a98e65ab7b7c9a634fde970b
|
|
| BLAKE2b-256 |
d96bd718e5aa772547b795beec95efa384d5bb7996f2a7718dff0426f3b55057
|