Weather Israel MCP
# š¦ļø Weather Israel MCP
פר×××§× MCP (Model Context Protocol) ש××פשר ×-LLM ×ש×××£ ×Ŗ××××Ŗ ××× ××××ר ×ער×× ××שר×× ā ×ש×ר××Ŗ ×××פ×פ×, ××× API, ×××צע××Ŗ Playwright.
---
## šÆ ××רת ×פר×××§×
×××§×× ×××”×Ŗ×× ×¢× API ×××× ×, ×-Agent פ××Ŗ× ×פ××¤× ×ר××, ×× ××× ××תר [weather2day.co.il](https://www.weather2day.co.il/forecast), ××פש ×¢×ר, ×××ר ×××Ŗ× ××רש××× ā ××× ×§××Ø× ××Ŗ ×Ŗ××× ×××£ ××הפק ×Ŗ××××Ŗ ××××.
---
## š ļø ×”×××§ ××× ×××××
| ××× | תפק×× |
|-----|--------|
| [MCP SDK](https://github.com/anthropics/mcp) | ×××רת Tools ××רצת שרת MCP |
| [Playwright](https://playwright.dev/) | ש×××× ××פ××¤× ā × ××××, ××§×××, ××××¦× |
| [OpenAI API](https://platform.openai.com/) | ×××× ××©×¤× ×©×× ×× ××Ŗ ×ש××× |
| [uv](https://github.com/astral-sh/uv) | × ×××× ×”×××× ××Ŗ×××××Ŗ |
---
## š ××× × ×פר×××§×
```
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. ××Ŗ×§× ×Ŗ ×Ŗ×××××Ŗ
```bash
uv sync
```
### 2. ××Ŗ×§× ×Ŗ ×פ××¤× ×ר×× ×¢××ר Playwright
```bash
uv run playwright install chromium
```
### 3. ×××רת ××¤×Ŗ× API
צ×ר ×§××ׄ `.env` ××Ŗ××§×××:
```
OPENAI_API_KEY=your_openai_api_key_here
```
### 4. ×רצ×
```bash
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?
```
---
## š§© ×-Tools ×©× weather_Israel MCP
| Tool | ×Ŗ×××ר |
|------|--------|
| `open_weather_forecast_israel` | פ××Ŗ× ×פ××¤× ××× ××× ××תר ××× ×××××ר |
| `enter_weather_forecast_city_israel` | ××§××× ×©× ×¢×ר ×ש×× ×××פ×ש |
| `select_weather_forecast_city_israel` | ×××ר ××Ŗ ××¢×ר ×××Ŗ×××× ××רש××× ×× ×¤×Ŗ××Ŗ |
| `extract_weather_data_from_page` | ×§××Ø× ××Ŗ ×Ŗ××× ×××£ ×××××ר ××Ŗ ××Ŗ××××Ŗ ×-LLM (RAG) |
---
## š§© ×-Tools ×©× weather_USA MCP
| Tool | ×Ŗ×××ר |
|------|--------|
| `get_alerts_in_USA` | ××××ר ×תר×××Ŗ ××× ××××ר ××¤× ×§×× ×××× × (e.g. `CA`, `NY`) |
| `get_forecast_in_USA` | ××××ר ×Ŗ××××Ŗ ××¤× ×§×××ר××× ×××Ŗ ×××××רפ×××Ŗ |
TDQS
Scored across 4 tools
Each tool maps to a distinct browser step: opening, typing a city, selecting from a dropdown, and extracting page text. The two city-related tools could be confused at first glance, but the descriptions clarify typing vs. selecting.
All names are snake_case and verb-first, with most sharing the 'weather_forecast' prefix. 'extract_weather_data_from_page' breaks the pattern slightly, and the first tool omits 'city', but the overall convention is still predictable.
Four tools is a reasonable number for a tightly scoped browser automation flow. Each tool serves a necessary step in the workflow, though the set is on the smaller side.
The tools cover the full workflow from opening the site to extracting weather forecast text. Minor gaps like explicit wait/retry or error-handling steps are missing, but the core retrieval process is complete.