Qweather Mcp

io.github.overstarry由 GitHub 账号 overstarry 发布v1.0.12更新于 Oct 24, 2026

a qweather mcp server

已验证STDIO仅桌面位置与生活数据与分析

概览

AI 生成的概览

一个本地 MCP 服务器,让助手获取和风天气的实况、预报、空气质量、预警和生活指数数据。

可以做什么
把和风天气 API 封装为 MCP 工具。工具涵盖实况天气、多日预报(3/7/10/15/30 天)、未来两小时逐分钟降水、最长 168 小时的逐小时预报、天气预警、穿衣或紫外线等生活指数,以及实况、逐小时和未来 3 天空气质量。通过 stdio 运行,并支持自定义 API 基础地址。
适用场景
适合让助手回答某地的天气、预报、空气质量或天气预警问题,包括短期降雨时段和日常出行指数。如果你已有和风天气 API 凭据,并希望把这些数据接入助手而不是打开浏览器查询,可以考虑安装。
运行要求
以 stdio 方式在本地运行,通常通过 npx qweather-mcp 启动,因此需要 Node.js。需要和风天气凭据:旧版 API Key 模式需 QWEATHER_API_BASE 与 QWEATHER_API_KEY;推荐的 JWT 模式需 QWEATHER_API_BASE、QWEATHER_PROJECT_ID、QWEATHER_KEY_ID,以及通过 QWEATHER_PRIVATE_KEY_PATH 或 QWEATHER_PRIVATE_KEY 提供的 Ed25519 私钥。需要能访问所配置的和风天气主机。
安装前请注意
需要密钥:QWEATHER_API_KEY,或 QWEATHER_PRIVATE_KEY / QWEATHER_PRIVATE_KEY_PATH 以及 QWEATHER_PROJECT_ID、QWEATHER_KEY_ID。私钥属于签名凭据,应妥善保存,避免出现在共享配置或日志中。位置查询和凭据会发送到你配置的和风天气 API 主机。文档说明 API Key 认证将于 2027 年弃用,建议规划迁移到 JWT。

安装

在 SourceWeft 中

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

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

qweather-mcp

[Verified on MseeP] [MseeP.ai Security Assessment Badge] [smithery badge]

English | 简体中文

MCP server for QWeather API, providing comprehensive weather information query capabilities through Model Context Protocol (MCP).

✨ Features

  • 🌤️ Real-time weather queries
  • 📅 Multi-day weather forecasts (3/7/10/15/30 days)
  • 🔐 JWT (EdDSA/Ed25519) and legacy API Key authentication
  • 🔌 Custom API base URL support
  • 🛠️ Complete tool integration

📦 Installation

Via Smithery

Recommended: Install automatically for Claude Desktop using Smithery:

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

Manual Configuration

  1. First, get your credentials from the QWeather Console.
  2. Start the server:
bash
# stdio servernpx -y qweather-mcp
  1. Configure environment variables (pick one of the two auth modes below).

🔐 JWT Authentication (recommended)

QWeather has announced that API Key authentication will be deprecated in 2027 and recommends migrating to JWT (EdDSA + Ed25519). Generate an Ed25519 key pair, upload the public key to the QWeather console, and configure:

bash
QWEATHER_API_BASE=https://<your-host>.qweatherapi.comQWEATHER_PROJECT_ID=<project-id>QWEATHER_KEY_ID=<credential-id># Either pass the PEM path…QWEATHER_PRIVATE_KEY_PATH=/path/to/ed25519-private.pem# …or the PEM content directly (newlines preserved)# QWEATHER_PRIVATE_KEY="-----BEGIN PRIVATE KEY-----\n...\n-----END PRIVATE KEY-----"

If both QWEATHER_PRIVATE_KEY_PATH and QWEATHER_PRIVATE_KEY are provided, the path takes precedence. For QWEATHER_PRIVATE_KEY, the literal two-character sequence \n is auto-converted to real newlines, so the single-line form above works in shells, .env files, and JSON configs.

JSON config example:

