Weather Israel MCP Server
AI Weather Agent(MCP、Gemini、Playwright を使用)
概要
このプロジェクトは、Model Context Protocol (MCP)、Google Gemini、Playwright を使用して、イスラエルの都市の現在の天気情報を取得する AI エージェントを実装します。
ユーザーが都市の天気を尋ねると、エージェントは天気ウェブサイトを開き、要求された都市を検索し、ページから天気情報を抽出して、ウェブサイトの内容に基づいて回答を返します。
このプロジェクトには、最終的な回答を生成する前に、ウェブページから天気情報を抽出して言語モデルに追加コンテキストとして提供する、シンプルな検索ステップも含まれています。
Related MCP server: Israel Weather MCP Server
技術
Python
Google Gemini API
MCP (Model Context Protocol)
Playwright
AsyncIO
python-dotenv
プロジェクト構成
host.py # Main chat application
client.py # MCP client
weather_Israel.py # MCP weather server
README.md
requirements.txt仕組み
ユーザーがイスラエルの都市の天気を尋ねます。
Gemini が適切な MCP ツールを選択します。
Playwright が天気ウェブサイトを開きます。
要求された都市が検索ボックスに入力されます。
オートコンプリートリストから都市が選択されます。
天気ページが読み込まれます。
ページから天気情報が抽出されます。
抽出されたテキストが Gemini に返されます。
Gemini は抽出された情報を使用して最終的な回答を生成します。
特徴
イスラエルの都市の天気クエリをサポートします。
都市名をヘブライ語または英語で受け付けます。
Playwright を使用して実際の天気ウェブサイトを操作します。
ウェブサイトから天気情報を直接抽出します。
回答前に抽出されたコンテンツを言語モデルに提供します。
モデルの内部知識に頼るのではなく、ウェブサイトのコンテンツを使用します。
インストール
リポジトリをクローンします:
git clone https://github.com/YisNiz/AI-MCP-with-RAG-project必要なパッケージをインストールします:
pip install -r requirements.txt以下を含む .env ファイルを作成します:
GEMINI_API_KEY=YOUR_API_KEYPlaywright ブラウザをインストールします:
playwright installプロジェクトを実行します:
python host.py質問例
エルサレムの天気は?
テルアビブの天気
מזג האוויר בחיפה
מה מזג האוויר בבאר שבע?
注記
天気情報は実際の天気ウェブサイトから取得されます。
言語モデルは、抽出されたウェブサイトのコンテンツを使用して回答するように指示されます。
このプロジェクトは、LLM と MCP ツールおよびブラウザ自動化の統合を示しています。
著者
Yisca Nazri
This server cannot be deployed
Maintenance
Related MCP Connectors
Get current weather for any city and create images from your prompts. Streamline planning, reports…
Web scraping, browser automation, screenshots and AI data extraction for AI agents via MCP.
Weather, code search, currency & Solana trust scoring as MCP tools. Free, no API key needed.
Web search, scraping, RAG answers with citations, and translation as MCP tools.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables users to retrieve real-time weather forecasts for Israeli cities by autonomously browsing a weather website using Playwright.-
- FlicenseNot gradedqualityDmaintenanceProvides LLMs with real-time weather forecasts for Israeli cities using browser automation with Playwright to scrape live data from a weather website.-
- FlicenseNot gradedqualityDmaintenanceRetrieves current weather information for Israeli cities by scraping a live weather website using Playwright, and provides the data to the language model as context.-
- FlicenseNot gradedqualityCmaintenanceEnables LLMs to fetch real-time, localized weather forecasts for Israeli cities by using Playwright to autonomously navigate and scrape weather2day.co.il, including handling Hebrew queries and stateful web interactions.-