Skip to main content
Glama
qweather-mcp

qweather-mcp

by overstarry

qweather-mcp

铁匠徽章

英语 |简体中文

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

✨ 特点

  • 🌤️实时天气查询

  • 📅 多日天气预报(3/7/10/15/30 天)

  • 🔑 简单的 API 密钥配置

  • 🔌 自定义 API 基本 URL 支持

  • 🛠️ 完整的工具集成

Related MCP server: OpenWeatherMap MCP Server

📦安装

通过史密斯里

推荐:使用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>"
      }
    }
  }
}

🛠️ 可用工具

获取当前天气

获取指定位置的当前天气信息。

获取天气预报

获取指定位置的天气预报信息,可自定义预报天数:

  • 3天预报

  • 7天预报

  • 10天预报

  • 15天预报

  • 30天预报

预测数据包括:

  • 温度范围(最小/最大)

  • 白天/夜间天气状况

  • 日出/日落时间

  • 沉淀

  • 湿度

  • 风力条件

  • 紫外线指数

获取每分钟降水量

提供未来2小时逐分钟降水预报,包括:

  • 降水类型(雨/雪)

  • 每分钟降水量

  • 精确的时间预测

  • 实时预报描述

获取每小时预报

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

  • 温度变化

  • 天气状况

  • 风向和风力

  • 相对湿度

  • 气压

  • 降水概率

  • 云覆盖

获取天气预警

提供实时天气预警信息,包括:

  • 警告发布机构

  • 警告级别和类型

  • 详细警告内容

  • 警告有效期

  • 相关建议

获取天气指数

提供气象生命指数信息,支持多种指数类型:

  • 运动指数

  • 洗车指数

  • 敷料指数

  • 钓鱼指数

  • 紫外线指数

  • 旅游指数

  • 过敏指数及其他16项生活指数

获取空气质量

提供实时空气质量数据,包括:

  • AQI指数

  • 空气质量等级

  • 主要污染物

  • 健康建议

  • 污染物浓度

每小时获取空气质量

提供未来24小时每小时的空气质量预报:

  • 每小时空气质量指数预测

  • 污染物浓度变化

  • 健康影响评估

  • 保护建议

每日获取空气质量

提供未来3天的空气质量预报:

  • 每日空气质量指数预测

  • 主要污染物预报

  • 空气质量水平变化

  • 健康防护建议

🤝 贡献

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

📄 许可证

麻省理工学院

🔗 相关链接

Available Tools

2 tools
get-weather-nowC

Get current weather for a location using QWeather API

Inputs: location (required).

lookup-cityC

Look up city information by name

Inputs: cityName (required).

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 2 tools

    Disambiguation5/5

    The two tools serve clearly distinct purposes: one retrieves current weather data, and the other looks up city information. There is no overlap or ambiguity.

    Naming Consistency5/5

    Both tools follow a consistent verb_noun pattern using snake_case: get-weather-now and lookup-city. The naming is predictable and clear.

    Tool Count3/5

    With only 2 tools, the set is on the lower end of reasonable. While it covers the basics, it feels minimal for a weather API, which typically includes more operations like forecasts or alerts.

    Completeness2/5

    The tool set lacks essential weather features such as forecasts, historical data, or severe weather alerts. For a weather-focused server, the absence of these common operations is a notable gap.

    Maintenance

    ActivityNo data
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers