MCP Playwright Server(5,628星)2026:通过MCP让AI智能体获得浏览器自动化能力
MCP Playwright Server(5,628星)通过Model Context Protocol把Playwright浏览器自动化能力开放给AI智能体。本文教你如何接到Claude或任意MCP客户端。
💡 你将学到
MCP Playwright Server(5,628星)通过Model Context Protocol把Playwright浏览器自动化能力开放给AI智能体。本文教你如何接到Claude或任意MCP客户端。
直接给结论
executeautomation/mcp-playwright(5,628星,TypeScript)是一个Playwright MCP服务器——让AI智能体自动化浏览器和API的工具。有了它,助手可以用自然语言指令打开网页、点击元素、填写表单、提取数据。
智能体能做什么
- 导航:打开URL并等待页面加载
- 交互:按文本、角色或选择器点击、输入、选择、悬停
- 提取:抓取文本、属性和截图
- 测试:执行断言并把结果报告给智能体
接入Claude Desktop(或任意MCP客户端)
- 安装服务器:
npm install -g @executeautomation/playwright-mcp-server
- 添加到MCP客户端配置(如
claude_desktop_config.json):
{
"mcpServers": {
"playwright": {
"command": "npx",
"args": ["@executeautomation/playwright-mcp-server@latest"]
}
}
}
- 重启客户端。现在你可以说:"打开example.com,搜索MCP,把第一个结果的标题给我。"
服务器首次使用会自动安装浏览器,无需单独配置Playwright。
实用技巧
- 指令要明确步骤:"点击名为Sign in的按钮"比模糊指令效果好。
- 用截图做视觉验证——操作前后让智能体各截一张图。
- 限制在可信提示词内使用;浏览器自动化能力很强,应做好沙箱隔离。
FAQ
需要装Playwright吗? 服务器自己管理浏览器二进制——你只需要Node.js。
哪些MCP客户端可用? Claude Desktop、Cursor,以及任何支持MCP规范(8,869星)的客户端。
免费吗? 是——MIT开源协议。
相关文章
❓ 常见问题
Do I need Playwright installed?
The server manages its own browser binary - you just need Node.js.
Which MCP clients work?
Claude Desktop, Cursor, and any client supporting the MCP spec (8,869 stars).
Is it free?
Yes - open source under the MIT license.
本站文章由编辑人工撰写,收录的工具均经过实测或公开资料核验。文中链接指向工具官网或 GitHub 仓库,仅作信息参考,不构成付费推广。
