mcp-weather-israel-playwright
Enables LLMs to fetch live weather forecasts for Israeli cities by controlling a Chromium browser to scrape weather data from weather2day.co.il.
README
MCP with Playwright - Weather (Israel)
This project is the MCP (Model Context Protocol) assignment from Malka Baruch's course: "MCP with Playwright".
Project purpose
The MCP server provides weather forecasts for Israeli cities using Playwright to drive a real browser and scrape data from https://www.weather2day.co.il/forecast. The goal is to enable an LLM (Claude) to control a browser through exposed Tools so it can retrieve live web data without a traditional API.
What I implemented
Tools (MCP server - weather_Israel.py):
-
open_weather_forecast_israel()- Opens a Chromium browser (headless=False) and navigates to the forecast site. Keeps the browser and Page instances in a global context to persist between Tool calls.
-
enter_weather_search_israel(city: str)- Types the given city name into the site's search field and waits for the autocomplete list to appear.
-
select_weather_forecast_city_israel()- Selects the first autocomplete result (or presses Enter) and waits for the forecast page to load.
-
extract_weather_data_israel()- Extracts the visible forecast text from the loaded page and performs cleaning to remove advertisements and UI noise so the LLM receives only useful weather data.
How to run
- From the
project-templatefolder:
cd C:\Users\user1\Downloads\dovrot-ai-projects-master\dovrot-ai-projects-master\8-mcp\project-template
uv sync
uv run playwright install chromium
- Start the host (terminal chat interface):
uv run host.py
- In the host chat prompt, ask a question such as:
- "מה התחזית בתל אביב היום?"
- "תן חיזוי גשם בתל אביב מחר"
The host should route the request to the weather-Israel MCP and the LLM will call the Tools in sequence (open → enter → select → extract) to fetch and return the forecast.
Submission instructions
- Push the repository to GitHub as a public repo.
- Include this
README.mddescribing purpose and run instructions. - Make sure
.envis not committed with real API keys. Use.env.examplewith placeholders.
Notes and troubleshooting
- Ensure
ANTHROPIC_API_KEYis set in your environment if running with the Anthropic SDK (Claude). - If Playwright selectors break (site changed), update the selectors in
weather_Israel.pyaccording to the site's HTML (inspect with DevTools).
This README follows the course submission guidelines: purpose, run steps, and example queries.
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.