MCP Weather Assistant
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., "@MCP Weather Assistantwhat's the weather in Jerusalem?"
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 Weather Assistant
פרויקט זה הוא דוגמה קטנה ופרקטית ליישום של MCP (Model Context Protocol) עם מודל שפה, שמאפשר למודל לעבוד עם כלים חיצוניים אמיתיים.
🎯 מה הפרויקט עושה?
הפרויקט מאפשר למשתמש לשאול שאלות על מזג האוויר, וה-LLM בוחר אילו כלים להשתמש כדי לענות על השאלה.
יש בו שני סוגי כלים:
עבור ישראל — נעשה שימוש ב-Playwright כדי לפתוח דפדפן, להזין שם עיר, לבחור את התוצאה ולחלץ את תוכן הדף.
עבור ארצות הברית — נעשה שימוש ב-API רשמי של מזג האוויר כדי לקבל תחזית ו-alerts.
הדבר מיועד להדגים איך מודל שפה יכול לא רק לענות, אלא גם לבצע פעולה בעולם האמיתי דרך כלים חיצוניים.
Related MCP server: MCP Weather Forecast Server
🎯 המטרה של הפרויקט
המטרה היא להראות כיצד אפשר להרחיב את יכולות של LLM באמצעות MCP Tools:
לאסוף מידע בזמן אמת
לבצע פעולות בדפדפן באופן אוטומטי
להעניק למודל קונטקסט נוסף מהאתר עצמו (RAG)
לשלב בין כלים שונים לממשק צ'אט אחד
זהו פרויקט לימודי שמדגים עקרונות של Agents, MCP Servers ו-Tool Calling.
🧩 מבנה הפרויקט
client.py — לקוח MCP גנרי שמתחבר לשרתים.
host.py — צ'אט Host שמקבל שאלות, שולח אותן למודל ומחבר בין ה-LLM לכלים.
weather_USA.py — שרת MCP עבור מזג אוויר בארצות הברית דרך API.
weather_Israel.py — שרת MCP עבור מזג אוויר בישראל דרך Playwright.
🛠️ טכנולוגיות בשימוש
Python
MCP SDK
Playwright
Anthropic API
UV
🚀 איך מריצים את הפרויקט
1. התקנת התלויות
uv sync2. התקנת דפדפן עבור Playwright
uv run playwright install chromium3. הגדרת מפתח API
ודאו שיש לכם משתנה סביבה בשם:
ANTHROPIC_API_KEY=your_api_key_here4. הרצת הממשק
uv run host.py💬 דוגמאות לשאלות שניתן לשאול
מה מזג האוויר היום בירושלים?
תבדוק לי בבקשה מה התחזית בטבריה.
האם ירד גשם היום בתל אביב?
מה המצב במזג האוויר באילת?
What is the weather in New York?
⚠️ דברים חשובים לשים לב אליהם
הפרויקט מיועד ללימוד והדגמה, לאו דווקא למוצר סופי יציב.
עבור ישראל, התהליך תלוי באתר חיצוני, ולכן הוא עלול להישבר אם האתר ישנה את מבנה הדף.
כדי שה-LLM יוכל לענות, צריך להיות מוגדר מפתח API תקין.
Available Tools
4 toolsenter_weather_forecast_city_israelB
מקבל שם עיר ומזין אותה בשדה החיפוש באתר.
Inputs: city_name (required). Returns: result
extract_weather_data_israelB
מחלץ את תוכן דף התחזית הנוכחי, מנקה אותו ומחזיר את טקסט התחזית עבור ה-LLM.
Inputs: no named parameters. Returns: result
open_weather_forecast_israelA
פותח את הדפדפן ומנווט לדף הראשי של אתר מזג האוויר בישראל.
Inputs: no named parameters. Returns: result
select_weather_forecast_city_israelB
בוחר את המיקום הראשון שמופיע ברשימת הערים הנפתחת (Dropdown).
Inputs: no named parameters. Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
TDQS
Scored across 4 tools
Each tool has a distinct role in the workflow: open browser, enter city, select from dropdown, extract data. No overlap in functionality.
All tool names follow a consistent verb_noun pattern with snake_case and the suffix '_israel', making them predictable.
Four tools is appropriate for a focused weather scraping assistant, covering the essential steps without excess.
Covers the main workflow but lacks error handling or a tool to explicitly submit the search, leaving minor gaps.
Maintenance
Related MCP Connectors
Current weather and forecast lookup as an agent tool.
US NWS weather alerts and 5-day forecasts for AI agents. $0.01 per call.
US weather & geo for AI agents: forecasts, alerts, earthquakes, elevation, geocoding. No keys.
US weather & geo for AI agents: forecasts, alerts, earthquakes, elevation, geocoding. No keys.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables fetching weather forecasts for the USA via NWS API and for Israel via browser automation using Playwright.-
- FlicenseAqualityDmaintenanceEnables LLMs to retrieve weather forecasts for Israeli cities via browser automation and USA weather via API, maintaining state across tool calls for sequential operations.4-
- FlicenseBqualityDmaintenanceProvides weather information to LLM agents via two implementations: USA using National Weather Service API and Israel using Playwright browser automation.2-
- FlicenseNot gradedqualityDmaintenanceEnables natural language weather queries for Israeli cities with real-time data extracted via Playwright, plus USA weather alerts and forecasts via NWS API, all orchestrated by Groq LLM.1-