Israel Weather MCP Server
🌤️ Israel Weather MCP Server
一个自定义的 Model Context Protocol (MCP) 服务器,使 LLM 能够获取以色列城市实时、高精度的本地化天气预报。
该代理不依赖通用的全球 API,而是利用 Playwright 自主导航到以色列本地天气门户网站(weather2day.co.il),与 DOM 交互,并将实时数据(RAG)直接提取到聊天上下文中。
🎯 项目目的
本项目探索了在 AI Agent 架构中集成自主浏览器控制的可能性。 实现的主要学习目标包括:
自定义 MCP 服务器开发: 构建专用服务器,向 LLM 暴露特定工具。
通过 AI 实现浏览器自动化: 使用 Microsoft 的
Playwright为 LLM 赋予网络上的"手"和"眼"——使其能够导航、搜索、从自动补全下拉菜单中选择选项,并动态抓取数据。克服语言与状态障碍: 处理有状态的 Web 交互(等待动画、顺序输入),并确保 LLM 在与本地 UI 元素交互之前正确将查询翻译为希伯来语。
Related MCP server: Israeli Weather MCP Agent
🛠️ 技术栈
MCP SDK: 用于定义协议和暴露工具的官方 Anthropic 库。
Playwright: 用于以编程方式控制 Chromium 的现代浏览器自动化工具。
uv: 超快速的 Python 包和环境管理器。
🚀 如何运行
1. 前置条件
确保你的系统已安装 uv。
Windows (PowerShell):
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"Mac/Linux:
curl -LsSf https://astral.sh/uv/install.sh | sh
2. 设置环境
克隆仓库,进入 project-template 文件夹,并同步依赖:
uv sync3. 安装浏览器引擎
安装 Playwright 所需的 Chromium 浏览器:
uv run playwright install chromium4. 启动主机
运行交互式终端聊天,开始与 Agent 通信:
uv run host.py💬 示例查询
主机运行后,你可以向 Agent 提出如下问题:
"耶路撒冷的天气预报是什么?"
"מה מזג האוויר בתל אביב היום?"
"海法明天会下雨吗?"
见证奇迹发生: Agent 将自动打开 Chromium,将城市名称翻译为希伯来语,搜索该城市,选择正确的自动补全选项,抓取最新预报,并直接在终端中为你提供简洁、本地化的答案!
由 SARA DEI 开发
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Playwright browser automation — navigate, click, fill forms, extract, screenshot — 17 agent tools.
Current weather and forecast lookup as an agent tool.
Get current weather for any city and create images from your prompts. Streamline planning, reports…
Control a real browser from AI agents: navigate, click, type, screenshot, read the page.
Related MCP Servers
- 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 gradedqualityDmaintenanceEnables LLMs to retrieve Israeli weather forecasts by controlling a browser via Playwright and scraping data from an Israeli weather website.-
- FlicenseAqualityDmaintenanceEnables LLMs to fetch Israeli weather forecasts by controlling a real browser via Playwright, simulating human interactions like typing and clicking on a weather website.4-
- FlicenseAqualityDmaintenanceEnables querying weather forecasts for Israeli cities by automating browser with Playwright, extracting data from Weather2Day website, and feeding it to an LLM for natural language responses.4-