weather-mcp-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., "@weather-mcp-playwrightwhat's the weather in Tel Aviv?"
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.
๐ฆ๏ธ Weather MCP โ Israel via Browser Automation, USA via API
An MCP (Model Context Protocol) project demonstrating two ways to extend an LLM's context with live weather data:
weather_USA.pyโ a "classic" MCP server: fetches forecasts and alerts from the US National Weather Service API (api.weather.gov).weather_Israel.pyโ an MCP server that puts the LLM's hand on the mouse ๐ฑ๏ธ: it launches a real Chromium browser with Playwright, navigates to weather2day.co.il, types a city name into the search box, picks it from the autocomplete list โ and extracts the page content so the LLM can answer the question itself (RAG).
๐งฉ Project Structure
โโโ client.py # Generic MCP client โ connects to any MCP server over stdio
โโโ host.py # Terminal chat: connects Gemini to all MCP servers
โโโ weather_USA.py # MCP server for US forecasts (API)
โโโ weather_Israel.py # MCP server for Israeli forecasts (Playwright)
โโโ test_israel_flow.py # Smoke test for the full Israeli flowThe Israeli Server's Tools
Tool | What it does |
| Opens a browser and navigates to the forecast page |
| Types a city name into the search field (and reports the suggestions) |
| Selects the first item in the autocomplete list |
| Extracts the forecast page content and feeds it to the LLM |
Related MCP server: Israel Weather MCP
๐ Setup & Run
Prerequisites: Python 3.11+, uv.
# 1. Install dependencies
uv sync
# 2. Install Chromium for Playwright
uv run playwright install chromium
# 3. Gemini API key (free, no credit card) โ https://aistudio.google.com/apikey
copy .env.example .env # then edit: GEMINI_API_KEY=...
# 4. Run the chat
uv run host.pyQuick check of the Israeli server without an LLM:
uv run test_israel_flow.py๐ฌ Example Questions
ืื ืืชืืืืช ืืืืื ืืชื ืืืื?(What's today's forecast in Tel Aviv?)ืืืื ืืงืืช ืืืจืื ืืืจ ืืืจืืฉืืื?(Should I take an umbrella tomorrow in Jerusalem?)ืื ืืื ืืืืืืจ ืืืืคื ืืกืืฃ ืืฉืืืข?(What's the weather in Haifa this weekend?)What's the forecast in Chicago?(routed to the US server)Are there weather alerts in California?
While the question is being processed you'll see the browser open, type the city name, and select it from the list โ then the model answers based on the page content.
โ๏ธ How It Works
The Host (
host.py) launches each MCP server as a child process and opens a stdio session with it (via the generic Client inclient.py).The Host discovers each server's tools and attaches them to every LLM (Gemini) call.
When the model detects a question about weather in Israel, it invokes the four tools one after another: open browser โ type city โ select from list โ extract content.
The page content comes back to the model as a tool result, and it composes an answer from it โ RAG over a live web page.
๐ Connecting to Other Hosts (e.g. ChatBox)
The MCP servers are host-agnostic. Connect one to any MCP-capable app with a command like:
uv --directory C:\path\to\project run weather_Israel.pyAvailable Tools
4 toolsenter_weather_forecast_city_israelB
Type a city name into the search field on the forecast page.
Args: city: City name in Hebrew (e.g. 'ืชื ืืืื', 'ืืจืืฉืืื', 'ืืืคื')
| 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?
With no annotations, the description carries the full burden. It only describes the mechanical act of typing, without disclosing what happens after (e.g., pressing Enter, triggering a search, auto-completion, or whether the field retains previous input). This lack of side-effect disclosure is a notable gap for a UI interaction tool.
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 concise: one sentence for the action plus a parameter specification. It is front-loaded with the primary action, and every word earns its place without fluff.
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 description is minimal but sufficient for a simple single-parameter action. However, it lacks context about the relationship to sibling tools (e.g., whether this is a prerequisite for get_weather_forecast_content_israel) and does not describe any output or post-condition. Given the output schema exists, return values are covered, but the overall workflow context is missing.
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 description coverage is 0%, so the description must compensate. It adds meaning by specifying that the city must be in Hebrew and provides concrete examples ('ืชื ืืืื', 'ืืจืืฉืืื', 'ืืืคื'). This goes beyond the bare schema property name and helps the agent select an appropriate value, though it could be more explicit about accepted variants.
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 tool's action: typing a city name into the search field on the forecast page. The verb 'type' and resource 'search field on the forecast page' are specific. It distinguishes from siblings like select_weather_forecast_city_israel and get_weather_forecast_content_israel by focusing on the input action, though it does not explicitly contrast them.
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?
No explicit guidance on when to use this tool vs alternatives. It does not mention when to use select_weather_forecast_city_israel or open_weather_forecast_israel, nor does it state prerequisites or conditions like needing an already-open forecast page.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_weather_forecast_content_israelA
Extract the forecast content from the currently open city forecast page, so it can be used to answer the user's weather question directly.
| 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 the full burden of disclosing behavioral traits. It mentions the 'currently open' prerequisite but does not describe side effects, error behavior, or any requirements beyond that. This is a significant gap for a tool that performs an action.
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 a single, well-structured sentence that front-loads the action and resource, with no redundant or filler content. Every word earns its place.
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's simplicity (zero parameters) and the presence of an output schema, the description adequately covers its role in the workflow. It clearly states what it does and why, though it could add a bit more about the prerequisite state.
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 the baseline for zero-parameter tools is 4. The description does not need to add parameter information beyond the schema, which is already empty and fully described.
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 uses the specific verb 'extract' and identifies the resource as 'forecast content from the currently open city forecast page,' clearly distinguishing it from sibling tools that open, enter, or select the city. This unambiguously states the tool's purpose and scope.
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 'currently open city forecast page' clearly implies the tool should be used after navigation steps (open/enter/select), providing context. However, it does not explicitly name alternatives or state when not to use it, so it falls short of full guidance.
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 a browser and navigate to the Israeli weather forecast site (weather2day.co.il). This must be called first, before entering or selecting a city.
| 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, the description carries the burden of disclosure. It transparently reveals the key side effectโopening a browser and navigating to a siteโand the prerequisite ordering. It does not detail post-navigation behavior, but the output schema likely covers return values. The main behavioral traits are disclosed adequately.
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?
Two short sentences: the first states the core action and target URL, the second gives a crucial ordering instruction. Every word earns its place, with no filler or redundancy.
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's simplicity (0 params, output schema present) and the clear relationship to siblings, the description is complete. It tells the agent what to do, what site to navigate to, and when to do it, which is all that is needed for correct invocation.
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%, so the baseline for 0 params is 4. The description doesn't need to explain parameters since there are none, and it adds no parameter-specific information beyond that.
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 tool opens a browser and navigates to a specific weather forecast site (weather2day.co.il). It identifies the exact resource and action, and the 'must be called first' note differentiates it from sibling tools that enter/select/get city content.
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?
Explicitly instructs that this must be called first, before entering or selecting a city, providing a clear ordering constraint relative to sibling tools. This gives the agent unambiguous guidance on when to use this tool versus the alternatives.
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 city in the autocomplete suggestions list and load its forecast page.
| 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 the core behavior (selecting and loading) but omits potential prerequisites, side effects, or failure modes (e.g., empty suggestions, navigation behavior). Basic but not rich.
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 a single concise sentence, front-loaded with the action and no unnecessary words. Every part contributes meaning.
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, and an output schema exists, so return values need not be explained. However, in the context of sibling tools, the description omits the likely workflow dependency (e.g., needing to enter a city first) and does not address edge cases like an empty suggestion list.
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 schema already covers everything. The description doesn't need to explain any parameters, and the baseline for zero parameters is 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 specific action ('Select the first city'), the target ('in the autocomplete suggestions list'), and the outcome ('load its forecast page'), distinguishing it from sibling tools that open, enter, or get content.
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?
Usage is implied: it must be used when an autocomplete list is present, likely after entering a city. However, there is no explicit guidance on when to use it versus alternatives like enter_weather_forecast_city_israel, nor exclusions.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
TDQS
Each tool handles a distinct, sequential step: open site, enter city, select suggestion, extract content. No overlap or ambiguity between them.
All names follow a predictable action_weather_forecast_..._israel pattern with snake_case. The pattern is consistent and readable.
4 tools perfectly cover the browser-based workflow for this narrow purpose. Not too sparse, not bloated.
The tool set forms a complete, linear workflow from opening the site to extracting forecast content. No obvious gaps for the stated domain.
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
An MCP server for weather information by @kulybaba
An MCP server for weather information by @kulybaba
MCP server for weather with reasoning โ umbrella advice, outdoor checks, city comparisons.
Open-Meteo tabanlฤฑ anahtarsฤฑz hava durumu tahmin MCP sunucusu.
Related MCP Servers
- FlicenseAqualityCmaintenanceAn MCP server that uses Playwright to scrape Israeli weather forecasts from weather2day.co.il by automating a real browser, enabling an LLM to answer questions about current conditions and hourly forecasts for Israeli cities.5
- FlicenseNot gradedqualityCmaintenanceMCP server that provides Israeli weather forecasts using browser automation with Playwright.
- FlicenseNot gradedqualityCmaintenanceMCP 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.
- FlicenseNot gradedqualityCmaintenanceAn MCP server that provides weather forecasts and alerts for the USA and Israel, using the National Weather Service API and Playwright-based browser automation.
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/t0548572430-sys/weather-mcp-playwright'
If you have feedback or need assistance with the MCP directory API, please join our Discord server