Skip to main content
Glama
weatherai-io

WeatherAI MCP

Official
by weatherai-io

WeatherAI MCP 服务器

MCP Spec Tools Free Tier License

为您的 AI 助手提供 11 种实时天气工具 — 一个 URL,无需设置。

WeatherAI MCP 服务器让 Claude Desktop、Cursor、Windsurf 以及任何 兼容 MCP 的 AI 助手能够即时访问实时天气、预报、历史数据、空气质量、天文、太阳辐射以及基于自然语言的 AI 天气接口。

托管端点: https://api.weatherai.io/mcp
传输方式: 可流式传输的 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?"

Related MCP server: ambient-mcp

可用工具

所有 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

返回温度、体感温度、湿度、风速/风向、紫外线指数、能见度、气压和云量。

location  (required) City name, US zip, UK postcode, lat/lon, or IP address
units     (optional) "metric" | "imperial" — default: metric

get_weather_forecast

提供长达 14 天的每日最高/最低气温及每小时详细信息,包括降水概率和紫外线指数。

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

LLM 上下文

/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 端点。


链接


许可证

MIT — 详见 LICENSE

Zoomash Ltd 构建,英格兰(公司编号 7838145)。

Related MCP Connectors

Related MCP Servers

  • F
    license
    Not graded
    quality
    D
    maintenance
    A Model Context Protocol (MCP) server built with the mcp-framework to provide weather-related tools and data to AI clients. It enables integration of weather capabilities and custom tools into the MCP ecosystem for use with platforms like Claude Desktop.
    7 npm
    -
  • A
    license
    Not graded
    quality
    D
    maintenance
    An MCP server that wraps the Ambient Weather REST API. Query your personal weather stations conversationally from Claude Code, Claude.ai, or any MCP-compatible client.
    1
    MIT
  • A
    license
    A
    quality
    C
    maintenance
    An MCP server that provides weather and time tools, enabling users to get current time, weather alerts, and forecasts through natural language with Claude Desktop.
    4
    MIT