浏览器自动化 MCP 服务器
这是一个模型上下文协议 (MCP) 服务器,为 Roo Code 提供浏览器自动化功能。它使 AI 代理能够通过标准化界面控制 Web 浏览器。
特征
- 浏览器控制(启动、关闭)
- 鼠标交互(点击坐标)
- 键盘输入(输入文本)
- 页面导航(向上/向下滚动)
- 固定视口尺寸(900x600)
安装
- 克隆存储库:
git clone https://github.com/grapheneaffiliates/browser-automation-mcp.git
cd browser-automation-mcp
- 安装依赖项:
- 构建项目:
配置
将以下内容添加到您的 Cline MCP 设置文件中:
{
"mcpServers": {
"browser": {
"command": "node",
"args": ["path/to/browser-server/build/index.js"],
"disabled": false,
"alwaysAllow": []
}
}
}
可用工具
该服务器提供以下 MCP 工具:
launch_browser
:在指定的 URL 启动新的浏览器实例click
:单击页面上特定的 x,y 坐标type
:在页面中输入文本scroll
:向上或向下滚动页面close_browser
:关闭浏览器实例
使用示例
// Using the MCP tools in Roo Code
const result = await use_mcp_tool({
server_name: "browser",
tool_name: "launch_browser",
arguments: {
url: "https://example.com"
}
});
执照
麻省理工学院