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 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.