Back to MCP directory
publicPublicdnsLocal runtime

Playwright Stealth

一个基于Playwright的MCP服务器,为LLM提供浏览器自动化能力

article

README

🚀 Playwright MCP 服务器 🎭

一个基于 Playwright 的 Model Context Protocol 服务器,提供浏览器自动化功能。该服务器可让大语言模型(LLM)与网页进行交互、截取屏幕截图、生成测试代码、抓取页面信息,还能在真实浏览器环境中执行 JavaScript。

🚀 快速开始

你可以通过下面的链接查看文档和 API 参考: 文档 | API 参考

✨ 主要特性

  • 支持大语言模型(LLM)与网页交互。
  • 可进行屏幕截图、生成测试代码、抓取页面信息。
  • 能在真实浏览器环境中执行 JavaScript。

📦 安装指南

你可以使用 npm、mcp-get 或 Smithery 来安装此包:

使用 npm

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

使用 mcp-get

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

使用 Smithery

通过 Smithery 自动安装 Playwright MCP 用于 Claude Desktop:

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

在 VS Code 中安装

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

在 VS Code 中安装

通过 Extension Pack 安装

通过 CLI 安装

配置

将以下内容添加到你的 playwright.config.ts 文件中:

import { defineConfig } from '@playwright/test';

export default defineConfig({
  testDir: './tests',
  forbidOnly: !!process.env.CI,
  requireOrder: true,
  retries: process.env.CI ? 2 : 0,
  workers: process.env.CI ? undefined : 1,
  reporter: 'html',
  use: {
    trace: 'on-first-retry',
  },
});

测试

运行以下命令来执行测试:

npx playwright test

使用说明

对于更多详细信息,请参考我们的 文档

📚 详细文档

你可以通过 文档链接 查看更详细的使用说明和配置信息。

🔍 截图

Playwright + Claude

⭐ 星历史记录图表

Star History Chart

📄 许可证

文档中未提及许可证信息。若有相关内容,可补充在本章节。

help

Runtime guide

cloud

Hosted runtime

Hosted servers run from a provider-managed environment. You usually connect the MCP client to the hosted endpoint or follow the provider's authorization flow, without keeping a local process alive

  1. Open provider connection page
  2. Authorize or copy endpoint
  3. Connect from your MCP client
terminal

Local runtime / other methods

Local servers run on your own machine or infrastructure. You normally copy the server_config into your MCP client, install the required package, and provide env variables from env_schema when needed

  1. Copy server_config
  2. Install required package
  3. Fill env variables and restart client