Skip to main content

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

  1. First, obtain an MSN Weather API key from Microsoft.

  2. 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 location
  • longitude (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 location
  • longitude (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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mcp_server_msnweather-0.1.0.tar.gz (15.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mcp_server_msnweather-0.1.0-py3-none-any.whl (4.4 kB view details)

Uploaded Python 3

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

Hashes for mcp_server_msnweather-0.1.0.tar.gz
Algorithm Hash digest
SHA256 4b4d2a0e0ca8fb33fdd40de5c51f1894b103a156cf0f92805d7c54f2072efdbb
MD5 d80c27fd3ff68c41be6a09354d3a4da1
BLAKE2b-256 9adce8135123aa01429f3527fce9a04cdba3deb3d274c394d223e0206ef0608f

See more details on using hashes here.

File details

Details for the file mcp_server_msnweather-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for mcp_server_msnweather-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 24fb2e7e5733ef4b5ed1ae235353307e735848cfa96ab4e01d29dcf01885b066
MD5 3e90f0d0a98e65ab7b7c9a634fde970b
BLAKE2b-256 d96bd718e5aa772547b795beec95efa384d5bb7996f2a7718dff0426f3b55057

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page