本项目是一个基于 Playwright 实现模型上下文协议 (MCP) 服务器的 demo 项目。它能演示如何借助 Claude Desktop 客户端接收用户提示,进而利用服务器控制浏览器完成自动化操作。
git clone https://github.com/hrmeetsingh/mcp-browser-automation.git
npm install
dist 文件夹中。~/Application\ 支持/Claude/claude_desktop_config.json 创建配置文件(适用于 macOS)。{
"mcpServers": {
"mcp-browser-automation": {
"command": "node",
"args": ["/path/to/mcp-browser-automation/dist/index.js"]
}
}
}
添加 MCP 服务器选项
导航至 URL 并使用 Playwright 进行操作