mcp-weather-israel-playwright

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.

Category
Visit Server

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):

  1. 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.
  2. 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.
  3. select_weather_forecast_city_israel()

    • Selects the first autocomplete result (or presses Enter) and waits for the forecast page to load.
  4. 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

  1. From the project-template folder:
cd C:\Users\user1\Downloads\dovrot-ai-projects-master\dovrot-ai-projects-master\8-mcp\project-template
uv sync
uv run playwright install chromium
  1. Start the host (terminal chat interface):
uv run host.py
  1. 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.md describing purpose and run instructions.
  • Make sure .env is not committed with real API keys. Use .env.example with placeholders.

Notes and troubleshooting

  • Ensure ANTHROPIC_API_KEY is set in your environment if running with the Anthropic SDK (Claude).
  • If Playwright selectors break (site changed), update the selectors in weather_Israel.py according 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

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.

Official
Featured
TypeScript
Magic Component Platform (MCP)

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.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

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.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

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.

Official
Featured
TypeScript
Kagi MCP Server

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.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

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.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured