Playwright MCP Server 🎭

Playwright MCP Server 🎭

Playwright 模型上下文协议服务器 - 用于在 Claude Desktop、Cline、Cursor IDE 等环境中自动化浏览器和 API 的工具 🔌

smithery 徽章

简介

Playwright MCP 服务器允许大型语言模型(LLMs)与网页进行交互、截取屏幕截图并在真实浏览器环境中执行 JavaScript。

安装选项

使用 npm:

npm install -g @executeautomation/playwright-mcp-server

使用 mcp-get:

npx @michaellatman/mcp-get@latest install @executeautomation/playwright-mcp-server

使用 Smithery (推荐用于 Claude Desktop):

npx -y @smithery/cli install @executeautomation/playwright-mcp-server --client claude

配置

为 Claude Desktop 配置 Playwright 服务器:

{
  "mcpServers": {
    "playwright": {
      "command": "npx",
      "args": ["-y", "@executeautomation/playwright-mcp-server"]
    }
  }
}

资源

测试

运行测试:

npm test           # 运行测试
npm run test:coverage  # 带覆盖率运行测试

该服务器支持在 Claude Desktop、Cline、Cursor IDE 等环境中自动化浏览器和 API 操作。

mcp-playwright MCP 服务器