Browser Automation MCP Server

Browser Automation MCP Server

site icon
2025.03.10 0
JavaScript网页自动化数据抓取测试自动化浏览器自动化
Browser Automation MCP Server 是一个基于模型上下文协议(MCP)的服务,为Claude和其他兼容MCP的AI助手提供浏览器自动化能力。该服务允许用户通过编程方式控制浏览器,实现网页自动化操作。
View on GitHub

Overview

基本能力

产品定位

Browser Automation MCP Server 是一个专门为AI助手设计的浏览器自动化服务,通过MCP协议提供网页操作能力。

核心功能

  • 网页自动化:通过编程方式控制浏览器
  • 截图功能:捕获网页截图
  • 元素交互:点击、输入和与网页元素交互
  • 页面导航:管理页面导航和浏览器状态
  • 表单填写:自动化表单填写和提交
  • 数据提取:从网页中提取数据

适用场景

  • 自动化测试
  • 网页数据抓取
  • 表单自动填写
  • 网页内容监控
  • 自动化业务流程

工具列表

  1. navigate:导航到指定URL
  2. screenshot:捕获网页截图
  3. click:点击网页元素
  4. type:在输入框中输入文本
  5. extract:从网页提取数据
  6. evaluate:在浏览器上下文中执行JavaScript

常见问题解答

  • 需要Node.js 14+和Playwright作为依赖
  • 确保正确配置MCP服务器连接

使用教程

使用依赖

# 确保已安装Node.js 14+和npm
node --version
npm --version

安装教程

# 克隆仓库
git clone https://github.com/samihalawa/browser-automation-server.git
cd browser-automation-server

# 安装依赖
npm install

# 构建服务器
npm run build

调试方式

# 启动服务器
npm start

# 测试基本功能
navigate(url: "https://example.com")
screenshot(fullPage: true)
click(selector: "#submit-button")

许可证

该项目遵循 MIT 开源许可条款。