home / mcp / weather mcp server

Weather MCP Server

Provides current weather data and city comparisons with unit options and optional forecasts.

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "glassbead-tc-weather-mcp": {
      "command": "python",
      "args": [
        "/path/to/weather-mcp/src/weather_server.py"
      ]
    }
  }
}

Weather MCP Server is a lightweight Python-based service that provides current weather data for cities and enables simple comparisons between multiple locations. It supports metric and imperial units and can optionally include a detailed 3-day forecast, making it useful for chat assistants, bots, or local productivity tools that need up-to-date weather information.

How to use

You interact with Weather MCP Server through an MCP client. Start the local server in your environment, then connect your MCP client to request current weather for a city, or compare weather between several cities. Use the available tools to fetch data in your preferred units and choose whether you want a detailed forecast.

How to install

Prerequisites you need before installation:

  • Python 3.8 or newer
  • pip (comes with Python)

Step-by-step setup using the local Python server approach:

pip install -r requirements.txt

python src/weather_server.py

MCP configuration example

Configure your MCP client to load the Weather MCP Server as a stdio (local) process. Use the following configuration snippet as a starting point. Replace the path with the actual location of the weather_server.py file on your system.

{
  "mcpServers": {
    "weather": {
      "command": "python",
      "args": ["/path/to/weather-mcp/src/weather_server.py"]
    }
  }
}

Testing the server locally

After starting the server, use your MCP client to request data. For example you can request current weather for a city, or compare multiple cities. Ensure the client points to the Weather MCP Server process you started.

Additional notes

If you need to stop the server, terminate the Python process that is running weather_server.py. Logs printed to the console will help you verify requests and responses.

Available tools

get_weather

Fetches the current weather for a specified city with optional units and detailed forecast.

compare_weather

Compares weather across multiple cities, with a choice of sorting metric.