json
{  "mcpServers": {    "qweather": {      "command": "npx",      "args": ["-y", "qweather-mcp"],      "env": {        "QWEATHER_API_BASE": "https://<your-host>.qweatherapi.com",        "QWEATHER_PROJECT_ID": "<project-id>",        "QWEATHER_KEY_ID": "<credential-id>",        "QWEATHER_PRIVATE_KEY_PATH": "/path/to/ed25519-private.pem"      }    }  }}

JWT details: tokens are signed with alg=EdDSA, iat is back-dated 30s to tolerate clock skew, exp = iat + 900s (15 min, well under QWeather's 24h cap), and tokens are cached and reused until ~30s before expiry. See the official authentication docs.

🔑 API Key Authentication (legacy)

bash
QWEATHER_API_BASE=https://api.qweather.comQWEATHER_API_KEY=<your-api-key>

JSON config example:

json
{  "mcpServers": {    "qweather": {      "command": "npx",      "args": ["-y", "qweather-mcp"],      "env": {        "QWEATHER_API_BASE": "<your-api-url>",        "QWEATHER_API_KEY": "<your-api-key>"      }    }  }}

Mode detection

Env vars presentMode
Full JWT vars (QWEATHER_PROJECT_ID + QWEATHER_KEY_ID + QWEATHER_PRIVATE_KEY[_PATH])JWT (wins even if QWEATHER_API_KEY is also set)
Full JWT vars + QWEATHER_API_KEYJWT (API Key is ignored)
Partial JWT vars + QWEATHER_API_KEYAPI Key, with a startup warning to stderr
Partial JWT vars onlystartup error
QWEATHER_API_KEY onlyAPI Key
neitherstartup error

The active mode is logged to stderr at startup, e.g. Weather MCP Server running on stdio (auth: JWT/EdDSA).

🛠️ Available Tools

get-weather-now

Get current weather information for a specified location.

get-weather-forecast

Get weather forecast information for a specified location with customizable forecast days:

  • 3-day forecast
  • 7-day forecast
  • 10-day forecast
  • 15-day forecast
  • 30-day forecast

Forecast data includes:

  • Temperature range (min/max)
  • Day/night weather conditions
  • Sunrise/sunset times
  • Precipitation
  • Humidity
  • Wind conditions
  • UV index

get-minutely-precipitation

Provides minute-by-minute precipitation forecast for the next 2 hours, including:

  • Precipitation type (rain/snow)
  • Precipitation amount per minute
  • Precise time predictions
  • Real-time forecast descriptions

get-hourly-forecast

Provides hourly weather forecasts for 24, 72, or 168 hours, including:

  • Temperature changes
  • Weather conditions
  • Wind direction and force
  • Relative humidity
  • Atmospheric pressure
  • Precipitation probability
  • Cloud coverage

get-weather-warning

Provides real-time weather warning information, including:

  • Warning issuing authority
  • Warning level and type
  • Detailed warning content
  • Warning validity period
  • Related recommendations

get-weather-indices

Provides weather life indices information, supporting various index types:

  • Sports index
  • Car wash index
  • Dressing index
  • Fishing index
  • UV index
  • Tourism index
  • Allergy index and 16 other life indices

get-air-quality

Provides real-time air quality data, including:

  • AQI index
  • Air quality level
  • Primary pollutants
  • Health advice
  • Pollutant concentrations

get-air-quality-hourly

Provides hourly air quality forecast for the next 24 hours:

  • Hourly AQI predictions
  • Pollutant concentration changes
  • Health impact assessment
  • Protection recommendations

get-air-quality-daily

Provides air quality forecast for the next 3 days:

  • Daily AQI predictions
  • Primary pollutant forecasts
  • Air quality level changes
  • Health protection advice

🤝 Contributing

Issues and improvements are welcome! Please check our contribution guidelines.

📄 License

MIT

🔗 Related Links

来源:README.md,提交 97a7a98

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

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

评分

已满足适用检查项的 40%

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

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分

    请在仓库或注册中心条目中声明许可证。