Skip to main content
Glama

mcp-wttr

A simple mcp server for returning weather data from wttr.in.

Made by following this guide.

The original implementation from the guide is weather.py.

The wttr implementation is wttr.py.

Installing

uv venv
source .venv/bin/activate
uv sync
# or for all tooling
uv sync --all-groups

Add MCP Server - Gemini

mkdir -p ~/.gemini/extensions/wttr-extension
cat << EOF > ~/.gemini/extensions/wttr-extension/gemini-extension.json
{
  "name": "mcp-wttr",
  "version": "1.0.0",
  "mcpServers": {
    "wttr": {
      "command": "uv",
      "args": [
        "--directory",
        "$(pwd)",
        "run",
        "wttr.py"
      ]
    }
  }
}
EOF

Related MCP server: Weather MCP Server

Debugging

Run the mcp inspector with

uv run mcp dev wttr.py

Example - Gemini

> Get weather in Bristol

 ╭───────────────────────────────────────────────────────────╮
 │ ✔  get_city_weather (wttr MCP Server) {"city":"Bristol"}  │
 │                                                           │
 │    Temperature=+20°C                                      │
 │    Wind=↓15km/h                                           │
 │    Humidity=46%                                           │
 │    Pressure=1017hPa                                       │
 │    Precipitation=0.0mm                                    │
 │    Weather=Overcast                                       │
 │    UV Index=1                                             │
 ╰───────────────────────────────────────────────────────────╯
✦ The weather in Bristol is: Temperature=+20°C, Wind=↓15km/h,
  Humidity=46%, Pressure=1017hPa, Precipitation=0.0mm,
  Weather=Overcast, UV Index=1.
╭──────────────────────────╮
│  > /ron_weather Bristol  │
╰──────────────────────────╯

 ╭──────────────────────────────────────────────────────────╮
 │ ✔  get_city_weather (wttr MCP Server) {"city":"Bristol"} │
 │                                                          │
 │    Temperature=+20°C                                     │
 │    Wind=↓15km/h                                          │
 │    Humidity=46%                                          │
 │    Pressure=1017hPa                                      │
 │    Precipitation=0.0mm                                   │
 │    Weather=Overcast                                      │
 │    UV Index=1                                            │
 ╰──────────────────────────────────────────────────────────╯
✦ Great Odin's raven! Bristol, listen up! It's a balmy 20 degrees
  out there, but don't let that overcast sky fool you. There's a
  gentle breeze at 15km/h, just enough to keep things fresh
  without messing up my magnificent hair. And the best part?
  Not a single drop of rain! It's a great day for news, and a
  great day for Bristol. I'm Ron Burgundy. Stay classy.

Tooling

This project uses ruff for linting and formatting.

Available Tools

1 tool
get_city_weatherC

Get weather for a specific city.

Args:
    city (str): The name of the city to get the weather for.

Inputs: city (required). Returns: result

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.2/5.0

    Scored across 1 tool

    Disambiguation5/5

    There is only one tool, so there is no possibility of confusion or misselection between tools. Its purpose (fetch weather for a named city) is unambiguous.

    Naming Consistency5/5

    The single name get_city_weather follows a clear verb_noun convention (get + city + weather) in snake_case. There are no competing conventions to contradict it.

    Tool Count3/5

    A single tool is thin for a weather server; even a minimal service usually offers current conditions, forecast, or unit/coordinate options. It is focused and non-bloated, but borders on under-scoped.

    Completeness3/5

    Core read access for current weather by city is covered, but obvious operations like multi-day forecast, hourly data, or units/coordinate-based lookup are missing. As a read-only, single-resource tool there are no create/update/delete gaps to fill.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • F
      license
      C
      quality
      D
      maintenance
      Provides real-time weather information for any location worldwide using the wttr.in service, enabling AI assistants to fetch current weather conditions and temperatures through natural language queries.
      1
      -
    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables real-time weather queries for Chinese and global cities via the wttr.in API, providing current conditions such as temperature, humidity, and wind speed.
      MIT
    • F
      license
      A
      quality
      C
      maintenance
      Provides real-time weather information for any city by name, including temperature, humidity, pressure, conditions, and wind speed, via the OpenWeather API.
      1
      -