AI 气象产品 · Model Context Protocol
天气 MCP
面向 Claude、Cursor 等 AI 客户端的标准化气象能力调用,17 个 Tool 覆盖实况、预报、预警与空气质量。
将华风爱科专业气象数据接入 AI 助手。配置 JSON 与环境变量后,AI 可直接回答天气问题——无需手写 HTTP 请求,也无需单独维护 REST 调用逻辑。
高阶 JV Key 需联系商务申请:business@weathercn.com
17
Tool 总数
8 + 9
标准 / 高阶 Tool
Python 3.11+
运行环境
Claude · Cursor
主流客户端
接入后,AI 可直接处理
- 北京今天天气怎么样?
- 上海未来 3 天会下雨吗?
- 深圳现在空气质量如何?
- 明天适合去爬山吗?
- 杭州有没有气象预警?
Key 体系
天气 MCP 支持两套鉴权模式,通过环境变量自动切换,无需手动改代码。
标准版 · openAPI Key
在「应用管理」获取,与 REST API 共用配额(实名认证后开通 30 天试用,500 次/天,5 QPS)。配置 WEATHERCN_OPENAPI_KEY 即可使用 8 个核心 Tool。
高阶版 · JV Key
联系商务申请,配置 WEATHERCN_API_KEY 与 WEATHERCN_API_SECRET。解锁更长预报时效、台风 / 天文 / 潮汐等 9 个专项 Tool。
快速接入
安装包名:weatherwork-consumer-mcp,需要 Python 3.11+。完整配置片段亦见 实用资料 · MCP 配置参考。
1安装 MCP 服务
pip install weatherwork-consumer-mcp
2配置 Claude Desktop(标准版)
编辑 ~/Library/Application Support/Claude/claude_desktop_config.json(Windows 路径见配置参考)
{
"mcpServers": {
"weatherwork": {
"command": "weatherwork-consumer-mcp",
"env": {
"WEATHERCN_OPENAPI_KEY": "your_openapi_key"
}
}
}
}
3配置 Cursor(标准版)
在项目根目录 .cursor/mcp.json 中添加,并在 .env.mcp.local 写入 Key。
{
"mcpServers": {
"weatherwork": {
"command": "weatherwork-consumer-mcp",
"envFile": "/path/to/.env.mcp.local"
}
}
}
4高阶版配置(JV Key)
{
"mcpServers": {
"weatherwork": {
"command": "weatherwork-consumer-mcp",
"env": {
"WEATHERCN_API_KEY": "your_jv_api_key",
"WEATHERCN_API_SECRET": "your_jv_api_secret"
}
}
}
}
高阶版 JV Key 需联系商务申请:business@weathercn.com · 010-64182655(工作日 9:30–17:30)
工具能力(17 个 Tool)
核心 Tool · 标准版(8 个)
resolve_location地名解析与消歧义get_current_weather实况天气get_weather_forecast逐日预报(1/5/10 天)get_hourly_forecast逐小时预报(最长 72 小时)get_weather_alerts气象预警get_activity_advice生活指数与活动建议get_air_quality空气质量实况get_minute_precipitation分钟级降水(约 2 小时)
高阶专项 Tool · JV Key(9 个)
get_typhoon_detail台风路径详情get_typhoon_season_list当年命名台风列表get_typhoon_recent最近台风摘要get_astronomy_daily天文逐日get_astronomy_current天文实况get_astronomy_hourly天文逐小时get_tidal_5day_forecast5 日潮汐预报get_tidal_hourly_forecast逐小时潮汐get_tidal_station潮汐站点查询
标准版 vs 高阶版
| 能力 | 标准版(openAPI Key) | 高阶版(JV Key) |
|---|---|---|
| 实况天气 | 当前实况 | + 过往 6 小时 / 24 小时 |
| 逐日预报 | 1 / 5 / 10 天 | + 25 / 45 / 90 天 |
| 逐小时预报 | 1 / 12 / 24 / 72 小时 | + 120 / 240 / 360 小时 |
| 气象预警 | ✅ | ✅ |
| 空气质量 | 当前实况 | + 逐小时预报(24h) / 全国城市排名 |
| 分钟降水 | 仅中国区域 | 全球覆盖 |
| 生活指数 | 1 天 | + 5 / 10 / 15 天 |
| 台风 / 天文 / 潮汐 | — | ✅ |
更多交互体验与在线申请入口,请访问控制台 天气 MCP 产品页;MCP 相关问题见 FAQ · 天气 MCP。
