Skip to main content

MseeP.ai Security Assessment Badge

Weather Forecast MCP Server

A Model Context Protocol (MCP) server for retrieving weather information using the wttr.in service, with Open-Meteo as fallback (free, no API key required).

Overview

This MCP server provides tools for accessing current weather conditions and forecasts for locations worldwide. It can be easily integrated with MCP clients, including Claude and other LLM applications supporting the MCP protocol.

Features

  • Get current weather for any location
  • Get multi-day weather forecasts (up to 3 days)
  • Support for both Chinsee/English and other language location names
  • Easy integration with MCP client applications

Installation

From pip

You can install the MCP Weather Server using uv:

uv pip install weather-forecast-server

Or using pip:

pip install weather-forecast-server

From source

git clone https://github.com/shibing624/mcp-server-weather.git
cd weather-forecast-server
pip install -e .

Usage

Python Demo

from weather_forecast_server import get_weather
print(get_weather('baoding')) # can be "baoding" or "保定"

Running as a standalone MCP server

Run the server with the stdio transport:

uvx weather-forecast-server

or

uv run weather-forecast-server

or

python -m weather_forecast_server

Then, you can use the server with any MCP client that supports stdio transport.

Integrating with Cursor

To add the weather MCP server to Cursor, add stdio MCP with command:

uv run weather-forecast-server

Tools available

  • get_weather - Get current weather conditions for a location (up to 3 days)

Contact

  • Issues and suggestions: GitHub issues
  • Email: xuming624@qq.com
  • WeChat: Add me (WeChat ID: xuming624) with the message: "Name-Company-NLP" to join our NLP discussion group.

License

This project is licensed under The Apache License 2.0 and can be used freely for commercial purposes. Please include a link to the weather-forecast-server project and the license in your product description.

Contribute

We welcome contributions to improve this project! Before submitting a pull request, please:

  1. Add appropriate unit tests in the tests directory
  2. Run python -m pytest to ensure all tests pass
  3. Submit your PR with clear descriptions of the changes

Acknowledgements

  • Weather data provided by wttr.in, fallback by Open-Meteo (free, no API key required)
  • Built with MCP Python SDK 2.x (requires mcp>=2.2.0, not compatible with mcp 1.x)

Metadata

Release files for weather-forecast-server 0.0.8

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for weather-forecast-server 0.0.8
File Size Uploaded
weather_forecast_server-0.0.8.tar.gz 12.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for weather-forecast-server 0.0.8
File Interpreter ABI Platform
weather_forecast_server-0.0.8-py3-none-any.whl Python 3 none any Details

Total release size: 23.0 kB

Release files / weather_forecast_server-0.0.8.tar.gz

Download URL weather_forecast_server-0.0.8.tar.gz
Size 12.1 kB
Tags Source
SHA-256 checksum
How to use checksums
f7b79a0ca6160fc8e65827b117cf60bdb8d4f89276335eab1ed5ff9aeccf3ffd
BLAKE2b-256 checksum
How to use checksums
eaf4bf820be257b75c2c910a2fa9e35a522a51b669d7d96b702ab8dcc4353c5c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.5

Release files / weather_forecast_server-0.0.8-py3-none-any.whl

Download URL weather_forecast_server-0.0.8-py3-none-any.whl
Size 11.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5fe2b4834926d6dc1442b4c7f21d00abde9c906c82212d8e68dfad3fd13cc327
BLAKE2b-256 checksum
How to use checksums
d43febfe7993687c5325b849ce4891e87d67ecb0622b5049b66b1d0e842a4a32
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.5

Release history Release notifications | RSS feed

0.0.9

2 release files

This release

0.0.8 This release

2 release files

0.0.7

1 release file

0.0.6

1 release file

0.0.5

1 release file

0.0.4

1 release file

0.0.3

1 release file

0.0.2

1 release file

0.0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page