关于 World Weather Online
World Weather Online 是一个 MCP 服务,可让 AI 助手调用 World Weather Online 数据。工具涵盖当前天气、预报、历史与海洋天气、滑雪天气、天文信息、时区及气候平均值。
主要功能
- 01当前天气与 14 天预报
- 02查询 2008 年以来的历史天气
- 03海洋与滑雪天气数据
- 04天文与时区信息
- 0512 年月度气候平均值
适用场景
- 01查询某地当前天气和预报
- 02查找指定日期的历史天气
- 03出行前查看海洋或滑雪天气
- 04获取当地时间、日出或气候平均值
MCP 相关
将 World Weather Online 天气数据作为工具提供给 MCP 客户端。MCP 端点需配置 World Weather Online API 密钥。
配置
远程服务无需本地安装。选择你使用的客户端,复制配置或使用一键安装。
https://mcp.worldweatheronline.com/mcpclaude mcp add --transport http worldweatheronline-wwo https://mcp.worldweatheronline.com/mcp{"mcpServers":{"worldweatheronline-wwo":{"type":"http","url":"https://mcp.worldweatheronline.com/mcp"}}}在 Cursor 中打开{"servers":{"worldweatheronline-wwo":{"type":"http","url":"https://mcp.worldweatheronline.com/mcp"}}}在 VS Code 中打开{"mcpServers":{"worldweatheronline-wwo":{"type":"http","url":"https://mcp.worldweatheronline.com/mcp"}}}{"mcpServers":{"worldweatheronline-wwo":{"serverUrl":"https://mcp.worldweatheronline.com/mcp"}}}命令在终端中运行;JSON 粘贴到对应客户端的 MCP 配置后重启。需要授权的服务会在首次连接时提示登录。
工具
详细介绍
World Weather Online — MCP 服务(Railway)
World Weather Online 的 MCP 服务。让 Claude、Cursor 等 AI 助手能够直接将 WWO 天气数据作为工具调用。
部署到 Railway
步骤 1 — 推送到 GitHub
- 在 github.com 上创建一个新仓库(命名为
wwo-mcp-server) - 在此文件夹中打开终端并运行:
git init
git add .
git commit -m "Initial commit"
git remote add origin https://github.com/YOUR_USERNAME/wwo-mcp-server.git
git push -u origin main
步骤 2 — 在 Railway 上部署
- 前往 https://railway.app 并使用 GitHub 注册 / 登录
- 点击 New Project → Deploy from GitHub repo
- 选择你的
wwo-mcp-server仓库 - Railway 会自动检测 Node.js 并部署
你的服务将通过类似以下的 URL 上线:
https://wwo-mcp-server-production.up.railway.app
步骤 3 — 添加自定义域名
-
在 Railway 控制面板中,依次进入你的项目 → Settings → Networking → Custom Domain
-
输入
mcp.worldweatheronline.com并点击 Add -
Railway 会显示类似以下的 CNAME 值:
wwo-mcp-server-production.up.railway.app -
前往你的 DNS 提供商并添加:
类型 名称 值 CNAME mcp wwo-mcp-server-production.up.railway.app -
SSL 证书会在几分钟内自动配置
步骤 4 — 测试
访问你的健康检查端点:
https://mcp.worldweatheronline.com/health
在 MCP Inspector 中测试:
https://mcp.worldweatheronline.com/mcp?key=YOUR_WWO_API_KEY
连接 AI 客户端
Claude Desktop
添加到 ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"world-weather-online": {
"url": "https://mcp.worldweatheronline.com/mcp?key=YOUR_API_KEY"
}
}
}
Cursor / Windsurf
添加到 .cursor/mcp.json:
{
"mcpServers": {
"world-weather-online": {
"url": "https://mcp.worldweatheronline.com/mcp?key=YOUR_API_KEY"
}
}
}
可用工具
| 工具 | 描述 |
|---|---|
get_weather | 当前天气状况 + 14 天预报 |
get_historical_weather | 2008 年以来的历史天气 |
get_marine_weather | 涌浪、潮汐、水温 |
get_ski_weather | 山顶 / 山腰 / 山脚海拔预报 |
search_location | 地点自动补全 |
get_astronomy | 日出、日落、月相 |
get_timezone | 当地时间 + UTC 时差 |
get_climate_averages | 12 年月度气候平均值 |
本地开发
npm install
npm run dev
服务运行于 http://localhost:3000
评论
一个开放协议,规定了 AI 应用如何以统一方式连接外部工具与数据源。客户端负责与模型对话,MCP 服务负责提供工具、资源和提示模板,两者通过标准消息通信,同一个服务可以被不同客户端复用。