关于 Weatherai.io Mcp
Weatherai.io Mcp 为 MCP 兼容的 AI 助手提供实时天气、预报、历史天气、空气质量等天气数据,并支持自然语言天气查询。适用于需要整合地点天气与环境信息的场景。
主要功能
- 01查询实时天气及最长 14 天预报
- 02获取历史天气与远期预测
- 03查看空气质量和天气预警
- 04查询日月信息、太阳能数据及时区
- 05用自然语言提问天气问题
适用场景
- 01规划出行并查看目的地天气
- 02查询过往日期的天气记录
- 03了解当地空气质量与预警
- 04查看日落时间或太阳能数据
MCP 相关
该 MCP 服务通过远程 HTTP 端点向客户端提供 11 种天气工具,支持 API 密钥认证。
配置
本地服务的配置在各客户端中通用,复制后粘贴到客户端的 MCP 配置文件即可。
我们还没有获取到这个服务的安装包或远程地址,请按项目 README 中的说明安装。
工具
本地服务需要在你的电脑上运行后才能读取工具,维护者暂未提供工具列表。
详细介绍
WeatherAI MCP Server
为 AI 助手提供 11 种实时天气工具——一个 URL,无需设置。
WeatherAI MCP 服务让 Claude Desktop、Cursor、Windsurf 及任何 兼容 MCP 的 AI 助手即时获取实时天气、天气预报、历史数据、空气质量、天文信息、太阳辐照度,以及使用通俗英语的 AI 天气交互界面。
托管端点: https://api.weatherai.io/mcp
传输方式: Streamable HTTP(无状态,MCP 规范 2025-03-26)
身份验证: 通过查询参数、标头或 Bearer 令牌提供 API 密钥
免费套餐: 每天 1,000 次标准调用 · 每天 50 次高级调用
快速入门
1. 获取免费 API 密钥
在 weatherai.io 注册——无需信用卡。
2. 添加到 AI 客户端
将 YOUR_API_KEY 替换为 控制面板 中的密钥。
Claude Desktop
编辑 ~/Library/Application Support/Claude/claude_desktop_config.json(macOS)或
%APPDATA%\Claude\claude_desktop_config.json(Windows):
{
"mcpServers": {
"weatherai": {
"url": "https://api.weatherai.io/mcp?apiKey=YOUR_API_KEY"
}
}
}
保存后重启 Claude Desktop。
Cursor
前往 Cursor → Settings → MCP,或编辑 ~/.cursor/mcp.json:
{
"mcpServers": {
"weatherai": {
"url": "https://api.weatherai.io/mcp?apiKey=YOUR_API_KEY"
}
}
}
Windsurf
编辑 ~/.codeium/windsurf/mcp_config.json:
{
"mcpServers": {
"weatherai": {
"url": "https://api.weatherai.io/mcp?apiKey=YOUR_API_KEY",
"type": "http"
}
}
}
其他 MCP 客户端(通用 mcp.json)
{
"mcpServers": {
"weatherai": {
"url": "https://api.weatherai.io/mcp?apiKey=YOUR_API_KEY",
"type": "http",
"transport": "streamable-http"
}
}
}
3. 开始询问天气问题
"What's the weather like in Tokyo right now?"
"Will it rain in London this weekend?"
"What were temperatures in Paris on 14 July 2023?"
"What's the air quality like in Beijing?"
"When does the sun set in Dubai today?"
可用工具
所有 11 种工具均会自动注册——无需配置。
| 工具 | 套餐 | 描述 | 关键参数 |
|---|---|---|---|
get_current_weather | 标准 | 任意地点的实时天气状况 | location、units |
get_weather_forecast | 标准 | 最长 14 天的每日和每小时天气预报 | location、days(1–14)、units |
get_historical_weather | 高级 | 任意日期的实际历史天气 | location、date(YYYY-MM-DD)、units |
get_future_weather | 高级 | 提前 14–300 天的天气预测 | location、start_date、end_date、units |
get_air_quality | 标准 | AQI、PM2.5、PM10、CO、NO2、SO2、O3 | location |
get_weather_alerts | 标准 | 当前有效的政府天气预警 | location |
get_astronomy | 标准 | 日出、日落、月相和月面照明度 | location、date |
get_solar_data | 高级 | 太阳辐照度和能源估算 | location、date、units |
get_timezone | 标准 | UTC 时差、本地时间、夏令时状态 | location |
search_locations | 标准 | 按部分名称查找城市或地点 | query |
ask_ai_weather | 高级 | 通过 Claude AI 用通俗英语回答天气问题 | question |
工具详情
get_current_weather
返回气温、体感温度、湿度、风速和风向、UV 指数、能见度、气压及云量。
location (required) City name, US zip, UK postcode, lat/lon, or IP address
units (optional) "metric" | "imperial" — default: metric
get_weather_forecast
提供最长 14 天的每日最高/最低气温和逐小时天气详情,包括降水概率和 UV 指数。
location (required) City name, zip/postcode, coordinates, or IP address
days (optional) 1–14 — default: 3
units (optional) "metric" | "imperial" — default: metric
get_historical_weather
提供任意过去日期逐小时记录的实际天气。
location (required) City name, zip/postcode, coordinates, or IP address
date (required) YYYY-MM-DD format — must be a past date
units (optional) "metric" | "imperial" — default: metric
get_future_weather
提供由 AI 增强的未来 14 至 300 天长期天气预报。每次请求消耗 2 个高级额度。
location (required) City name, zip/postcode, coordinates, or IP address
start_date (required) YYYY-MM-DD — 14–300 days from today
end_date (optional) YYYY-MM-DD — max 30 days per request
units (optional) "metric" | "imperial" — default: metric
get_air_quality
提供实时 AQI 指数及各类污染物的读数(PM2.5、PM10、CO、NO2、SO2、O3)。
location (required) City name, zip/postcode, coordinates, or IP address
get_weather_alerts
提供政府发布且当前有效的暴风雨、洪水、高温及其他天气预警。
location (required) City name, zip/postcode, coordinates, or IP address
get_astronomy
提供日出、日落、月出、月落、月相名称及月面照明百分比。
location (required) City name, zip/postcode, coordinates, or IP address
date (optional) YYYY-MM-DD — defaults to today
get_solar_data
提供太阳辐照度(W/m²)和每日发电量估算值(kWh/m²)。
location (required) City name, zip/postcode, coordinates, or IP address
date (optional) YYYY-MM-DD — defaults to today
units (optional) "metric" | "imperial" — default: metric
get_timezone
IANA 时区名称、UTC 偏移量(小时)、当前当地时间和夏令时启用状态。
location (required) City name, zip/postcode, coordinates, or IP address
search_locations
最多返回 10 个匹配地点及其名称、地区、国家/地区和坐标。
query (required) Partial or full city/location name
ask_ai_weather ⭐
用自然语言提问任何天气问题。AI 会解读意图、调用相关工具,并返回自然语言回答及其底层 JSON 数据。每次请求需花费 2 个高级额度。
question (required) e.g. "Will it be good weather for hiking in the Lake District next weekend?"
身份验证
支持三种等效方式:
| 方式 | 示例 |
|---|---|
| 查询参数 | https://api.weatherai.io/mcp?apiKey=YOUR_KEY |
X-API-Key 标头 | X-API-Key: YOUR_KEY |
| Bearer 令牌 | Authorization: Bearer YOUR_KEY |
建议在客户端配置文件中使用查询参数。程序化访问请使用标头。
定价
| 层级 | 免费额度 | 超额费用 |
|---|---|---|
| 标准工具 | 每天 1,000 次调用 | 每次调用 $0.0005 |
| 高级工具 | 每天 50 次调用 | 每次调用 $0.001 |
额度需预付——在控制面板中充值。无需订阅。
标准工具:get_current_weather、get_weather_forecast、get_air_quality、get_weather_alerts、get_astronomy、get_timezone、search_locations
高级工具:get_historical_weather、get_future_weather、get_solar_data、ask_ai_weather
机器可读发现
| 文件 | URL |
|---|---|
| MCP 清单 | /.well-known/mcp.json |
| 大模型上下文 | /llms.txt |
| OpenAPI 规范 | /openapi.yaml |
源代码
此仓库包含 MCP 服务实现。该服务作为 WeatherAI.io 平台的一部分运行,地址为 https://api.weatherai.io/mcp。
src/index.ts 是一个独立的改编版本,也可以单独运行:
npm install
WEATHERAI_API_KEY=your_key npm start
独立服务监听 PORT(默认为 3000),并提供相同的 /mcp 端点。
链接
- 网站: weatherai.io
- MCP 文档: weatherai.io/mcp
- API 文档: weatherai.io/docs
- 定价: weatherai.io/pricing
- 注册: weatherai.io/register
许可证
MIT — 参见 LICENSE。
由英格兰的 Zoomash Ltd 构建(公司编号:7838145)。
评论
一个开放协议,规定了 AI 应用如何以统一方式连接外部工具与数据源。客户端负责与模型对话,MCP 服务负责提供工具、资源和提示模板,两者通过标准消息通信,同一个服务可以被不同客户端复用。