Weather Israel MCP
🌦️ Weather Israel MCP
MCP(Model Context Protocol)プロジェクトで、LLMがイスラエルの都市の天気予報を取得できるようにします。APIなしで、Playwrightを使ってブラウザから直接取得します。
🎯 プロジェクトの目的
組み込みAPIに依存する代わりに、エージェントがChromeブラウザを開き、weather2day.co.il に移動して都市を検索し、リストから選択してから、ページの内容を読み取って完全な予報を提供します。
Related MCP server: Israeli Weather MCP
🛠️ 技術スタック
ツール | 役割 |
Toolsの定義とMCPサーバーの実行 | |
ブラウザ操作 — ナビゲーション、入力、クリック | |
会話を管理する言語モデル | |
環境と依存関係の管理 |
📁 プロジェクト構成
project-template/
├── client.py # MCP Client גנרי — מתחבר לשרתי MCP
├── host.py # צ'אט טרמינל שמחבר את הכל יחד
├── weather_USA.py # MCP Server לתחזית ארה"ב (דרך NWS API)
├── weather_Israel.py # MCP Server לתחזית ישראל (דרך Playwright)
├── .env # מפתח API (לא מועלה ל-Git)
└── pyproject.toml # תלויות הפרויקט🚀 プロジェクトの実行
1. 依存関係のインストール
uv sync2. Playwright用のChromeブラウザのインストール
uv run playwright install chromium3. APIキーの設定
ディレクトリに .env ファイルを作成します:
OPENAI_API_KEY=your_openai_api_key_here4. 実行
uv run host.py💬 質問の例
Query: what is the weather in Jerusalem?
Query: מה התחזית לתל אביב?
Query: האם גשום היום בחיפה?
Query: what is the weather forecast for Bnei Brak?
Query: what are the weather alerts in NY?
Query: what is the forecast for latitude 40.7, longitude -74.0?🧩 weather_Israel MCP のツール
Tool | 説明 |
| ブラウザを開いて天気サイトに移動する |
| 検索フィールドに都市名を入力する |
| ドロップダウンリストから該当する都市を選択する |
| ページの内容を読み取り、予報をLLMに返す(RAG) |
🧩 weather_USA MCP のツール
Tool | 説明 |
| 国コードに基づいて気象警報を返す(例: |
| 地理座標に基づいて予報を返す |
Available Tools
4 toolsenter_weather_forecast_city_israelC
הזנת שם העיר בשדה החיפוש.
Inputs: city_name (required).
extract_weather_data_from_pageA
מחלץ את תוכן הטקסט מהדף הנוכחי כדי שה-LLM יוכל לקרוא את התחזית. זהו שלב ה-RAG שמספק קונטקסט למודל.
Inputs: no named parameters.
open_weather_forecast_israelA
פתיחת האתר וניווט לדף התחזית.
Inputs: no named parameters.
select_weather_forecast_city_israelB
בחירת העיר מהרשימה הנפתחת.
Inputs: no named parameters.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 4 tools
Each tool represents a distinct step in a clear browser workflow: open the site, enter a city, select a city, and extract text. Even though enter and select both relate to city input, their descriptions clearly distinguish typing into a search field from choosing from a dropdown.
All tool names use snake_case with a verb-noun structure, but the object naming is slightly inconsistent: three names end with 'city_israel' or 'israel', while the extract tool uses 'weather_data_from_page' and drops the location marker. Overall the pattern is readable and predictable.
With only 4 tools, the server is tightly scoped to a single weather-forecast retrieval workflow. Each tool earns its place as a necessary step, and the count is well within the ideal range for a focused server.
The tools cover the core lifecycle of opening the forecast page, entering and selecting a city, and extracting the forecast text for the model. Minor gaps exist, such as no explicit retry, reset, or alternate navigation tool, but the primary user journey is fully supported.
Related MCP Connectors
Hosted MCP server for Xweather weather data: conditions, forecasts, alerts, and more.
Official NWS forecasts and alerts, as one MCP tool through Apify
MCP server for weather with reasoning — umbrella advice, outdoor checks, city comparisons.
The official Model Context Protocol server for Ambee. It gives any MCP-compatible AI assistant — Claude, ChatGPT, Cursor, VS Code, Ollama, and more direct access to live air quality, pollen, and weather data. To get started, including information on signing up and obtaining your Ambee key, check out the Ambee documentation on https://docs.ambeedata.com
Related MCP Servers
- FlicenseAqualityDmaintenanceMCP server enabling LLMs to fetch Israeli weather forecasts by automating a browser with Playwright to scrape weather2day.co.il.4-
- FlicenseNot gradedqualityCmaintenanceMCP server that lets users obtain current Israeli city weather forecasts. It uses Playwright to browse Weather2day, extract the forecast page, and feed the cleaned data back to the LLM for natural language responses.-
- FlicenseAqualityDmaintenanceAn MCP server that provides real-time weather data for Israel by automating browser searches via Playwright. It allows LLMs to get current forecasts for Israeli cities through natural language queries.4-
- FlicenseBqualityDmaintenanceMCP server that enables LLMs to retrieve weather forecasts for Israeli cities by automating a browser with Playwright, and also provides US weather alerts and forecasts via NWS API.4-