浏览器自动化服务器

一个基于Playwright的模型上下文协议服务器,提供浏览器自动化能力,使LLM能够与网页交互、截图、生成测试代码、网页抓取和执行JavaScript。

  • by o0x1024
  • TypeScript
  • 本地部署
  • 更新于
在 GitHub 查看 o0x1024/mcp-playwright-security

使用说明

Playwright MCP安全服务器🎭

使用Playwright提供浏览器自动化功能的模型上下文协议服务器。此服务器使LLM能够在真实的浏览器环境中与网页交互、截图、生成测试代码、对页面进行web裁剪和执行JavaScript。

安装

您可以使用npm、mcp-get或Smithery安装该包:

使用npm:

npm install -g @gelenlen/playwright-mcp-server-security

在VS代码中安装

使用以下按钮之一在VS Code中安装Playwright MCP服务器:

或者,您可以使用VS Code CLI安装Playwright MCP服务器:

# For VS Code
code --add-mcp '{"name":"playwright","command":"npx","args":["@gelenlen/playwright-mcp-server-security"]}'
# For VS Code Insiders
code-insiders --add-mcp '{"name":"playwright","command":"npx","args":["@gelenlen/playwright-mcp-server-security"]}'

安装后,ExecuteAutomation Playwright MCP服务器将可用于VS Code中的GitHub Copilot代理。

使用Playwright服务器的配置

以下是使用Playwright服务器的Claude Desktop配置:

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