Skip to main content
Glama
wu-weather-mcp

wu-weather-mcp

by Rankintosh

wu-weather-mcp

Weather Undergroundの個人用気象観測所(PWS)をClaudeのツールとして公開するMCPサーバーです。現在の状況、日次サマリー、時間ごとの履歴、観測所メタデータについて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

—

現在の気温、湿度、風、気圧、UV、降水率、露点、日射量

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

Available Tools

4 tools
get_current_conditionsA

Get current weather conditions from the KCALAKEF92 personal weather station (KCALAKEF92) in Lake Forest, CA. Returns temperature, humidity, wind, pressure, precipitation rate, UV index, dew point, and solar radiation.

Inputs: no named parameters.

get_daily_summaryA

Get daily high/low/avg temperature, total precipitation, and max wind gust for up to the last 7 days from KCALAKEF92 (KCALAKEF92).

Inputs: days.

get_hourly_historyA

Get hour-by-hour weather history for up to the last 24 hours from KCALAKEF92 (KCALAKEF92). Includes temperature, humidity, wind, and precipitation.

Inputs: hours.

get_station_infoA

Get metadata for the KCALAKEF92 weather station: name, ID, neighborhood, country, GPS coordinates, and elevation.

Inputs: no named parameters.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4.2/5.0

    Scored across 4 tools

    Disambiguation5/5

    Each tool targets a distinct aspect of weather data: current conditions, daily summary, hourly history, and station metadata. No overlap in purpose.

    Naming Consistency5/5

    All tool names follow a consistent 'get_' prefix followed by a clear noun phrase, maintaining snake_case throughout.

    Tool Count5/5

    4 tools is appropriate for a personal weather station MCP server, covering the core data retrieval needs without unnecessary bloat.

    Completeness4/5

    The set covers current conditions, daily summaries, hourly history, and station info. Missing features like alerts or forecast are reasonable gaps for a station-focused server.

    Related MCP Connectors

    Related MCP Servers