Weather Mcp

io.github.darshan0548由 GitHub 账号 darshan0548 发布v1.1.0更新于 Nov 1, 2026

MCP server for weather with reasoning — umbrella advice, outdoor checks, city comparisons.

已验证Streamable HTTP可网页运行位置与生活网页搜索与抓取

概览

AI 生成的概览

远程 MCP 服务器,让助手获取城市实时天气,并就带伞、户外活动和城市天气对比给出通俗建议。

可以做什么
  • 获取某城市的当前天气和今日预报
  • 给出是否带伞的是/否建议并附理由
  • 判断今日天气是否适合散步、跑步等户外活动
  • 对比两个城市的当前天气
  • 查看该服务器的作者与开发缘由
适用场景
适合希望助手用建议而非原始数字回答日常天气问题的场景,例如今天要不要带伞、适不适合跑步,或两个城市此刻的天气差异。
运行要求
需要一个远程 streamable HTTP 端点;未声明认证、API 密钥或环境变量。天气数据来自 Open-Meteo,README 称其无需 API 密钥,因此需要网络访问。
安装前请注意
天气数据经托管端点从第三方服务 Open-Meteo 获取,因此你询问的城市名称会发送到本机之外。该端点托管在免费套餐平台上,可用性可能不稳定。不索取任何凭据。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Weather Mcp,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Web executable,通过 Streamable HTTP。 远程服务在工作区中配置后即可从网页运行时运行。

交给智能体安装

把这段提示词粘贴到 Claude Code、Codex、Cursor 等智能体,或 SourceWeft 对话中。智能体会读取该服务器的安装指南,先向你展示发布者、端点和登录方式,经你同意后再把它添加到你的客户端。密钥不会写进任何命令。

阅读 https://sourceweft.com/mcp/io.github.darshan0548%2Fweather-mcp/install.md,并按其中说明把这个 MCP 服务器接入我的客户端。修改任何配置之前,先告诉我它的发布者、端点和登录方式,等我确认。不要把 API 密钥写进命令或我会提交的文件;问我密钥应从哪里获取。

查看智能体所依据的安装指南

其他 MCP 客户端

把它添加到你客户端的 mcpServers 配置中。

{
  "mcpServers": {
    "weather": {
      "type": "http",
      "url": "https://weather-mcp-2yhb.onrender.com/mcp"
    }
  }
}

README

weather-mcp

An MCP (Model Context Protocol) server that lets an AI assistant Claude, Gemini CLI, or any MCP-compatible client answer real weather questions using live data, instead of just fetching raw numbers.

Powered by Open-Meteo — free, no API key required.

Why this isn't just a raw weather API wrapper

Most weather integrations just return temperature: 22°C. This one adds a reasoning layer on top, so you can ask things a plain API can't answer directly:

  • get_weather("Bangalore") — current conditions + today's forecast
  • should_i_carry_umbrella("Mumbai") — a yes/no answer with reasoning, not just a rain percentage
  • is_good_for_outdoors("Delhi") — checks rain, wind, and temperature together to judge if it's a good day to be outside
  • compare_weather("Bangalore", "Delhi") — compares two cities at once

Setup

bash
git clone https://github.com/darshan0548/weather-mcp.gitcd weather-mcppython3 -m venv venvsource venv/bin/activate   # on Windows: venv\Scripts\activatepip install -r requirements.txt

Running the tests

A quick sanity check against the real API (no mocking, no API key needed):

bash
python test_weather.py

Connecting it to Claude Desktop

Add this to your Claude Desktop config (claude_desktop_config.json):

json
{  "mcpServers": {    "weather": {      "command": "python",      "args": ["/absolute/path/to/weather-mcp/server.py"]    }  }}

Connecting it to Gemini CLI

Add this to ~/.gemini/settings.json:

json
{  "mcpServers": {    "weather": {      "command": "python",      "args": ["/absolute/path/to/weather-mcp/server.py"]    }  }}

Restart your client, then just ask it something like "should I carry an umbrella in Chennai today?"

Project structure

weather_core.py     # talks to the Open-Meteo API, no MCP-specific codeweather_advice.py    # reasoning layer built on top of raw weather dataserver.py            # MCP server — wires the above into toolstest_weather.py       # sanity tests against the real API

Kept as separate files on purpose — weather_core.py and weather_advice.py have no MCP dependency at all, so they're easy to test or reuse on their own.

Contributing

PRs welcome. Some ideas if you want to add a tool:

  • Hourly forecast breakdown instead of just today's summary
  • Air quality data (Open-Meteo has a free endpoint for this too)
  • Multi-day trip planning (best day this week for an outdoor event)
  • Severe weather alerts

Keep new tools in weather_advice.py if they add reasoning on top of raw data, or weather_core.py if they're pure data fetching — then wire them into server.py as a new @mcp.tool().

License

MIT — see LICENSE.

来源:README.md,提交 817746d

工具

5

get_weather

Get the current weather and today's forecast for a city.

输入参数city必填

should_i_carry_umbrella

Get a yes/no recommendation on carrying an umbrella today, with reasoning.

输入参数city必填

is_good_for_outdoors

Check if today's weather is good for outdoor activities like a walk or run.

输入参数city必填

compare_weather

Compare current weather between two cities.

输入参数city_a必填city_b必填

about

Get information about who built this MCP server and why.

无需输入参数。

版本历史

1
  1. v1.1.0最新Sep 16, 2026

评分

已满足适用检查项的 100%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通必需25 分
  • 已声明认证方式必需10 分
  • 已列出工具必需15 分
  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分