和风天气

WZMMCP/qweather
Hosted
0 Stars 733 次浏览 更新于 2026-08-23

QWeather API 的 MCP 服务器,通过模型上下文协议(MCP)提供全面的天气信息查询功能。

MCP 服务配置

复制以下 JSON 到 OPClaw 或其他 MCP 客户端的配置文件中即可使用

{
  "mcpServers": {
    "qweather": {
      "args": [
        "-y",
        "@wangzmwzm/qweather-mcp"
      ],
      "command": "npx",
      "env": {
        "QWEATHER_API_BASE": "https://api.qweather.com",
        "QWEATHER_API_KEY": "\u003cyour-api-key\u003e"
      }
    }
  }
}

该服务需要配置环境变量:QWEATHER_API_BASE、QWEATHER_API_KEY

可用工具 (9 个)

该服务在 MCP 协议中暴露的工具,AI 可按需调用

get-weather-now 2 个参数 需填 2 项

Real-time weather API provides current weather conditions for global locations.

必填参数:latitude、longitude

get-weather-forecast 3 个参数 需填 3 项

Weather forecast API provides detailed weather predictions for global locations.

必填参数:latitude、longitude、days

get-minutely-precipitation 2 个参数 需填 2 项

Minute-level precipitation forecast API provides precise precipitation predictions for the next 2 hours.

必填参数:latitude、longitude

get-hourly-forecast 3 个参数 需填 2 项

Hourly weather forecast API provides detailed weather information for the next 24-168 hours.

必填参数:latitude、longitude

get-weather-warning 2 个参数 需填 2 项

Weather Warning API provides real-time weather warning data issued by official authorities.

必填参数:latitude、longitude

get-weather-indices 4 个参数 需填 3 项

Weather indices forecast API provides various life indices for locations worldwide.

必填参数:latitude、longitude、type

get-air-quality 2 个参数 需填 2 项

Real-time Air Quality API provides air quality data for specific locations.

必填参数:latitude、longitude

get-air-quality-hourly 2 个参数 需填 2 项

Hourly Air Quality Forecast API provides air quality data for the next 24 hours.

必填参数:latitude、longitude

get-air-quality-daily 2 个参数 需填 2 项

Daily Air Quality Forecast API provides air quality predictions for the next 3 days.

必填参数:latitude、longitude

服务介绍

qweather-mcp

Verified on MseeP
MseeP.ai Security Assessment Badge
smithery badge

English | 简体中文

QWeather API 提供的 MCP 服务器,通过模型上下文协议 (MCP) 提供全面的天气信息查询功能。

✨ 特性

  • 🌤️ 实时天气查询
  • 📍 基于经纬度的查询(无需城市查找)
  • 📅 多日天气预报(3/7/10/15/30天)
  • 🔑 简单的 API 密钥配置
  • 🔌 自定义 API 基础 URL 支持
  • 🛠️ 完整的工具集成

📦 安装

通过 Smithery

推荐:使用 Smithery 为 Claude Desktop 自动安装:


npx -y @smithery/cli install @overstarry/qweather-mcp --client claude

手动配置

  1. 首先,从 QWeather 控制台 获取您的 API 密钥。

  2. 启动服务器:


# stdio server

npx -y qweather-mcp

  1. 配置环境变量:

QWEATHER_API_BASE=https://api.qweather.com

QWEATHER_API_KEY=<your-api-key>

JSON 配置

将以下内容添加到您的配置文件中:


{

  "mcpServers": {

    "qweather": {

      "command": "npx",

      "args": ["-y", "qweather-mcp"],

      "env": {

        "QWEATHER_API_BASE": "<your-api-url>",

        "QWEATHER_API_KEY": "<your-api-key>"

      }

    }

  }

}

🛠️ 可用工具

所有工具都接受 纬度经度 参数(以度为单位)。

get-weather-now

获取指定纬度/经度的当前天气信息。

get-weather-forecast

获取指定纬度/经度的天气预报信息,可自定义预报天数:

  • 3天预报
  • 7天预报
  • 10天预报
  • 15天预报
  • 30天预报

预报数据包括:

  • 温度范围(最低/最高)
  • 白天/夜间天气状况
  • 日出/日落时间
  • 降水量
  • 湿度
  • 风况
  • 紫外线指数

get-minutely-precipitation

提供未来2小时内指定纬度/经度的分钟级降水预报,包括:

  • 降水类型(雨/雪)
  • 每分钟降水量
  • 精确的时间预测
  • 实时预报描述

get-hourly-forecast

提供未来24、72或168小时内的每小时天气预报,包括:

  • 温度变化
  • 天气状况
  • 风向和风力
  • 相对湿度
  • 大气压
  • 降水概率
  • 云量

get-weather-warning

提供指定纬度/经度的实时天气预警信息,包括:

  • 预警发布机构
  • 预警级别和类型
  • 详细的预警内容
  • 预警有效期限
  • 相关建议

get-weather-indices

提供指定纬度/经度的天气生活指数信息,支持多种指数类型:

  • 运动指数
  • 洗车指数
  • 穿衣指数
  • 钓鱼指数
  • 紫外线指数
  • 旅游指数
  • 过敏指数
    以及其他16种生活指数

get-air-quality

提供指定纬度/经度的实时空气质量数据,包括:

  • AQI 指数
  • 空气质量等级
  • 主要污染物
  • 健康建议
  • 污染物浓度

get-air-quality-hourly

提供未来24小时内指定纬度/经度的每小时空气质量预报:

  • 每小时 AQI 预测
  • 污染物浓度变化
  • 健康影响评估
  • 防护建议

get-air-quality-daily

提供未来3天内指定纬度/经度的空气质量预报:

  • 每日 AQI 预测
  • 主要污染物预报
  • 空气质量等级变化
  • 健康防护建议

🤝 贡献

欢迎提出问题和改进建议!请查看我们的贡献指南。

📄 许可证

MIT

🔗 相关链接

相关 MCP 服务