Warp,开发者的 AI 终端
Playwright MCP Server 🎭
这是一个基于 Playwright 的 Model Context Protocol (MCP) 服务器,提供浏览器自动化功能。该服务器使 LLMs(大语言模型)能够与网页交互、截图、生成测试代码、抓取网页内容并在真实的浏览器环境中执行 JavaScript。
截图
!Playwright + Claude
文档 | API 参考
安装
您可以使用 npm、mcp-get 或 Smithery 安装该包:
使用 npm:
使用 mcp-get:
使用 Smithery
在 VS Code 中安装
使用以下按钮在 VS Code 中安装 Playwright MCP 服务器:
或者,您可以使用 VS Code CLI 安装 Playwright MCP 服务器:
安装完成后,ExecuteAutomation Playwright MCP 服务器将可用于 VS Code 中的 GitHub Copilot 代理。
配置使用 Playwright 服务器
以下是 Claude Desktop 配置以使用 Playwright 服务器的示例:
测试
本项目使用 Jest 进行测试。测试文件位于
src/__tests__
目录中。运行测试
您可以使用以下命令之一运行测试:
测试覆盖率报告将生成在
coverage
目录中。Star 历史
- Author:waytomcp
- URL:https://www.waytomcp.com/article/executeautomation/mcp-playwright
- Copyright:All articles in this blog, except for special statements, adopt BY-NC-SA agreement. Please indicate the source!