Weather Israel MCP Server
使用 MCP、Gemini 和 Playwright 的 AI 天气代理
概述
本项目实现了一个 AI 代理,使用模型上下文协议(MCP)、Google Gemini 和 Playwright 获取以色列各城市的当前天气信息。
当用户询问某个城市的天气时,代理会打开一个天气网站,搜索所请求的城市,从页面中提取天气信息,并根据网站内容返回答案。
项目还包含一个简单的检索步骤,即从网页中提取天气信息,并在生成最终回答之前将其作为附加上下文提供给语言模型。
Related MCP server: Israel Weather MCP Server
技术
Python
Google Gemini API
MCP(模型上下文协议)
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_KEY安装 Playwright 浏览器:
playwright install运行项目:
python host.py示例问题
耶路撒冷的天气怎么样?
特拉维夫的天气
מזג האוויר בחיפה
מה מזג האוויר בבאר שבע?
备注
天气信息来自实时天气网站。
语言模型被指示使用提取的网站内容进行回答。
该项目演示了 LLM 与 MCP 工具和浏览器自动化的集成。
作者
Yisca Nazri
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
- FlicenseNot gradedqualityDmaintenanceEnables users to retrieve real-time weather forecasts for Israeli cities by autonomously browsing a weather website using Playwright.
- FlicenseNot gradedqualityCmaintenanceProvides LLMs with real-time weather forecasts for Israeli cities using browser automation with Playwright to scrape live data from a weather website.
- FlicenseNot gradedqualityCmaintenanceEnables LLMs to retrieve Israeli weather forecasts by controlling a browser via Playwright and scraping data from an Israeli weather website.
- FlicenseNot gradedqualityBmaintenanceRetrieves current weather information for Israeli cities by scraping a live weather website using Playwright, and provides the data to the language model as context.
Related MCP Connectors
WeatherAPI.com MCP — wraps WeatherAPI.com (api.weatherapi.com)
OpenWeather MCP — wraps the OpenWeatherMap API (openweathermap.org)
Open-Meteo MCP — weather forecast + historical reanalysis + sister APIs
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/leahlevovitz/AI-MCP-with-RAG-project'
If you have feedback or need assistance with the MCP directory API, please join our Discord server