Skip to main content
Glama
mali8573

Israel Weather Forecast MCP Server

by mali8573

Israel Weather Forecast MCP Server

実際のブラウザ(Playwright)を操作することによってイスラエルの天気予報を取得する、スタンドアロンMCPサーバーです。従来のAPI呼び出しによるものではありません。考え方:モデル(Host、例: Claude Desktop / Claude Code)は、人間のユーザーがWebサイトを閲覧するのとまったく同じように、ツールを次々と呼び出します。ページを開き、都市名を入力し、自動補完リストからその都市を選択し、最後にページの内容を抽出してユーザーの質問に答えます。

プロジェクト構成

israel-weather-mcp/
├── server.py           # השרת עצמו - כל ה-tools מוגדרים כאן
├── requirements.txt
└── README.md

Related MCP server: Israel Weather MCP Agent

実装済みツール

ステップ1 - ナビゲーションと都市の検索

ツール

説明

open_weather_forecast_israel()

Chromiumブラウザ(Playwright)を起動し、ims.gov.il の予報ページに移動します

enter_weather_forecast_city_israel(city_name)

ページの検索ボックスに都市名を入力します

select_weather_forecast_city_israel(city_name)

表示された自動補完リストから該当する都市を選択します

ステップ2 - コンテンツ抽出(RAG)

ツール

説明

get_weather_forecast_content()

(都市を選択した後の)予報ページからテキストを抽出し、HTML/script/style を除去して、LLMがチャットで直接回答できるクリーンなテキストを返します

close_weather_forecast_browser()

作業終了時にブラウザを閉じます

典型的なフロー(LLMが想定する呼び出し順序):

open_weather_forecast_israel
        ↓
enter_weather_forecast_city_israel("תל אביב")
        ↓
select_weather_forecast_city_israel("תל אביב")
        ↓
get_weather_forecast_content()   → הטקסט חוזר למודל, שמנסח תשובה למשתמש

インストール

cd israel-weather-mcp
python -m venv .venv
source .venv/bin/activate        # ב-Windows: .venv\Scripts\activate
pip install -r requirements.txt
playwright install chromium      # מוריד את הדפדפן שה-Playwright מפעיל

Hostへの接続(例: Claude Desktop)

MCPの設定ファイル(例: claude_desktop_config.json)に次を追加します:

{
  "mcpServers": {
    "israel-weather-forecast": {
      "command": "python",
      "args": ["/נתיב-מלא/israel-weather-mcp/server.py"]
    }
  }
}

保存後、Hostを再起動してください。ツールは利用可能なツール一覧に表示され、例えば 「今日のハイファの予報は?」 と尋ねると、Hostはツールを次々と実行して回答します。

セレクターに関する重要な注意

ims.gov.il サイトの正確なHTML構造(検索ボックス、自動補完項目、予報エリアのclass/id名)は、サイトの更新に伴って変更される可能性があります。そのため、すべてのセレクターは server.py 冒頭の SELECTORS 辞書に集約し、各要素にいくつかの代替(fallback)を用意しています。推奨事項:

  1. 実際のブラウザを確認するには、server.py 内の HEADLESS = False(一般設定の近くにある行)で実行してください。

  2. 通常のブラウザで予報サイトを開き、検索ボックス / 自動補完リスト / 予報エリアを右クリック → 「検査」(Inspect)し、それに応じて SELECTORS 辞書のリストを更新してください。

これにより、ims.gov.il の代わりに別のイスラエルの予報サイト(例えば民間団体のサイト)へ向ける場合でも、IMS_FORECAST_URLSELECTORS を更新するだけでサーバーを適合させることができます。

GitHubへのアップロード

このプロジェクトはすでにローカルgitリポジトリとして準備されています(最初のcommitが含まれています)。GitHubにアップロードして、講師/教師に送るリンクを取得するには:

  1. github.com にアクセスし、New repository をクリックします("Add README" / ".gitignore" / "license" にはチェックを付けないでください。これらはすでに用意されています)。

  2. 名前を入力します(例: israel-weather-mcp)、Create repository をクリックします。

  3. ターミナルで、プロジェクトフォルダ(israel-weather-mcp/)内で次を実行します:

    git remote add origin https://github.com/<שם-המשתמש-שלכם>/israel-weather-mcp.git
    git branch -M main
    git push -u origin main
  4. push後、講師に送るリンクはリポジトリのURLです: https://github.com/<שם-המשתמש-שלכם>/israel-weather-mcp

このコンピュータでgitを初回設定していない場合は、一度だけ次を実行する必要があるかもしれません:

git config --global user.name "השם שלכם"
git config --global user.email "האימייל שלכם"

直接実行してテストする場合(Hostなし)

MCP CLIを使ったクイックテストも実行できます:

mcp dev server.py

これにより、ローカルのテストインターフェース(MCP Inspector)が開き、Claude Desktopに接続しなくても、ツールを直接呼び出して出力を確認できます。

A
license - permissive license
Not graded
quality - not tested
C
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.

  • Real-time weather conditions and multi-day forecasts via Open-Meteo — free, no API key required

  • Global weather via Open-Meteo: forecast, ERA5 archive, marine, air quality, geocoding, elevation.

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/mali8573/israel-weather-mcp'

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