andrewflbarnes/mcp-wttr
3.3
If you are the rightful owner of mcp-wttr and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
A simple MCP server for returning weather data from wttr.in.
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 .
The wttr implementation is .
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
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.