Mcp Playwright

Mcp Playwright

🚀 Playwright MCP 服务器 🎭

一个使用 Playwright 的 Model Context Protocol(模型上下文协议)服务器,为您提供强大的浏览器自动化能力。借助此服务器,大语言模型(LLMs)能够在真实的浏览器环境中,与网页进行交互、截取屏幕、生成测试代码、抓取网页内容以及执行 JavaScript。

smithery badge

🚀 快速开始

Playwright MCP 服务器是一个基于 Playwright 的模型上下文协议服务器,可助力大语言模型与网页进行交互。以下是使用前的安装和配置步骤。

✨ 主要特性

  • 支持大语言模型(LLMs)在真实浏览器环境中与网页交互。
  • 具备截取屏幕、生成测试代码、抓取网页内容和执行 JavaScript 等功能。
  • 提供多种安装方式,如 npm、mcp - get、Smithery 等,还支持在 VS Code 中安装。

📦 安装指南

您可以选择以下多种方式安装 Playwright MCP 服务器:

使用 npm

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

使用 mcp - get

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

使用 Smithery

要通过 Smithery 自动为 Claude Desktop 安装 Playwright MCP,可执行以下命令:

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

在 VS Code 中安装

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

# 在 VS Code 中使用以下命令进行安装:
# 打开终端并运行:
# 复制以下内容到终端:
command: "extension install"
args: ["https://marketplace.visualstudio.com/items?itemName=vscode_extensions.reposoup.badge_install_now"]

📚 详细文档

🔧 技术细节

配置

在 Claude Desktop 中配置 Playwright 服务器,可参考以下配置示例:

# 在 Claude Desktop 中进行如下配置:
{
"playwright": {
"server": "@executeautomation/playwright-mcp-server"
}
}

测试

使用 Jest 进行测试,并提供以下运行命令:

npm test
npm run test
yarn test

📄 许可证

文档中未提及相关许可证信息。

截图

星历史

Star History Chart

  • 0 关注
  • 0 收藏,8 浏览
  • system 提出于 2025-09-18 03:03

相似服务问题