Get the FREE Ultimate OpenClaw Setup Guide →

weather-forecast

weather-forecast-server, MCP server, without api key, free. Get weather for cities around the world. 免费天气预报MCP工具。

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio shibing624-weather-forecast-server uvx weather-forecast-server

How to use

The Weather Forecast MCP Server provides a Python-based MCP endpoint that retrieves current weather information and short-range forecasts by leveraging the wttr.in service. It exposes a simple tool named get_weather that accepts a location (in English or local language) and returns up-to-date weather data, including a multi-day forecast for up to three days. This server is designed to integrate with MCP clients and can be used with standard stdio transport, making it compatible with LLMs and other MCP-enabled applications such as Cursor.

To use the server, run it via the recommended Python/MCP entry points (stdio transport). Once running, you can query weather data for a location like baoding or 保定 using get_weather, and you’ll receive current conditions and a short forecast. The server supports multiple languages for location names and uses wttr.in as the data source, ensuring broad geographic coverage. It’s easy to integrate into workflows that rely on MCP-compatible clients and tools.

How to install

Prerequisites:

  • Python 3.8+ installed
  • Git installed
  • Network access to install packages from PyPI

Option A: Install from PyPI (recommended)

  1. Install via uv (uvxlike entry): uv pip install weather-forecast-server

    or (if uvx is not available yet):

    uvx weather-forecast-server

  2. Alternatively install with pip: pip install weather-forecast-server

Option B: Install from source

  1. Clone the repository: git clone https://github.com/shibing624/mcp-server-weather.git
  2. Enter the project directory: cd weather-forecast-server
  3. Install in editable mode: pip install -e .
  4. Run the server (see Running instructions in the README): uvx weather-forecast-server

Prerequisites recap: Python 3.8+, Git, and pip. Ensure your environment has network access to PyPI or the repository to install dependencies.

Additional notes

Notes and tips:

  • The server relies on wttr.in for weather data; if wttr.in is temporarily unavailable, weather data may fail to fetch.
  • Supported languages for location names include English and Chinese; provide either form when querying.
  • When running as an MCP server, you can connect via stdio transport using commands like: uvx weather-forecast-server or python -m weather_forecast_server.
  • If you plan to run in production or within a container, consider pinning versions of dependencies and setting appropriate environment variables for logging or rate limiting (not required by default).
  • The Tools available are limited to get_weather, which returns current conditions and a 3-day forecast for a given location.

Related MCP Servers

Sponsor this space

Reach thousands of developers