Skip to main content
Glama
Rankintosh

wu-weather-mcp

by Rankintosh

wu-weather-mcp

一个 MCP 服务器,将任何 Weather Underground 个人气象站 (PWS) 作为工具公开给 Claude。向 Claude 询问当前状况、每日摘要、每小时历史记录和气象站元数据——所有数据均从您的气象站实时获取。

先决条件

  • Node.js 18+

  • 拥有 PWS 的 Weather Underground 账户

  • Weather Underground API 密钥(免费)

  • 您的气象站 ID(在您的 WU 仪表板中可见,例如 KCALAKEF92

Related MCP server: weather-mcp-server

设置

1. 克隆并安装

git clone https://github.com/your-username/wu-weather-mcp.git
cd wu-weather-mcp
npm install

2. 配置环境

cp .env.example .env

编辑 .env

WU_API_KEY=your_api_key_here
WU_STATION_ID=your_station_id_here
WU_STATION_NAME=My Weather Station   # optional — defaults to station ID

3. 构建

npm run build

4. 测试

node build/index.js

服务器在 stdio 上启动并等待 MCP 消息。按 Ctrl-C 退出。


Claude Desktop 集成

将此内容添加到您的 claude_desktop_config.json 中:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json

  • Windows: %APPDATA%\Claude\claude_desktop_config.json

{
  "mcpServers": {
    "wu-weather": {
      "command": "node",
      "args": ["/absolute/path/to/wu-weather-mcp/build/index.js"]
    }
  }
}

/absolute/path/to/wu-weather-mcp 替换为您克隆仓库的实际路径。 在 macOS 上,您可以在克隆的文件夹内运行 pwd 来获取该路径。

保存后重启 Claude Desktop。您的天气工具将自动出现。

替代方案:通过配置而非 .env 传递凭据

{
  "mcpServers": {
    "wu-weather": {
      "command": "node",
      "args": ["/absolute/path/to/wu-weather-mcp/build/index.js"],
      "env": {
        "WU_API_KEY": "your_api_key_here",
        "WU_STATION_ID": "your_station_id_here",
        "WU_STATION_NAME": "My Weather Station"
      }
    }
  }
}

可用工具

工具

参数

描述

get_current_conditions

当前温度、湿度、风速、气压、紫外线、降水率、露点、太阳辐射

get_daily_summary

days (1–7, 默认 7)

每日最高/最低/平均温度、最大阵风、总降水量

get_hourly_history

hours (1–24, 默认 24)

每小时的温度、湿度、风速和降水量

get_station_info

气象站名称、ID、坐标、海拔、社区

示例提示词

  • “现在天气怎么样?”

  • “给我看看过去 3 天的天气情况。”

  • “昨天下午每小时的天气明细是什么?”

  • “我的气象站海拔是多少?”


开发

npm run dev      # watch mode — recompiles on save
npm run build    # one-off build

源代码位于 src/index.ts。进行任何更改后请重新构建 (npm run build)。

发布到 npm

npm publish

发布后,用户无需克隆即可运行:

{
  "mcpServers": {
    "wu-weather": {
      "command": "npx",
      "args": ["-y", "wu-weather-mcp"],
      "env": {
        "WU_API_KEY": "your_api_key_here",
        "WU_STATION_ID": "your_station_id_here"
      }
    }
  }
}

注意: 在发布之前,请先检查 npmjs.com 以确认包名 wu-weather-mcp 是否可用。

许可证

MIT

Install Server
A
license - permissive license
A
quality
D
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

View all related MCP servers

Related MCP Connectors

  • US weather, alerts, earthquakes and elevation for AI agents, from NWS/NOAA and USGS. No API keys.

  • Search NOAA climate stations and datasets, fetch historical weather observations.

  • US weather & geo for AI agents: forecasts, alerts, earthquakes, elevation, geocoding. No keys.

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Rankintosh/wu-weather-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server