Integrations
Provides a containerized version of the Patchright MCP server, accessible through Docker Hub for easy deployment and integration with AI tools
Allows GitHub Copilot to leverage Patchright's stealth browser automation capabilities through VS Code, enabling undetected web scraping and interaction
Patchright Lite MCP 服务器
精简的模型上下文协议 (MCP) 服务器,封装了 Patchright Node.js SDK,为 AI 模型提供隐秘的浏览器自动化功能。这款轻量级服务器专注于核心功能,方便更简单的 AI 模型使用。
Patchright 是什么?
Patchright 是 Playwright 测试和自动化框架的隐蔽版本。它旨在作为 Playwright 的直接替代品,但具备先进的隐蔽功能,可以规避反机器人系统的检测。Patchright 可以修补各种检测技术,包括:
- Runtime.enable 泄漏
- Console.enable 泄漏
- 命令标志泄漏
- 通用检测点
- 封闭的影子根交互
该 MCP 服务器包装了 Patchright 的 Node.js 版本,以便通过简单、标准化的协议将其功能提供给 AI 模型。
特征
- 简洁的界面:仅使用 4 个基本工具专注于核心功能
- 隐身自动化:使用 Patchright 的隐身模式来避免被发现
- MCP 标准:实现模型上下文协议,轻松实现 AI 集成
- Stdio Transport :使用标准输入/输出实现无缝集成
先决条件
- Node.js 18+
- npm 或 yarn
安装
- 克隆此存储库:Copy
- 安装依赖项:Copy
- 构建 TypeScript 代码:Copy
用法
使用以下命令运行服务器:
这将使用 stdio 传输启动服务器,使其准备好与支持 MCP 的 AI 工具集成。
与人工智能模型集成
克劳德桌面
将其添加到您的claude-desktop-config.json
文件中:
VS Code 与 GitHub Copilot
使用 VS Code CLI 添加 MCP 服务器:
可用工具
该服务器仅提供 4 个基本工具:
1. 浏览
启动浏览器,导航到 URL,并提取内容。
返回:
- 页面标题
- 可见文本预览
- 浏览器ID(用于后续操作)
- 页面ID(用于后续操作)
- 截图路径
2. 互动
在页面上执行简单的交互。
返回:
- 操作结果
- 当前网址
- 截图路径
3. 提取
从当前页面提取特定内容。
返回:
- 根据请求类型提取内容
4. 关闭
关闭浏览器以释放资源。
使用流程示例
- 启动浏览器并导航到站点:Copy
- 填写登录表格:Copy
- 填写密码:Copy
- 点击登录按钮:Copy
- 提取文本以验证登录:Copy
- 关闭浏览器:Copy
安全注意事项
- 此服务器提供强大的自动化功能。请以负责任且合乎道德的方式使用它。
- 避免自动执行违反网站服务条款的操作。
- 注意速率限制,不要使网站请求过载。
执照
该项目根据 MIT 许可证获得许可 - 有关详细信息,请参阅 LICENSE 文件。
致谢
- Kaliiiiiiiiii-Vinyzu 的 Patchright-nodejs
- 模型上下文协议(modelcontextprotocol)
Docker 使用
您可以使用 Docker 运行此服务器:
在本地构建 Docker 镜像
构建 Docker 镜像:
运行容器:
Docker 中心
当更改合并到主分支时,镜像会自动发布到 Docker Hub。您可以在以下位置找到最新镜像: dylangroos/patchright-mcp
This server cannot be installed
hybrid server
The server is able to function both locally and remotely, depending on the configuration or use case.
简化的模型上下文协议服务器,使 AI 模型能够使用 Patchright 执行隐形浏览器自动化,避免被反机器人系统检测,同时提供必要的 Web 交互功能。
Related MCP Servers
- -securityAlicense-qualityA Model Context Protocol server that enables Claude and other LLMs to make HTTP requests with realistic browser fingerprinting, bypassing common anti-bot measures and interacting with websites more naturally.Last updated -3PythonMIT License
- -securityFlicense-qualityA web browser automation server that allows AI assistants to control Chrome with persistent state management, enabling complex browsing tasks through asynchronous browser operations.Last updated -1Python
- -securityAlicense-qualityAI-driven browser automation server that implements the Model Context Protocol to enable natural language control of web browsers for tasks like navigation, form filling, and visual interaction.Last updated -1PythonMIT License
- -security-license-qualityA Model Context Protocol server that enables AI assistants to control Chrome browsers through the Chrome DevTools Protocol, allowing for navigation, clicking, typing, and extracting page information.Last updated -3TypeScript