Weather-MCP
🌤️ — Pronóstico del tiempo en Israel
Proyecto de aprendizaje en desarrollo de MCP (Model Context Protocol): un agente (Agent) basado en LLM que sabe obtener el pronóstico del tiempo para ciudades en Israel y EE. UU., y responder sobre ello en lenguaje libre en el chat de la terminal.
🎯 Objetivo del proyecto
Construir un servidor MCP dedicado que "enseña" al LLM a realizar una tarea que no sabe hacer solo — obtener el pronóstico del tiempo de un sitio israelí que no tiene API.
El agente lo hace de dos maneras:
Servidor de Israel (
weather-Israel) — automatiza un navegador real con Playwright: abre weather2day.co.il/forecast, busca una ciudad, la selecciona, y luego extrae el contenido de la página del pronóstico y lo alimenta al LLM para que responda por sí mismo (enfoque RAG).Servidor de EE. UU. (
weather-USA) — obtiene el pronóstico y alertas a través de la API oficial del NWS (National Weather Service).
El Host conecta todos los servidores al LLM (Gemini, a través de la API compatible con OpenAI), recopila automáticamente todas las Tools de ellos, y ejecuta un bucle de chat donde el LLM elige qué herramienta usar y las activa una tras otra hasta obtener una respuesta.
Related MCP server: mcp-playwright-weather-israel
🏗️ Estructura del proyecto
project-template/
├── host.py # צ'אט בטרמינל שמחבר את ה-LLM לכל שרתי ה-MCP
├── client.py # MCP Client גנרי (מתחבר לשרת, מריץ Tools)
├── weather_USA.py # שרת MCP לארה"ב — דרך NWS API
├── weather_Israel.py # שרת MCP לישראל — דרך אטמוט דפדפן (Playwright)
├── pyproject.toml # תלויות הפרויקט
└── README.mdLas Tools del servidor de Israel
# | Tool | Función |
1 |
| Abre un navegador Chromium y navega al sitio del pronóstico |
2 |
| Escribe el nombre de una ciudad en el campo de búsqueda |
3 |
| Selecciona la primera ciudad de la lista de sugerencias |
4 |
| Extrae el contenido de la página del pronóstico (incluidos iframes) y lo devuelve al LLM |
💡 Los tres primeros comparten el mismo navegador a través de un estado global (
_page), porque todos se ejecutan en el mismo proceso de servidor. El cuarto recorre todos los frames de la página, porque el pronóstico en sí se carga dentro de un<iframe>que elbodyprincipal no ve.
⚙️ Instalación y ejecución
Requisitos previos
Python ≥ 3.13
uv (gestor de entorno y dependencias)
Clave de API para Gemini (obtener clave gratuita)
Pasos
# 1. התקנת התלויות והקמת סביבת העבודה
uv sync
# 2. התקנת דפדפן Chromium עבור Playwright
uv run playwright install chromiumConfiguración de variables de entorno
Creen un archivo .env en la carpeta del proyecto:
GEMINI_API_KEY=your_api_key_here
GEMINI_MODEL=gemini-2.0-flashEjecución
uv run host.pyDespués de la activación aparecerá la línea Query: — escriban una pregunta (o quit para salir).
💬 Ejemplos de preguntas que el agente sabe responder
Pronóstico en Israel (Playwright)
Se abre una ventana del navegador donde se ve la página del pronóstico, y el LLM también responde en el chat.
"¿Cuál es el pronóstico en Tel Aviv?"
"¿Cuántos grados se esperan mañana en Jerusalén?"
"¿Cómo está el clima en Haifa hoy?"
"Ábreme el pronóstico para Beerseba"
Pronóstico y alertas en EE. UU. (NWS API)
"What's the weather forecast for San Francisco?" (latitude/longitude)
"Are there any weather alerts in California?"
"Show me active weather alerts for NY"
🧩 Cómo funciona (diagrama de flujo)
משתמש → "מה התחזית בתל אביב?"
│
▼
Host ──► LLM (Gemini) בוחר Tools להפעיל
│
▼ (שרת ישראל, בזה אחר זה)
open → enter("תל אביב") → select → get_content
│
▼
תוכן התחזית חוזר ל-LLM (RAG)
│
▼
LLM כותב תשובה בשפה חופשית בצ'אט ✨📝 Notas
El LLM es quien decide qué Tools activar y en qué orden — no escribimos lógica rígida.
Dos archivos de servidor = dos procesos separados, por lo tanto cualquier estado compartido (como el navegador abierto) vive dentro de un solo servidor.
This server cannot be installed
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 Servers
- FlicenseAqualityCmaintenanceMCP server enabling LLMs to fetch Israeli weather forecasts by automating a browser with Playwright to scrape weather2day.co.il.4
- 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 lets users obtain current Israeli city weather forecasts. It uses Playwright to browse Weather2day, extract the forecast page, and feed the cleaned data back to the LLM for natural language responses.
- FlicenseAqualityCmaintenanceAn MCP server that provides real-time weather data for Israel by automating browser searches via Playwright. It allows LLMs to get current forecasts for Israeli cities through natural language queries.4
Related MCP Connectors
MCP server for AI dialogue using various LLM models via AceDataCloud
MCP server exposing the Backtest360 engine API as tools for AI agents.
Hosted MCP server to manage a restaurant menu from AI agents - 39 tools over the DuckHub API.
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/Efrat-Fr/Weather-MCP'
If you have feedback or need assistance with the MCP directory API, please join our Discord server