这是一个示例项目,用于练习基于模型上下文协议(Model Context Protocol)的服务器实现,以使用Playwright进行浏览器自动化。它与Claude桌面客户端交互,接受用户提示并使用服务器控制浏览器。
<a href="https://glama.ai/mcp/servers/hokppvk1dy"><img width="380" height="200" src="https://gips3.baidu.com/it/u=3678335612,476499674&fm=3081&app=3081&f=PNG?w=760&h=400" alt="浏览器自动化服务器MCP服务器" /></a>
git clone https://github.com/hrmeetsingh/mcp-browser-automation.gitnpm installdist文件夹中~/Application\ Support/Claude/claude_desktop_config.json创建配置文件(这是针对macOS的){
"mcpServers": {
"mcp-browser-automation": {
"command": "node",
"args": ["/path/to/mcp-browser-automation/dist/index.js"]
}
}
}
添加MCP服务器选项

导航到URL并使用playwright执行操作
