KNMI Weather MCP

remote-capable server

The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.

Integrations

  • The MCP server uses .ENV for managing environment variables, particularly for storing the KNMI API key.

  • The MCP server utilizes NumPy for numerical operations in processing weather data.

  • The MCP server uses pandas for data manipulation and analysis of weather information.

KNMI天気MCP

KNMI(オランダ王立気象研究所)の気象観測所からリアルタイムの気象データを提供するFastMCPサーバー。このアプリケーションは、オランダ国内の任意の場所に最も近い気象観測所から最新の10分間の測定値を取得します。

特徴

  • オランダのあらゆる場所の天気データを入手
  • 最寄りのKNMI気象観測所を自動的に検索します
  • 以下を含むリアルタイム測定を提供します:
    • 温度
    • 湿度
    • 風速と風向
    • 降水量
    • 可視性
    • 空気圧
  • 気象状況の自然言語解釈
  • 場所検索機能
  • 詳細なログ記録

前提条件

インストール

  1. リポジトリをクローンします。
    git clone <repository-url> cd knmi-mcp
  2. プロジェクト ルートに.envファイルを作成します。
    KNMI_API_KEY=your_api_key_here

サーバーの実行

クロードAIの使用

このアプリケーションを Claude AI で使用するには、プロジェクトのフォルダーで次のコマンドを実行します。

uv run fastmcp install src/knmi_weather_mcp/server.py

これにより、Claude 構成ファイル (通常は~/Library/Application Support/Claude/claude_desktop_config.jsonにあります) に次の構成が追加されます。

{ "KNMI Weather": { "command": "uv", "args": [ "run", "--with", "fastmcp", "--with", "httpx", "--with", "netCDF4", "--with", "numpy", "--with", "pandas", "--with", "pydantic", "--with", "python-dotenv", "--with", "xarray", "fastmcp", "run", "/Users/<username>/<git location>/knmi-mcp/src/knmi_weather_mcp/server.py" ] } }

注: 次のようなエラーが表示された場合:

spawn uv ENOENT

uvコマンドをuvコマンドのフルパスに置き換えます。*nix システムでは、 which uvコマンドで確認できます。

手動実行

開発またはスタンドアロン使用の場合:

uv run fastmcp run src/knmi_weather_mcp/server.py

利用可能なツール

1. の天気はどうですか

オランダのあらゆる場所の現在の気象状況を自然言語で解釈します。

例:

await what_is_the_weather_like_in("Amsterdam")

2. get_location_weather

特定の場所の生の天気データを取得します。

例:

await get_location_weather("Rotterdam")

3. 検索場所

オランダの場所を検索します。

例:

await search_location("Utrecht")

4. 最寄り駅を取得する

指定された座標に最も近い KNMI 気象観測所を見つけます。

例:

await get_nearest_station(52.3676, 4.9041)

ログ記録

アプリケーション ログはlogs/knmi_weather.logファイルに保存され、次の詳細情報が提供されます。

  • APIリクエストとレスポンス
  • 気象データ処理
  • エラーメッセージ
  • デバッグ情報

データソース

このアプリケーションは、KNMI データ プラットフォーム API を使用して、「Actuele10mindataKNMIstations」データセットからデータを取得します。このデータセットは、オランダのすべての KNMI 気象観測所からの 10 分間隔の測定値を提供します。

エラー処理

アプリケーションには、次の堅牢なエラー処理が含まれています。

  • 無効な場所
  • API認証の問題
  • ネットワークの問題
  • データ解析エラー
  • 測定値が不足しています

You must be authenticated.

A
security – no known vulnerabilities
A
license - permissive license
A
quality - confirmed to work

KNMI 気象観測所からのリアルタイム気象データを提供する FastMCP サーバー。ユーザーは自然言語クエリを通じて、オランダのあらゆる場所の気温、湿度、風速、その他の気象指標にアクセスできます。

  1. Features
    1. Prerequisites
      1. Installation
        1. Running the Server
          1. Using Claude AI
          2. Manual Running
        2. Available Tools
          1. 1. what_is_the_weather_like_in
          2. 2. get_location_weather
          3. 3. search_location
          4. 4. get_nearest_station
        3. Logging
          1. Data Sources
            1. Error Handling
              ID: xanerdcjsm