Skip to main content
Glama
r0556763949

Weather MCP Server

by r0556763949

# Weather MCP Server šŸŒ¤ļø

## About

This project implements an MCP Server that provides weather information to an LLM Agent.

The project demonstrates two different approaches:

- **USA Weather MCP** - retrieves weather information using the National Weather Service API.

- **Israel Weather MCP** - retrieves weather information using Playwright browser automation from the weather2day website.

The main goal is to demonstrate how an LLM Agent can use MCP Tools to interact with external sources and enrich its context.

---

## Technologies

- Python

- MCP SDK (FastMCP)

- OpenAI API

- Playwright

- httpx

---

## Project Structure


weather-mcp/

│

ā”œā”€ā”€ host.py

ā”œā”€ā”€ client.py

ā”œā”€ā”€ weather\\\_USA.py

ā”œā”€ā”€ weather\\\_Israel.py

└── README.md

---

# šŸ‡ŗšŸ‡ø USA Weather MCP

The USA MCP uses the National Weather Service API.

Available tools:

### get_forecast_in_USA

Returns weather forecast by location coordinates.

Input:

- Latitude

- Longitude

### get_alerts_in_USA

Returns active weather alerts for a USA state.

Input:

- State code (example: CA, NY)

---

# šŸ‡®šŸ‡± Israel Weather MCP

The Israel MCP uses Playwright to automate a browser and extract weather information from:

https://www.weather2day.co.il/forecast

The Agent can:

1. Open the weather website.

2. Enter a city name.

3. Select the requested city.

4. Extract weather information from the page.

5. Use the extracted information to answer the user.

Available tools:

### open_weather_forecast_israel

Opens the weather forecast website.

### enter_weather_forecast_city_israel

Receives a city name and enters it into the search field.

### select_weather_forecast_city_israel

Selects the first city from the autocomplete list.

### extract_weather_forecast_content_israel

Extracts weather information from the selected city page and provides it as context for the LLM.

### close_weather_browser

Closes the browser session.

---

## Installation

Install dependencies:


uv sync

Install Playwright browser:


uv run playwright install chromium

---

## Running

Run the project:


uv run host.py

---

## Example Questions

Israel:


מה מזג האוויר בבני ברק?

USA:


What is the weather in Miami?

---

## Learning Goals

This project demonstrates:

- Building a custom MCP Server

- Creating MCP Tools with FastMCP

- Connecting an LLM Agent to external tools

- Browser automation with Playwright

- Extracting information from websites

- Providing external context to an LLM (RAG)


F
license - not found
-
quality - not tested
C
maintenance

Maintenance

–Maintainers
–Response time
–Release cycle
–Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

View all related MCP servers

Related MCP Connectors

  • US weather, alerts, earthquakes and elevation for AI agents, from NWS/NOAA and USGS. No API keys.

  • US weather & geo for AI agents: forecasts, alerts, earthquakes, elevation, geocoding. No keys.

  • Global weather via Open-Meteo: forecast, ERA5 archive, marine, air quality, geocoding, elevation.

View all MCP Connectors

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/r0556763949/MCP'

If you have feedback or need assistance with the MCP directory API, please join our Discord server