mcp-weather-israel-playwright
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@mcp-weather-israel-playwrightwhat's the weather forecast for Tel Aviv tomorrow?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
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.
Related MCP server: MCP Playwright Weather Israel
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 chromiumStart the host (terminal chat interface):
uv run host.pyIn 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.
Available Tools
4 toolsenter_weather_search_israelA
Enter the city name into the search field and wait for autocomplete results.
This uses the shared Page in _PLAYWRIGHT_CONTEXT so open_weather_forecast_israel
should be called first.
| Name | Required | Description | Default |
|---|---|---|---|
| city | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Since no annotations are provided, the description carries the full burden. It discloses key behavioral traits: the tool interacts with a shared page context, waits for autocomplete results, and requires prior initialization. This is adequate, though it doesn't mention timeout behavior or error states.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is two sentences, front-loading the core action. The second sentence adds essential usage context. It is concise but could be more compact—e.g., combining the prerequisite note into the first sentence.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the simple parameter set (1 required string), the existence of an output schema (likely for the autocomplete results), and sibling tools, the description covers the key interaction flow. It provides prerequisite guidance and action semantics. A mention of what happens after autocomplete (e.g., next tool to use) would increase completeness.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 0% (only one parameter with no description), so the description must compensate. The description explains what the 'city' parameter is used for: entering into a search field. This adds meaning beyond the bare schema property definition. A brief note on format or examples would improve it further.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action (enter city name into search field) and the expected behavior (wait for autocomplete results). It is specific about the resource (search field) and the interaction type. However, it does not explicitly reference the tool name's 'weather search Israel' context, which is implied.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description mentions that open_weather_forecast_israel should be called first, providing explicit prerequisite guidance. However, it does not address when to use this tool vs alternatives like select_weather_forecast_city_israel, or what to do if autocomplete fails.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
extract_weather_data_israelA
Extract and clean the visible forecast text from the current page.
This expects that a forecast page is already loaded in the shared Page (i.e., after select_weather_forecast_city_israel). It will attempt to extract the main forecast container text and remove obvious noise like advertisements, links, and short UI strings.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description must disclose behavioral traits. It states the tool will 'attempt' extraction (indicating potential failure) and remove 'obvious noise like advertisements, links, and short UI strings'. However, it does not specify what happens if no forecast is found or if extraction fails, leaving gaps in behavioral expectation.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is two sentences—the first states the core purpose, the second adds essential context (precondition and noise removal). Every sentence earns its place; there is no redundancy or extraneous detail.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool has no parameters and an output schema (from context signals), the description covers all needed context: what the tool does, expected preconditions, and what noise is cleaned. The presence of an output schema means return values need not be described. The description is complete for agent decision-making.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The tool has zero parameters, and schema description coverage is 100% as there is nothing to document. The baseline per rubric is 4 for no parameters. The description adds no parameter info (unnecessary) and instead explains the tool's operation, which aligns with a score of 4.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the verb 'extract' and resource 'visible forecast text from the current page'. It differentiates from sibling tools (which handle navigation and selection) by specifying that extraction occurs after the forecast page is loaded, establishing a unique role in the workflow.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description explicitly states a precondition: the forecast page must already be loaded, specifically after calling 'select_weather_forecast_city_israel'. This provides clear context for when to use the tool. It does not list exclusions or alternative tools, but the sequential dependency is sufficient given the sibling context.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
open_weather_forecast_israelA
Open the forecast site and keep the browser/page open for subsequent tools.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries full burden. It discloses the key behavior (opens and keeps page open), but lacks details about side effects (e.g., navigation, loading state, error handling). Transparency is adequate but not deep.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Description is a single concise sentence, front-loaded with the action. Every word earns its place; there is no wasted text. Excellent structure for quick agent comprehension.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The tool is simple (no parameters, straightforward action). An output schema exists but is not mentioned; however, the rule says description needn't explain return values if output schema is present. The description could hint at what the tool returns (e.g., page handle), but it is complete enough for its role as an opener.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The tool has zero parameters and schema coverage is 100%. Description adds no parameter info, but none is needed. For a parameterless tool, baseline is 4; the description simply confirms the tool's action, which is sufficient.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Description states a specific verb ('Open') and resource ('forecast site for Israel'), clearly distinguishing it from sibling tools like enter_weather_search_israel or extract_weather_data_israel. The additional detail 'keep the browser/page open for subsequent tools' further clarifies its role as an initial setup action.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The phrase 'for subsequent tools' implies a sequencing hint, but the description does not explicitly state when to use this tool versus alternatives (e.g., 'Use first, before other weather tools'). There is no guidance on prerequisites or when not to use it.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
select_weather_forecast_city_israelA
Select the first autocomplete result (or press Enter) and wait for forecast page to load.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden. It discloses that the tool waits for loading, but does not explain error states (e.g., no autocomplete, failed navigation) or whether the action is blocking. Partial disclosure.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Single sentence, front-loaded with the verb 'Select', and includes an alternative action ('or press Enter'). No wasted words; concise and direct.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple UI interaction with no parameters, the description covers the core behavior. It lacks details on return value (though output schema exists) and prerequisites, but is functionally complete for its scope.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
There are zero parameters, so the baseline is 4. The description adds no parameter-specific info, but none is needed. It does mention 'first autocomplete result,' which is a behavioral constant, not a parameter.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action: 'Select the first autocomplete result (or press Enter) and wait for forecast page to load.' This distinguishes it from sibling tools (open, enter, extract) by specifying the exact UI step.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies the tool follows a search action (likely sibling enter_weather_search_israel), but it does not explicitly state when to use it versus alternatives or what conditions must be met (e.g., autocomplete must be visible). Usage context is vague.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
4 tool updates
v0.1.0- First observed
enter_weather_search_israel - First observed
extract_weather_data_israel - First observed
open_weather_forecast_israel - First observed
select_weather_forecast_city_israel
TDQS
Each tool has a distinct step in a clear workflow: open site, search, select city, extract data. No overlapping responsibilities.
All tools follow a consistent verb_weather_forecast_city_israel snake_case pattern, making the purpose of each clear.
With 4 tools, the set is well-scoped for the specific task of fetching a weather forecast for an Israeli city. No unnecessary tools or omissions.
The tools cover the primary workflow, but lack error recovery or reset capabilities (e.g., no tool to handle failed city lookup or restart from scratch). Still sufficient for the intended use case.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Web search, browser automation, scraping, crawling and CAPTCHA solving for AI agents.
1168Get current weather for any city and create images from your prompts. Streamline planning, reports…
AI-powered browser automation — navigate, click, fill forms, and extract data from any website.
Provides cloud browser automation capabilities using Stagehand and Browserbase, enabling LLMs to i…
Related MCP Servers
- FlicenseBqualityDmaintenanceEnables LLMs to query real-time weather data in Israel by automating a browser to scrape weather2day.co.il.4-
- FlicenseAqualityCmaintenanceEnables an LLM to retrieve Israeli weather forecasts by controlling a real Chromium browser to search and scrape a weather site.5-
- FlicenseNot gradedqualityCmaintenanceEnables LLMs to retrieve Israeli weather forecasts by controlling a browser via Playwright and scraping data from an Israeli weather website.-
- FlicenseAqualityCmaintenanceEnables LLMs to fetch Israeli weather forecasts by automating a browser to navigate Weather2Day, providing tools for city search and content extraction.4-
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/esty783/mcp-weather-israel-playwright'
If you have feedback or need assistance with the MCP directory API, please join our Discord server