MCP Playwright CDP是一个提供浏览器自动化功能的模型上下文协议(MCP)服务器,它借助Playwright并支持Chrome DevTools Protocol (CDP)。该服务器能让LLM在真实浏览器环境中与网页交互、截取屏幕截图,还能在浏览器上下文中执行JavaScript,同时支持通过CDP连接到运行中的Chrome实例。
此项目是executeautomation/mcp-playwright v0.2.7的分支版本,增强了通过CDP连接到运行中的Chrome实例的功能。
使用npm或Smithery均可安装:
通过Smithery为Claude Desktop自动安装MCP Playwright CDP:
npx -y @smithery/cli install @lars-hagen/mcp-playwright-cdp --client claude
使用npm:
npm install
将以下内容添加到Claude Desktop配置文件中:
{
"mcpServers": {
"playwright": {
"command": "node",
"args": ["/path/to/mcp-playwright/dist/index.js"]
}
}
}
请将/path/to/mcp-playwright替换为您实际的仓库路径。
此分支增加了通过CDP连接到运行中的Chrome实例的功能。使用方法如下:
/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --remote-debugging-port=9222
该项目基于executeautomation/mcp-playwright fork,并增强了通过CDP连接到运行中的Chrome实例的功能。
本项目采用MIT许可证 - 查看LICENSE文件获取详细信息。