Weather-MCP
🌤️ — イスラエルの天気予報
**MCP(Model Context Protocol)**開発の学習プロジェクト:イスラエルと米国の都市の天気予報を取得し、ターミナルのチャットで自由な言語で回答できるLLMベースのエージェント(Agent)。
🎯 プロジェクトの目的
LLMが単独ではできないタスク——APIを持たないイスラエルのサイトから天気予報を取得すること——を「教える」専用のMCPサーバーを構築します。
エージェントはこれを2つの方法で行います:
イスラエルサーバー(
weather-Israel) — Playwrightで実際のブラウザを自動操作します:weather2day.co.il/forecastを開き、都市を検索して選択し、予報ページのコンテンツを抽出してLLMに供給し、LLM自身が回答します(RAGアプローチ)。米国サーバー(
weather-USA) — NWS(National Weather Service)の公式APIを通じて予報と警報を取得します。
HostはすべてのサーバーをLLM(Gemini、OpenAI互換API経由)に接続し、サーバーからすべてのToolsを自動的に収集し、LLMがどのツールを使用するかを選択して、回答が得られるまでそれらを次々に実行するチャットループを実行します。
Related MCP server: mcp-playwright-weather-israel
🏗️ プロジェクト構造
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.mdイスラエルサーバーのTools
# | Tool | 役割 |
1 |
| Chromiumブラウザを開いて予報サイトに移動する |
2 |
| 検索フィールドに都市名を入力する |
3 |
| 候補リストから最初の都市を選択する |
4 |
| 予報ページのコンテンツ(iframesを含む)を抽出してLLMに返す |
💡 最初の3つは、すべて同じサーバープロセスで実行されるため、グローバル状態(
_page)を介して同じブラウザを共有します。4つ目は、予報自体がメインのbodyからは見えない<iframe>内に読み込まれるため、ページ上のすべてのframesを調べます。
⚙️ インストールと実行
前提条件
手順
# 1. התקנת התלויות והקמת סביבת העבודה
uv sync
# 2. התקנת דפדפן Chromium עבור Playwright
uv run playwright install chromium環境変数の設定
プロジェクトディレクトリに.envファイルを作成します:
GEMINI_API_KEY=your_api_key_here
GEMINI_MODEL=gemini-2.0-flash実行
uv run host.py起動後、Query:プロンプトが表示されます — 質問を入力してください(終了するにはquit)。
💬 エージェントが回答できる質問の例
イスラエルの天気予報(Playwright)
予報ページが表示されたブラウザウィンドウが開き、LLMもチャットで回答します。
「テルアビブの天気予報は?」
「明日のエルサレムの予想気温は?」
「今日のハイファの天気は?」
「ベエルシェバの予報を開いて」
米国の天気予報と警報(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"
🧩 仕組み(フローチャート)
משתמש → "מה התחזית בתל אביב?"
│
▼
Host ──► LLM (Gemini) בוחר Tools להפעיל
│
▼ (שרת ישראל, בזה אחר זה)
open → enter("תל אביב") → select → get_content
│
▼
תוכן התחזית חוזר ל-LLM (RAG)
│
▼
LLM כותב תשובה בשפה חופשית בצ'אט ✨📝 メモ
LLMがどのToolsを実行するか、どの順序で実行するかを決定します — ハードコードされたロジックは書いていません。
サーバーファイルが2つ = 別々のプロセスが2つ。したがって、共有状態(開いているブラウザなど)は1つのサーバー内にのみ存在します。
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