Back to MCP directory
publicPublicdnsLocal runtime

Pyppeteer Browser Automation

MCP Servers是一个基于Pyppeteer的头less浏览器自动化工具,支持网页导航、截图和元素交互等功能。

article

README

🚀 MCP 服务器

MCP 服务器 是一个借助 Pyppeteer 实现的工具,可控制无头浏览器,实现自动导航、截图捕获、页面元素交互等功能。它基于 MCP(多上下文协议)框架构建自动化服务器,为网页自动化操作提供便利。

smithery 徽章

🚀 快速开始

MCP Servers with Pyppeteer 允许您利用 Pyppeteer 控制无头浏览器,在 MCP 框架下创建自动化服务器。在使用前,需确保满足先决条件并完成安装。

✨ 主要特性

  • 自动导航:可轻松导航到特定的 URL。
  • 截图捕获:能捕获访问页面的截图。
  • 元素交互:支持使用 CSS 选择器、XPath 或类名点击页面元素。
  • 动态资源:可访问动态页面信息,如当前 URL。
  • 服务器生命周期管理:能够控制浏览器的初始化和关闭。

📦 安装指南

先决条件

在开始之前,请确保安装了以下内容:

  1. Python 3.7+:该项目已测试到 Python 3.12,但建议使用 3.7+ 或更高版本。
  2. pip:Python 包管理器。
  3. Git:用于克隆仓库。

安装方式

通过 Smithery 安装

要通过 Smithery 自动安装 MCP Servers for Claude Desktop,可运行以下命令:

npx -y @smithery/cli install @devalexandre/mcp-servers --client claude

通过 pip 安装 GitHub 版本

安装包:

pip install -e git+https://github.com/devalexandre/mcp-servers.git#egg=mcp-servers

通过 Git 克隆仓库

  1. 克隆仓库:
git clone https://github.com/devalexandre/mcp-servers.git
cd mcp-servers
  1. 创建虚拟环境(可选):
python -m venv venv
source venv/bin/activate  # 在 Windows 上使用 `venv\Scripts\activate`
pip install -r requirements.txt
  1. 以编辑模式安装包:
pip install -e .
help

Runtime guide

cloud

Hosted runtime

Hosted servers run from a provider-managed environment. You usually connect the MCP client to the hosted endpoint or follow the provider's authorization flow, without keeping a local process alive

  1. Open provider connection page
  2. Authorize or copy endpoint
  3. Connect from your MCP client
terminal

Local runtime / other methods

Local servers run on your own machine or infrastructure. You normally copy the server_config into your MCP client, install the required package, and provide env variables from env_schema when needed

  1. Copy server_config
  2. Install required package
  3. Fill env variables and restart client