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.9

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.9
File Size Uploaded
weather_forecast_server-0.0.9.tar.gz 12.1 kB Details

Built distribution (wheel)

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

Total release size: 23.0 kB

Release files / weather_forecast_server-0.0.9.tar.gz

Download URL weather_forecast_server-0.0.9.tar.gz
Size 12.1 kB
Tags Source
SHA-256 checksum
How to use checksums
181a26bdc0fad0a147cd223c56972631ac3b73a67320a4924807cd225dd4014b
BLAKE2b-256 checksum
How to use checksums
506cd3a307998fbe5d5c41d55ccddfdbca4b86325ed73ad4acb0b7791d027896
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.9-py3-none-any.whl

Download URL weather_forecast_server-0.0.9-py3-none-any.whl
Size 11.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
77ad3ac58feecda757b74cff21e0791d92fe1bde2139db642361b5b87096d3f5
BLAKE2b-256 checksum
How to use checksums
483f9d80abe3b581fae787bd90e171278202555d0984f72cf57e84fdf595f615
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

This release

0.0.9 This release

2 release files

0.0.8

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