Skip to main content
Glama

šŸŒ¦ļø Weather Israel MCP

An MCP (Model Context Protocol) project that lets an LLM pull weather forecasts for cities in Israel — directly from the browser, no API, using Playwright.


šŸŽÆ Project Goal

Instead of relying on a built-in API, the Agent opens a Chrome browser, navigates to the weather2day.co.il site, searches for a city, selects it from the list — and then reads the page content and provides a full forecast.


Related MCP server: Israeli Weather MCP

šŸ› ļø Tech Stack

Tool

Role

MCP SDK

Defining Tools and running the MCP server

Playwright

Browser control — navigation, typing, clicking

OpenAI API

The language model that manages the conversation

uv

Environment and dependency management


šŸ“ Project Structure

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     # ×Ŗ×œ×•×™×•×Ŗ ×”×¤×Ø×•×™×§×˜

šŸš€ Running the Project

1. Installing Dependencies

uv sync

2. Installing Chrome Browser for Playwright

uv run playwright install chromium

3. Setting Up the API Key

Create a .env file in the directory:

OPENAI_API_KEY=your_openai_api_key_here

4. Running

uv run host.py

šŸ’¬ Example Questions

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?

🧩 The weather_Israel MCP Tools

Tool

Description

open_weather_forecast_israel

Opens a browser and navigates to the weather site

enter_weather_forecast_city_israel

Types a city name in the search field

select_weather_forecast_city_israel

Selects the matching city from the dropdown list

extract_weather_data_from_page

Reads the page content and returns the forecast to the LLM (RAG)


🧩 The weather_USA MCP Tools

Tool

Description

get_alerts_in_USA

Returns weather alerts by state code (e.g. CA, NY)

get_forecast_in_USA

Returns a forecast by geographic coordinates

Available Tools

4 tools
enter_weather_forecast_city_israelC

×”×–× ×Ŗ שם העיר בשדה החיפוש.

Inputs: city_name (required).

extract_weather_data_from_pageA

מחלׄ את ×Ŗ×•×›×Ÿ הטקהט מהדף הנוכחי כדי שה-LLM יוכל ×œ×§×Ø×•× את ×”×Ŗ×—×–×™×Ŗ. זהו שלב ה-RAG שמהפק קונטקהט למודל.

Inputs: no named parameters.

open_weather_forecast_israelA

פתיחת האתר וניווט לדף ×”×Ŗ×—×–×™×Ŗ.

Inputs: no named parameters.

select_weather_forecast_city_israelB

בחירת העיר ×ž×”×Ø×©×™×ž×” הנפתחת.

Inputs: no named parameters.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.4/5.0

    Scored across 4 tools

    Disambiguation5/5

    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.

    Naming Consistency4/5

    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.

    Tool Count5/5

    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.

    Completeness4/5

    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.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • F
      license
      Not graded
      quality
      C
      maintenance
      MCP server that lets users obtain current Israeli city weather forecasts. It uses Playwright to browse Weather2day, extract the forecast page, and feed the cleaned data back to the LLM for natural language responses.
      -
    • F
      license
      A
      quality
      D
      maintenance
      An MCP server that provides real-time weather data for Israel by automating browser searches via Playwright. It allows LLMs to get current forecasts for Israeli cities through natural language queries.
      4
      -
    • F
      license
      B
      quality
      D
      maintenance
      MCP server that enables LLMs to retrieve weather forecasts for Israeli cities by automating a browser with Playwright, and also provides US weather alerts and forecasts via NWS API.
      4
      -