Skip to main content
Glama
liusicheng

MCP Weather Server

by liusicheng

MCP Weather Server

A weather query MCP server based on FastMCP, providing current weather, future forecasts, Celsius/Fahrenheit conversion, popular city resources, and travel weather advice prompts.

The project includes two entry points:

  • server.py: Local stdio mode, suitable for local MCP clients like Claude Desktop, Cursor, and Cherry Studio.

  • server_remote.py: Streamable HTTP mode, suitable for deployment to remote hosting platforms like ModelScope.

Features

  • get_weather(city: str): Query current weather for a specified city.

  • get_forecast(city: str, days: int = 3): Query future weather forecast for a specified city, default is 3 days.

  • temperature_convert(value: float, from_unit: str): Convert between Celsius and Fahrenheit.

  • weather://cities: Returns a resource list of common cities.

  • travel_advisor(destination: str, date: str): Generate a travel weather advice prompt.

Weather data is provided by wttr.in, no additional API tokens required.

Related MCP server: weather-mcp-server

Requirements

  • Python >= 3.12

  • It is recommended to use uv for dependency management

Install Dependencies

uv sync

If you are not using uv, you can also install dependencies in a virtual environment:

pip install "mcp[cli]>=1.27.0" "httpx>=0.28.1"

Local Execution

stdio mode:

uv run python server.py

MCP client configuration example:

{
  "mcpServers": {
    "weather-server": {
      "command": "uv",
      "args": ["run", "python", "server.py"]
    }
  }
}

Remote Execution

Streamable HTTP mode:

uv run python server_remote.py

Default listening on:

http://0.0.0.0:8000/mcp/

Remote MCP client configuration example:

{
  "mcpServers": {
    "weather-server": {
      "url": "http://127.0.0.1:8000/mcp/"
    }
  }
}

ModelScope Deployment Instructions

When creating or deploying an MCP Server on ModelScope, you can enter the GitHub repository address of this project and use the remote entry file:

python server_remote.py

The service will start in Streamable HTTP mode, listening on 0.0.0.0:8000, with the MCP endpoint at:

/mcp/

If the platform supports custom startup commands, it is recommended to use:

uv run python server_remote.py

Or use it after installing dependencies in the platform environment beforehand:

python server_remote.py

Project Structure

.
├── README.md
├── pyproject.toml
├── server.py
├── server_remote.py
└── uv.lock

License

If you need to release it as open source, please add a License file according to your actual situation.

Install Server
F
license - not found
A
quality
D
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • A
    license
    Not graded
    quality
    D
    maintenance
    An MCP server that provides real-time weather data, hourly forecasts, and daily summaries using the free Open-Meteo API with no API key required. It enables users to search for weather conditions by specific coordinates or city names across multiple measurement units.
    1
    MIT
  • A
    license
    Not graded
    quality
    C
    maintenance
    Real-time weather query MCP server providing current weather for cities via wttr.in, with support for listing built-in city mappings and server metadata.
    MIT

View all related MCP servers

Related MCP Connectors

  • OpenWeather MCP — wraps the OpenWeatherMap API (openweathermap.org)

  • Open-Meteo MCP — weather forecast + historical reanalysis + sister APIs

  • WeatherAPI.com MCP — wraps WeatherAPI.com (api.weatherapi.com)

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/liusicheng/mcp-weather'

If you have feedback or need assistance with the MCP directory API, please join our Discord server