Skip to main content
Glama
pipeworx-io

mcp-weather

by pipeworx-io

天气 — 当前状况与预报

任意地点的当前天气和 7–10 天预报。由 Open-Meteo(https://open-meteo.com)提供支持,这是一个免费的国家气象机构数据聚合器(美国为 NOAA,德国为 DWD 等)。返回温度、湿度、风、降水、天气状况。免费,无需认证,无需 API 密钥。

属于 Pipeworx 的一部分 — 一个将 AI 智能体连接到 1394+ 个实时数据源的 MCP 网关。

为什么这对 AI 智能体很重要

天气是智能体需要持续了解的事情之一 — 用于旅行规划、农业问题、能源需求背景、活动规划、房地产("这个市场是否位于洪水区且正在发生洪水?")。Open-Meteo 是正确的后端:免费、准确、全球覆盖、无需密钥操作。

常见流程:

  • 当前状况。 "东京现在的天气" → get_weather({location: "Tokyo"}) → 温度、湿度、风、天气状况。

  • 预报。 "丹佛 7 天预报" → get_forecast({location: "Denver"}) → 每日最高/最低气温、降水概率。

  • 按坐标。 get_weather({latitude: 39.74, longitude: -104.99}) 用于按名称无法很好地理编码的地点。

Related MCP server: Weather MCP Server

认证

无。Open-Meteo 免费且无需认证。宽松的合理使用限制(每个 IP 每天约 10,000 次请求)。Pipeworx 对每个地点进行短时间窗口缓存,因此重复调用不会消耗您的每日配额。

地理编码

location 参数接受:

  • 城市名称("Tokyo"、"London"、"Denver")

  • 城市 + 国家("Paris, France" 用于与德克萨斯州巴黎市区分)

  • 邮政编码(美国为 "94070",英国为 "SW1A 1AA")

  • 坐标作为单独的 latitude + longitude 参数

对于模糊名称,工具会返回消歧提示。对于特殊地点或精度敏感的查询(海上、偏远地区),请直接传递坐标。

更新频率

数据

刷新

当前状况

~10 分钟

每小时预报(未来 24 小时)

每 1–3 小时

每日预报(1–10 天)

每 6 小时

Pipeworx 使用 10 分钟 TTL 进行缓存,因此该时间窗口内的重复调用成本很低。

常见陷阱

  • 时区。 预报小时数默认使用 UTC。工具还会返回地点的时区 — 在向用户显示时在客户端进行转换。

  • 降水概率与降水量。 "70% 降雨概率"和"预计 0.4 英寸"是不同的字段。对于农业和旅行用途,两者都很重要;请同时报告。

  • 预报准确度随天数递减。 第 1 天可靠;第 7 天及以上是"方向性天气信号"。不要将 10 天预报作为确定预测引用。

  • 恶劣天气事件。 Open-Meteo 有灾害字段,但不如美国 NWS 的实时警报可靠。对于恶劣天气智能体,请在顶层叠加 NOAA NWS API。

  • 历史天气。 默认工具是当前 + 未来。对于历史数据(昨天及更早),Open-Meteo 有单独的端点 — 如果需要,请通过 pipeworx_feedback 告知团队。

快速开始

添加到您的 MCP 客户端(Claude Desktop、Cursor、Windsurf 等):

{
  "mcpServers": {
    "weather": {
      "url": "https://gateway.pipeworx.io/weather/mcp"
    }
  }
}

或连接到完整的 Pipeworx 网关以访问所有 1394+ 个数据源:

{
  "mcpServers": {
    "pipeworx": {
      "url": "https://gateway.pipeworx.io/mcp"
    }
  }
}

与 ask_pipeworx 一起使用

无需直接调用工具,您可以用纯英语提问:

ask_pipeworx({ question: "your question about Weather data" })

网关会自动选择正确的工具并自动填写参数。

更多

许可证

MIT

Related MCP Connectors

Related MCP Servers

  • F
    license
    Not graded
    quality
    D
    maintenance
    Enables AI assistants to fetch current weather conditions and forecasts for any city using the Open-Meteo API. Provides temperature, precipitation, and hourly forecast data through natural language queries.
    -
  • A
    license
    Not graded
    quality
    F
    maintenance
    Enables AI assistants to retrieve current weather, forecasts, and summaries for any global location using the Open-Meteo API, with no API key required.
    12 npm
    Creative Commons Zero v1.0 Universal
  • A
    license
    Not graded
    quality
    D
    maintenance
    Provides live weather data (current conditions, forecasts) and city geocoding through Open-Meteo API, enabling AI assistants to answer weather queries without an API key.
    MIT