Skip to main content
Glama
talya-git

Weather MCP Server

by talya-git

⛅ Weather MCP Server

Protocol: MCP | Python 3.11+ | License: MIT | Status: Active ✅

A robust project implementing the Model Context Protocol (MCP) architecture — an autonomous LLM-powered agent capable of fetching up-to-date weather forecasts for cities in Israel and the United States, providing seamless natural language responses in a terminal chat interface.


Project Overview

This project extends LLM capabilities by granting access to external data sources that are not natively available: retrieving live forecasts from sites that lack an official public API.

The system bridges this gap using two complementary retrieval engines:

#

Information Source

Mechanism & Technical Description

1

Israel Server (weather-Israel)

Browser Automation (Playwright): Launches a headless browser instance navigating to weather2day.co.il/forecast, locates the target city, extracts the page content, and feeds it directly to the LLM for analysis (RAG approach).

2

USA Server (weather-USA)

Official API REST Calls: A lightweight server executing direct REST requests against the official National Weather Service (NWS) API.

The Host layer orchestrates the flow: connecting servers to the language model, dynamically exposing available tools, and managing the conversation loop until the model yields an accurate response.


Workflow Architecture

User: "What's the weather in Tel Aviv?"
    │
    ▼
Host ◄──► LLM autonomously selects and executes tools
    │
    ▼
Israel Server (Sequential pipeline):
open ──► enter("Tel Aviv") ──► select ──► get_content
    │
    ▼
Content analysis (RAG) by LLM
    │
    ▼
✨ Final response generated in natural language