Israel Weather MCP Agent
MCP server that enables users to get real-time weather forecasts for Israeli cities by automating a browser with Playwright and using Gemini to answer natural language queries.
README
š¤ļø Israel Weather MCP Agent with Playwright
An autonomous AI Agent built with the Model Context Protocol (MCP) and Playwright, designed to fetch real-time weather forecasts in Israel directly from Weather2Day using browser automation.
š Project Overview
Instead of relying on standard APIs, this project implements a custom MCP Server that places an LLM (Gemini) "in the driver's seat" of a real browser.
The agent can:
- Open a Chromium browser via Playwright and navigate to the weather portal.
- Locate the search input (
#city_search_forecast) and type the requested Israeli city. - Select the city from the dropdown list.
- Extract the forecast text from the resulting page and feed it back to the LLM (implementing a local RAG approach) so it can answer the user's question naturally.
š ļø Tech Stack
- Model Context Protocol (MCP): The official protocol for exposing local tools to LLMs.
- Playwright: Microsoft's browser automation library for handling UI interactions.
- Google Gemini API (
google.generativeai): The core LLM powering the agent's decision-making and response generation. - Python & Asyncio: Managing asynchronous execution and server-client communication.
š Getting Started
1. Prerequisites
Make sure you have uv installed on your machine.
2. Installation
Clone the repository and install dependencies:
uv sync
Install the Playwright browser binaries:
Bash uv run playwright install chromium
3. Environment Variables
Create a .env file in the root directory and add your Google Gemini API key:
×§××¢ ×§×× GOOGLE_API_KEY=your_gemini_api_key_here ā¶ļø Running the Project Start the terminal chat host:
Bash uv run host.py
Example Queries to Try:
"What is the weather like in Jerusalem?"
"Can you check the forecast for Tel Aviv?"
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.