Israel Weather MCP
Click on "Install 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., "@Israel Weather MCPWhat's the weather in Jerusalem today?"
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.
Israel Weather MCP - Groq + Playwright Integration
A production-ready Model Context Protocol (MCP) implementation that provides real-time weather forecasts for Israeli cities using Groq LLM and Playwright browser automation.
Overview
This project demonstrates an advanced MCP architecture combining:
Groq for fast, cost-effective LLM inference
Playwright for reliable web automation and data extraction
Weather2Day (https://www.weather2day.co.il) as the data source
MCP (Model Context Protocol) for standardized tool integration
The system provides a natural language interface to weather queries, automatically navigating the Weather2Day website and extracting real-time forecast data.
Related MCP server: Weather MCP Agent
Architecture
┌─────────────────┐
│ User Query │
│ "Weather in │
│ Jerusalem?" │
└────────┬────────┘
│
▼
┌─────────────────────────────┐
│ Groq LLM │
│ (llama-3.1-8b-instant) │
│ - Orchestrates workflow │
│ - Calls MCP tools │
│ - Generates final answer │
└────────┬────────────────────┘
│
▼
┌─────────────────────────────────┐
│ MCP Host (host.py) │
│ - Manages tool registry │
│ - Routes tool calls │
│ - Handles MCP protocols │
└────────┬──────────────────┬─────┘
│ │
▼ ▼
┌──────────┐ ┌──────────┐
│ Israel │ │ USA │
│ Weather │ │ Weather │
│ MCP │ │ MCP │
└────┬─────┘ └────┬─────┘
│ │
▼ ▼
┌──────────────┐ ┌──────────────┐
│ Playwright │ │ NWS API │
│ Automation │ │ (REST) │
└────┬─────────┘ └──────────────┘
│
▼
┌──────────────────────────┐
│ Weather2Day Website │
│ (weather2day.co.il) │
└──────────────────────────┘
│
▼
┌──────────────────┐
│ Weather Content │
│ (Real Data) │
└────────┬─────────┘
│
▼
┌──────────────────────────────────┐
│ Groq Final Response │
│ "Today in Jerusalem: │
│ Partly cloudy, 31.7°C..." │
└──────────────────────────────────┘Key Features
✅ Real-Time Data Extraction
Navigates Weather2Day.co.il automatically using Playwright
Extracts actual forecasts, temperatures, and weather alerts
No static data or fallbacks
✅ Natural Language Interface
Ask questions in Hebrew or English
Groq processes context and automatically executes the right tool sequence
Intelligent tool orchestration
✅ Dual MCP Servers
Israel Weather MCP (
weather_Israel.py): Playwright-based extractionUSA Weather MCP (
weather_USA.py): REST API integration (NWS)
✅ Multi-City Support
Jerusalem, Tel Aviv, Haifa, and 60+ Israeli cities
Any US state (via NWS weather alerts)
✅ Production-Ready Error Handling
Timeout management for network reliability
Fallback selectors for dynamic page content
SSL/TLS proxy compatibility (Netfree, corporate networks)
Technologies
Component | Technology | Version |
LLM | Groq | llama-3.1-8b-instant |
MCP SDK | mcp | ≥1.27.0 |
Browser | Playwright | ≥1.44.0 |
HTTP Client | httpx | ≥0.24.0 |
Config | python-dotenv | ≥1.2.2 |
Language | Python | ≥3.13 |
Installation
Step 1: Clone Repository
git clone <repo-url>
cd weather-chat_mcpStep 2: Install Python Dependencies
uv pip install -r pyproject.tomlOr using uv directly:
uv syncStep 3: Install Playwright Chromium
Important: Playwright requires the Chromium browser to be installed.
playwright install chromiumOn Linux, you may also need system dependencies:
# Ubuntu/Debian
sudo apt-get install libglib2.0-0 libdbus-1-3 libfontconfig1 libxrender1
# RHEL/CentOS
sudo dnf install glib2 dbus libxrender fontconfigStep 4: Configure Groq API Key
Get your Groq API key from: https://console.groq.com/keys
Create
.envfile in project root:
cp .env.example .envEdit
.envand add your key:
GROQ_API_KEY=your_actual_groq_api_key_hereSecurity: The .env file is automatically excluded from git (see .gitignore).
Running the Project
Start the Interactive Chat Interface
python host.pyYou'll see:
MCP Client Started!
Type your queries or 'quit' to exit.
Connected to server with tools: ['open_weather_forecast_israel', 'enter_weather_forecast_city_israel', 'select_weather_forecast_city_israel', 'get_weather_forecast_content_israel']
Connected to server with tools: ['get_alerts_in_USA', 'get_forecast_in_USA']Example Queries
Hebrew:
Query: מה מזג האוויר בירושלים?
Query: מה התחזוקה עבור תל אביב?English:
Query: What is the weather in Jerusalem?
Query: Show me the forecast for Haifa
Query: What are the weather alerts in California?MCP Tools
Israel Weather MCP (weather_Israel.py)
1. open_weather_forecast_israel()
Opens the Weather2Day forecast website and initializes browser session.
Input: None
Output: Status message or error
Purpose: Step 1 of workflow
2. enter_weather_forecast_city_israel(city: str)
Enters city name in the search field and waits for suggestions.
Input:
city- City name (e.g., "Jerusalem", "ירושלים")Output: Confirmation or error
Purpose: Step 2 of workflow
3. select_weather_forecast_city_israel()
Selects the first city suggestion and loads the forecast page.
Input: None
Output: Confirmation that page loaded
Purpose: Step 3 of workflow
4. get_weather_forecast_content_israel()
Extracts and returns the actual weather forecast content from Weather2Day.
Input: None
Output: Full weather data including temperatures, forecasts, alerts
Purpose: Step 4 of workflow (final extraction)
Workflow: Always execute in order: open → enter(city) → select → extract
USA Weather MCP (weather_USA.py)
1. get_alerts_in_USA(state: str)
Fetches active weather alerts for a US state from NWS API.
Input:
state- Two-letter state code (e.g., "CA", "NY")Output: Active alerts with severity and description
2. get_forecast_in_USA(lat: float, lon: float)
Gets weather forecast for coordinates from NWS API.
Input:
lat,lon- Latitude and longitudeOutput: Forecast data
Browser Automation Details
Playwright Features Used
Headless Chromium for lightweight browser instances
Multiple selector strategies for robust DOM interaction
Network idle detection for page load validation
Async/await for non-blocking execution
Global page state persists across tool calls
Selector Strategies (Weather_Israel.py)
The implementation uses multiple CSS selector fallbacks:
ID-based selectors (most stable)
Placeholder-based selectors (Hebrew attributes)
Class-based selectors
Generic fallbacks (input, button elements)
This approach handles dynamic page updates and unknown DOM structures.
Network Configuration
SSL verification disabled for proxy compatibility (Netfree, corporate networks)
Configurable timeout (30s for navigation, 15s for interactive elements)
Error recovery with fallback mechanisms
Environment Variables
Required
GROQ_API_KEY - Your Groq API key from https://console.groq.com/keys
Optional (internally configured)
All proxy settings are handled automatically via httpx
Playwright runs in headless mode by default
Project Structure
weather-chat_mcp/
├── host.py # Main orchestrator (Groq + MCP coordination)
├── client.py # MCP client implementation (stdio transport)
├── weather_Israel.py # Israel Weather MCP server (Playwright)
├── weather_USA.py # USA Weather MCP server (REST API)
├── pyproject.toml # Dependencies and project metadata
├── .env.example # Environment variable template
├── .env # Actual config (not committed, use .env.example)
├── .gitignore # Git ignore rules
└── README.md # This fileTest Files (Reference)
test_groq_tools.py- Integration testingtest_israel_tools.py- Israel MCP tool testingtest_groq.py- Groq API testingdebug_schemas.py- Tool schema debugging
How It Works
Workflow Example: "What is the weather in Jerusalem?"
1. User Input
└─> "What is the weather in Jerusalem?"
2. Groq LLM Processing
├─> Reads system prompt (Hebrew instructions)
├─> Analyzes user query
└─> Decides to call Israel Weather tools
3. Tool Execution (Groq orchestrates)
├─> Call: open_weather_forecast_israel()
│ └─> Result: Browser navigates to weather2day.co.il
│
├─> Call: enter_weather_forecast_city_israel(city="Jerusalem")
│ └─> Result: City name entered, suggestions available
│
├─> Call: select_weather_forecast_city_israel()
│ └─> Result: Page loads with forecast
│
└─> Call: get_weather_forecast_content_israel()
└─> Result: Raw Weather2Day content
├─> Temperatures: 31.7°C (Jerusalem)
├─> Forecast: "Partly cloudy to clear"
├─> Alerts: Thunderstorm warnings
└─> Tomorrow: "Partly cloudy, slight temp drop"
4. LLM Final Answer
└─> "The forecast in Jerusalem shows partly cloudy weather
with a high of 31.7°C. There's a risk of isolated
thunderstorms in eastern areas. Tonight will be partly cloudy..."Groq's Role
Understands context from system prompt (Hebrew instructions)
Selects appropriate tools (Israel vs USA weather tools)
Orchestrates tool sequence (open → enter → select → extract)
Processes extracted data and generates natural language response
Implements reasoning to handle follow-up questions
Key Design Decisions
1. Global Browser State
Why: Playwright browser instances are expensive to create. Global browser and page variables persist across tool calls, enabling the sequential workflow (open → enter → select → extract).
Alternative: Creating new browser instances per tool would be ~10-20x slower.
2. Multiple Selector Strategies
Why: Weather2Day's HTML structure is dynamic and selectors change with page updates. Multiple fallback strategies ensure reliability.
Example:
search_selectors = [
"#city_search_forecast", # Try ID first
"input[placeholder*='עיר']", # Try Hebrew placeholder
"input[type='search']", # Generic search input
"input", # Last resort
]3. Groq Over OpenAI
Why:
Groq's inference is 100-200x faster than OpenAI
10x cheaper for equivalent performance
Ideal for MCP tool orchestration where latency matters
llama-3.1-8b-instant is sufficient for weather context
4. Playwright Over Selenium
Why:
Native async/await support (non-blocking)
Better event-driven architecture
Modern browser support (Chromium, Firefox, WebKit)
Simpler API for DOM interaction
5. SSL Verification Disabled
Why: Corporate and school networks (e.g., Netfree in Israel) use intercepting proxies that break standard SSL verification. This is a known issue and verify=False is the standard workaround in such environments.
Security Note: This is safe for our use case (public APIs, no credential exchange in transit) and appropriate for enterprise deployments with internal CAs.
Troubleshooting
"GROQ_API_KEY not found"
Error: RuntimeError: GROQ_API_KEY not found in environment...Solution: Create .env file with your Groq key:
cp .env.example .env
# Edit .env and add your GROQ_API_KEY"Playwright not installed"
Error: TimeoutError: Timeout opening Weather2DaySolution: Install Chromium:
playwright install chromium"Connection refused" on other ports
If you get connection errors, the MCP server might be using a different stdio configuration. Ensure host.py and MCP servers are using stdio transport (default).
Weather2Day page structure changed
If selectors stop working:
The extraction tool uses multiple fallback selectors
If all fail, review
weather_Israel.pylines 240-260Update selectors based on actual page HTML (use browser DevTools)
Timeout errors for certain cities
Some cities (Tel Aviv) occasionally timeout due to page rendering delays. Retry or use different cities. This is a known limitation of browser automation on dynamic pages.
Performance Characteristics
Operation | Time | Notes |
Browser launch | 2-3s | One-time, cached |
Page navigation | 3-5s | Network dependent |
City selection | 1-2s | DOM interaction |
Content extraction | 0.5-1s | DOM traversal |
Groq inference | 1-3s | LLM processing |
Total end-to-end | 8-15s | Varies by network |
Limitations
Current
One city at a time - Each query handles single city (by design)
Hebrew-optimized - System prompt is in Hebrew; English queries work but less optimized
Dynamic page timing - Some cities have page rendering delays causing timeouts
Static browser session - Playwright browser persists; restart required to clear state
Not Implemented
Historical weather data
Detailed NOAA integration for USA
Multi-language support (Hebrew/English only)
Caching or rate limiting
User session management
Contributing
To Add Support for New Cities
No changes needed - Weather2Day covers 60+ Israeli cities automatically.
To Add New Data Sources
Create new MCP server (e.g.,
weather_external_source.py)Register in
host.pymcp_clients listAdd tools with
@mcp.tool()decoratorUpdate system prompt if needed
To Change LLM Provider
Replace Groq with any OpenAI-compatible API
Change
self.groq.chat.completions.create()in host.pyEnsure tool format is maintained (OpenAI schema)
License
This project is provided as-is for educational purposes.
References
Groq: https://console.groq.com
MCP Specification: https://modelcontextprotocol.io
Playwright Documentation: https://playwright.dev
Weather2Day: https://www.weather2day.co.il
NWS API: https://www.weather.gov/documentation/services-web-api
Last Updated: 2026-08-16
Status: Production-Ready ✅
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Flicense-qualityDmaintenanceEnables users to query real-time weather data for Israeli cities using natural language, automatically scraping a weather website via Playwright and returning AI-generated answers.
- Flicense-qualityDmaintenanceEnables querying real-time weather data for Israeli cities through natural language, using Playwright to scrape weather2day and Gemini LLM to answer.
- FlicenseAqualityCmaintenanceEnables users to query weather information for Israel via Playwright browser automation and for the USA via a weather API, allowing an LLM to access real-time weather data and alerts.4
- Flicense-qualityCmaintenanceProvides LLMs with real-time weather forecasts for Israeli cities using browser automation with Playwright to scrape live data from a weather website.
Related MCP Connectors
US weather, alerts, earthquakes and elevation for AI agents, from NWS/NOAA and USGS. No API keys.
US weather & geo for AI agents: forecasts, alerts, earthquakes, elevation, geocoding. No keys.
Global weather via Open-Meteo: forecast, ERA5 archive, marine, air quality, geocoding, elevation.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/Sara-gitCount/MCP-with-Playwright'
If you have feedback or need assistance with the MCP directory API, please join our Discord server