Skip to main content
Glama

๐ŸŒฆ๏ธ 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 flow

The Israeli Server's Tools

Tool

What it does

open_weather_forecast_israel

Opens a browser and navigates to the forecast page

enter_weather_forecast_city_israel

Types a city name into the search field (and reports the suggestions)

select_weather_forecast_city_israel

Selects the first item in the autocomplete list

get_weather_forecast_content_israel

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.py

Quick 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

  1. The Host (host.py) launches each MCP server as a child process and opens a stdio session with it (via the generic Client in client.py).

  2. The Host discovers each server's tools and attaches them to every LLM (Gemini) call.

  3. 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.

  4. 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.py

Available Tools

4 tools
enter_weather_forecast_city_israelB

Type a city name into the search field on the forecast page.

Args: city: City name in Hebrew (e.g. 'ืชืœ ืื‘ื™ื‘', 'ื™ืจื•ืฉืœื™ื', 'ื—ื™ืคื”')

ParametersJSON Schema
NameRequiredDescriptionDefault
cityYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

B3.2/5.0
Behavior2/5

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.

Conciseness5/5

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.

Completeness3/5

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.

Parameters4/5

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.

Purpose4/5

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.

Usage Guidelines2/5

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.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4/5.0
Behavior2/5

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.

Conciseness5/5

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.

Completeness4/5

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.

Parameters4/5

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.

Purpose5/5

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.

Usage Guidelines4/5

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.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4.7/5.0
Behavior4/5

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.

Conciseness5/5

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.

Completeness5/5

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.

Parameters4/5

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.

Purpose5/5

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.

Usage Guidelines5/5

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.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A3.9/5.0
Behavior3/5

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.

Conciseness5/5

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.

Completeness3/5

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.

Parameters4/5

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.

Purpose5/5

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.

Usage Guidelines3/5

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

A4.1/5.0
Disambiguation5/5

Each tool handles a distinct, sequential step: open site, enter city, select suggestion, extract content. No overlap or ambiguity between them.

Naming Consistency5/5

All names follow a predictable action_weather_forecast_..._israel pattern with snake_case. The pattern is consistent and readable.

Tool Count5/5

4 tools perfectly cover the browser-based workflow for this narrow purpose. Not too sparse, not bloated.

Completeness5/5

The tool set forms a complete, linear workflow from opening the site to extracting forecast content. No obvious gaps for the stated domain.

Maintenance

ActivitySlowing
ResponsivenessNo issues

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

Related MCP Servers

Latest Blog Posts

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