浏览器自动化MCP服务

Browser Automation MCP Server 是一个基于模型上下文协议(MCP)的服务,为Roo Code提供浏览器自动化能力。它通过标准化接口使AI代理能够控制网页浏览器,支持浏览器控制、鼠标交互、键盘输入、页面导航等功能。

  • by grapheneaffiliate
  • 更新于
在 GitHub 查看 grapheneaffiliate/browser-automation-mcp

使用说明

基本能力

产品定位

Browser Automation MCP Server 是一个提供浏览器自动化能力的MCP服务,旨在通过标准化接口实现AI代理对网页浏览器的控制。

核心功能

  • 浏览器控制(启动、关闭)
  • 鼠标交互(点击坐标)
  • 键盘输入(输入文本)
  • 页面导航(上下滚动)
  • 固定视口大小(900x600)

适用场景

  • 自动化测试
  • 网页数据抓取
  • AI代理的网页交互
  • 自动化网页操作

工具列表

  • launch_browser: 在指定URL启动一个新的浏览器实例
  • click: 在页面的特定x,y坐标处点击
  • type: 在页面中输入文本
  • scroll: 上下滚动页面
  • close_browser: 关闭浏览器实例

使用教程

使用依赖

  1. 确保已安装Node.js和npm。

安装教程

  1. 克隆仓库:
git clone https://github.com/grapheneaffiliates/browser-automation-mcp.git
cd browser-automation-mcp
  1. 安装依赖:
npm install
  1. 构建项目:
npm run build

调试方式

  1. 确保配置正确,参考README中的Configuration部分。
  2. 使用提供的MCP工具进行测试,例如:
const result = await use_mcp_tool({
  server_name: "browser",
  tool_name: "launch_browser",
  arguments: {
    url: "https://example.com"
  }
});