Weather Israel MCP Server
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Weather Israel MCP Server what's the weather in Tel Aviv?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
MCP עם Playwright — תחזית מזג אוויר לישראל
פרויקט זה מממש שרת MCP (Model Context Protocol) שמאפשר למודל שפה לגשת לנתוני מזג אוויר עדכניים בישראל באמצעות אוטומציית דפדפן עם Playwright, במקום API סטנדרטי.
בנוסף קיים שרת MCP מקביל לארה״ב (NWS API), והמארח (host.py) מחבר את שני השרתים לסוכן שיחה אחד שיודע לנתב שאילתות בהתאם למדינה.
תיאור הפרויקט
בניגוד לשימוש ב־API קבוע, השרת הישראלי:
פותח דפדפן Chromium (גלוי לעין)
מנווט לאתר Weather2Day
מחפש עיר, בוחר תוצאה מהרשימה
מחלץ את תוכן הדף כטקסט נקי
מעביר את הטקסט למודל השפה כקונטקסט (RAG דינמי)
קבצים עיקריים
קובץ | תפקיד |
| שרת FastMCP בשם |
| שרת FastMCP לתחזיות/התראות ארה״ב דרך NWS |
| לקוח MCP גנרי (stdio) |
| ממשק הצ׳אט שמחבר LLM לכלי ה־MCP |
| תלויות הפרויקט לניהול עם |
| הגדרות ספק ה־LLM (Ollama / Gemini) |
כלי השרת הישראלי (4 Tools)
open_weather_forecast_israel— פתיחת דפדפן וניווט לדף התחזיתenter_weather_forecast_city_israel(city_name)— הקלדת שם העיר בתיבת החיפושselect_weather_forecast_city_israel— בחירת התוצאה הראשונה מה־dropdownextract_weather_data_israel— חילוץ טקסט נקי מהדף עבור המודל
Related MCP server: Israeli Weather MCP Agent
דרישות מקדימות
התקנה והרצה מקומית עם Ollama ו־uv
1. סנכרון תלויות
uv sync2. התקנת דפדפן Chromium ל־Playwright
uv run playwright install chromium3. התקנת מודל ב־Ollama
ollama pull llama3.2ודאו ש־Ollama רץ (בדרך כלל על http://127.0.0.1:11434).
4. הגדרת קובץ .env
העתיקו את הקובץ לדוגמה:
copy .env.example .envערכו את .env כך:
LLM_PROVIDER=ollama
OLLAMA_MODEL=llama3.2
OLLAMA_HOST=http://127.0.0.1:11434אופציונלי: אפשר גם
LLM_PROVIDER=geminiעם מפתח חינמי מ־Google AI Studio.
5. הרצת המארח (Host)
uv run host.pyלאחר ההרצה יופיע ממשק צ׳אט בטרמינל. הקלידו שאלה בעברית או באנגלית, או quit ליציאה.
דוגמה להרצה מוצלחת
שאלה:
What is the weather in Jerusalem?או בעברית:
מה מזג האוויר בירושלים?מה שקורה מאחורי הקלעים:
המודל מזהה שמדובר בעיר בישראל ומפעיל את ארבעת הכלים בסדר:
[Calling tool weather_Israel__open_weather_forecast_israel with args {}]
[Calling tool weather_Israel__enter_weather_forecast_city_israel with args {'city_name': 'ירושלים'}]
[Calling tool weather_Israel__select_weather_forecast_city_israel with args {}]
[Calling tool weather_Israel__extract_weather_data_israel with args {}]תוצאה לדוגמה (מתוך חילוץ חי מהאתר):
Selected city forecast page: https://www.weather2day.co.il/jerusalem
מזג אוויר ירושלים
24.5°
רוח: 13.3 קמ"ש (צפון מערבי)
לחות: 46%
תחזית לשבוע הקרוב: טמפרטורות מקסימום סביב 32–36°הדפדפן נפתח באופן גלוי (headless=False) כך שניתן לצפות באוטומציה בזמן אמת, והמודל מסכם את הטקסט שחולץ לתשובה קריאה למשתמש.
מבנה הזרימה
משתמש → host.py (Ollama/Gemini)
├─ weather_USA.py (API של NWS)
└─ weather_Israel.py (Playwright → weather2day.co.il)המארח אוסף את כל הכלים משני השרתים, מציג אותם למודל, ומנתב קריאות כלים חזרה לשרת הנכון.
שאלת בונוס
שאלה: איזו ספרייה "ישנה" קיבלה דחיפה מחודשת בעידן ה־AI?
תשובה: ספריות כמו BeautifulSoup ו־Scrapy.
בעבר הן שימשו בעיקר לסקראפינג קלאסי של אתרים. בעידן ה־AI הן קיבלו חיים חדשים כחלק מצינורות RAG וסוכנים: לפני שמזינים מסמכי אינטרנט למודל שפה, צריך לחלץ טקסט נקי מ־HTML. BeautifulSoup מאפשרת לפרסר דפים ולנקות רעש (תפריטים, סקריפטים, פרסומות), ו־Scrapy מאפשרת לזחול ולאסוף תוכן בקנה מידה גדול. כך ספריות "ותיקות" הפכו לרכיב מרכזי באיסוף קונטקסט איכותי עבור LLMs — לצד כלים חדשים יותר כמו Playwright, שמתאימים במיוחד לאתרים דינמיים (כמו בפרויקט זה).
הערות טכניות
השרת הישראלי שומר מצב גלובלי של Playwright (
playwright_context,browser,page) כדי שהדפדפן יישאר פתוח בין קריאות כלים עוקבות.חיפוש ערים באתר Weather2Day עובד בעיקר בעברית; הפרויקט ממיר שמות ערים נפוצים באנגלית (למשל
Jerusalem→ירושלים).להרצות בדיקה אוטומטיות אפשר להגדיר
WEATHER_ISRAEL_HEADLESS=1.
רישיון / הגשה
הפרויקט הוגש כחלק ממטלת MCP עם Playwright לתחזית מזג אוויר בישראל.
Available Tools
4 toolsenter_weather_forecast_city_israelC
Type a city name into the weather2day search box.
Args: city_name: City name to search for (Hebrew or English), e.g. ירושלים or Jerusalem.
Inputs: city_name (required). Returns: result
extract_weather_data_israelA
Extract clean inner text from the current Israel weather page for LLM context.
Inputs: no named parameters. Returns: result
open_weather_forecast_israelA
Launch a persistent Chromium browser and open the Israel weather forecast page.
Opens https://www.weather2day.co.il/forecast in a visible (non-headless) browser so subsequent Israel weather tools can reuse the same session.
Inputs: no named parameters. Returns: result
select_weather_forecast_city_israelA
Click the first city suggestion in the dropdown and wait for the forecast page.
Inputs: no named parameters. Returns: result
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 has a distinct purpose in a sequential workflow: open browser, enter city, select suggestion, extract data. No overlap or ambiguity.
All tool names follow the verb_..._israel pattern with snake_case, maintaining a consistent style across the set.
4 tools is appropriate for the simple workflow of opening a browser, searching for a city, selecting, and extracting data. Not over- or under-scoped.
Covers the primary workflow well, but lacks a tool to close the browser or handle errors, which is a minor gap for real-world use.
Maintenance
Related MCP Connectors
Playwright browser automation — navigate, click, fill forms, extract, screenshot — 17 agent tools.
Current weather and forecast lookup as an agent tool.
Get current weather for any city and create images from your prompts. Streamline planning, reports…
Provides cloud browser automation capabilities using Stagehand and Browserbase, enabling LLMs to i…
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceProvides LLMs with real-time weather forecasts for Israeli cities using browser automation with Playwright to scrape live data from a weather website.-
- FlicenseNot gradedqualityDmaintenanceEnables LLMs to retrieve Israeli weather forecasts by controlling a browser via Playwright and scraping data from an Israeli weather website.-
- FlicenseAqualityDmaintenanceEnables LLMs to fetch Israeli weather forecasts by controlling a real browser via Playwright, simulating human interactions like typing and clicking on a weather website.4-
- FlicenseNot gradedqualityDmaintenanceEnables LLMs to fetch real-time, localized weather forecasts for Israeli cities by using Playwright to autonomously navigate and scrape weather2day.co.il, including handling Hebrew queries and stateful web interactions.-