Skip to main content
Glama
israel-weather-mcp

israel-weather-mcp

by YL4279

Israel Weather MCP

Project Description

This project implements a dedicated MCP Server for retrieving weather forecasts for cities in Israel.

Unlike an implementation based on an external API, this project performs the retrieval using Playwright, which simulates the actions of a human user in a browser: opening the weather site, entering a city name, selecting the city from the dropdown list, and retrieving the forecast data from the results page.

The purpose of the project is to demonstrate how the capabilities of an LLM can be extended using MCP and browser automation tools, so that the model is able not only to answer questions but also to perform actual actions in order to gather information.


Related MCP server: mcp-playwright-weather-israel

Learning Objectives

The following capabilities were implemented as part of the project:

  • Implementing a standalone MCP Server

  • Exposing Tools for use by an LLM

  • Using Playwright for browser automation

  • Fetching information from a website and returning it in a clean textual format


Technologies

  • Python

  • MCP SDK

  • Playwright

  • Local Google Chrome


Project Structure

project-template/

├── client.py

├── host.py

├── weather_USA.py

├── weather_Israel.py

└── README.md


How to Run

Installing dependencies:

uv sync

Running the project:

uv run host.py


Setting Up Local Chrome

The project uses a local Chrome browser.

In the file weather_Israel.py, the path to the executable file must be set:

LOCAL_CHROME = r"C:\Program Files\Google\Chrome\Application\chrome.exe"

If Chrome is installed in a different path, update it accordingly.


The Tools Implemented

open_weather_forecast_israel

Opens the weather site.

enter_weather_forecast_city_israel

Enters the city name in the search field.

select_weather_forecast_city_israel

Selects the city from the autocomplete list.

get_weather_forecast_israel

Runs the full sequence of actions, extracts the data from the page, and returns a clean forecast for use by the LLM.


Example Queries

What is the weather in Jerusalem?

What is the forecast in Haifa?

What is the weather in Tel Aviv?


Example Output

City: Jerusalem

Temperature: 11.8°

Last update: 19:10

Humidity: 71%

Wind: 15.8 km/h


Summary

The project demonstrates how MCP and Playwright can be used to allow an LLM to interact with a real website, gather information in real time, and return a focused and relevant answer to the user.

Available Tools

4 tools
enter_weather_forecast_city_israelC

מזין עיר בתיבת החיפוש.

Inputs: city (required). Returns: result

get_weather_forecast_israelC

מבצע את כל הזרימה ומחזיר תחזית נקייה.

Inputs: city. Returns: result

open_weather_forecast_israelC

פותח את אתר התחזית.

Inputs: no named parameters. Returns: result

select_weather_forecast_city_israelC

בוחר את העיר מהרשימה הנפתחת.

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

    C2.8/5.0

    Scored across 4 tools

    Disambiguation3/5

    The composite get_weather_forecast_israel performs the entire flow, making the three granular browser-step tools (open, enter, select) redundant and raising 'when to use which' confusion. Descriptions clarify each step's action, but the boundaries between the composite and its sub-steps overlap significantly.

    Naming Consistency5/5

    All four tools follow a consistent snake_case verb_noun pattern with the same weather_forecast..._israel stem. The naming is fully predictable and easy to parse.

    Tool Count3/5

    Four tools is a reasonable raw count, but three are subsumed by the single composite tool, so effectively only one tool earns its place. The set is borderline redundant rather than well-scoped.

    Completeness4/5

    The core task—retrieving a clean weather forecast for an Israeli city—is covered by get_weather_forecast_israel. For this narrow domain there are no obvious missing lifecycle operations, though multi-city or forecast-detail coverage is not evident.

    Related MCP Connectors

    Related MCP Servers