Token导航 LogoToken导航TokenDH.com
MCP Playwright1 logo
浏览器工具stdio官方级别未说明来源级核验

MCP Playwright1

MCP Server

@michaellatman/mcp-get@latest

一个基于Playwright的浏览器自动化服务器,支持网页交互、截图、测试代码生成和JavaScript执行。

工具数

0

提示词数

0

GitHub Stars

0

资源数

0
浏览器自动化TypeScriptVS CodeClaude DesktopClaudeCursorVS CodeVS Code Insiders

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

作者 / 组织

venkyuggina3

提供方

venkyuggina3

最后核验

2026/5/17 20:22

运行时

Node.js

快速接入

先看主来源和安装命令,再打开仓库或文档;下面只保留这个条目的关键接入事实。

命令预览

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

详细介绍

MseeP.ai Security Assessment Special thanks to Warp, the AI terminal for developers

剧作家MCP服务器🎭

](https://smithery.ai/server/@executeautomation/playwright-mcp-server)

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

截图

Playwright + Claude

安装

您可以使用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

通过以下方式自动安装Playwright MCP for Claude Desktop 铁匠铺:

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

在VS代码中安装

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

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

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

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

使用Playwright服务器的配置

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

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

Docker支持

Playwright MCP服务器可以在Docker中运行,用于隔离和容器化执行。

构建Docker镜像

在构建Docker镜像之前,您需要构建具有生产依赖关系的TypeScript项目:

# Install production dependencies and build
npm install --omit=dev
npm run build

# Build the Docker image
docker build -t mcp-playwright .

或者使用提供的便利脚本:

chmod +x docker-build.sh
./docker-build.sh

使用Docker运行

您可以通过多种方式使用Docker运行MCP服务器:

直接使用Docker

# Run the server (stdin/stdout communication)
docker run -i mcp-playwright

使用Docker Compose

A. docker-compose.yml 提供文件以便于管理:

# Run the server with docker-compose
docker compose run --rm playwright-mcp

在MCP客户端上使用Docker

要将Docker化服务器与Claude Desktop或其他MCP客户端一起使用,您可以将它们配置为使用Docker:

{
  "mcpServers": {
    "playwright": {
      "command": "docker",
      "args": ["run", "-i", "--rm", "mcp-playwright"]
    }
  }
}

备注Docker镜像使用基于Debian的瘦Node.js镜像,仅包含核心依赖项。Playwright浏览器没有预先安装在容器中,以保持图像大小较小。如果需要,浏览器将在首次使用时下载。

测试

此项目使用Jest进行测试。测试位于 src/__tests__ 目录。

运行测试

您可以使用以下命令之一运行测试:

# Run tests using the custom script (with coverage)
node run-tests.cjs

# Run tests using npm scripts
npm test           # Run tests without coverage
npm run test:coverage  # Run tests with coverage
npm run test:custom    # Run tests with custom script (same as node run-tests.cjs)

测试覆盖率报告将在 coverage 目录。

运行评估

evals包加载一个mcp客户端,然后运行index.ts文件,因此不需要在测试之间重建。您可以通过在npx命令前加前缀来加载环境变量。可以找到完整的文档 这里.

OPENAI_API_KEY=your-key  npx mcp-eval src/evals/evals.ts src/tools/codegen/index.ts

贡献

添加新工具时,请注意工具名称的长度。一些客户端(如Cursor)对服务器和工具的组合名称有60个字符的限制(server_name:tool_name).

我们的服务器名称是 playwright-mcp。请确保您的工具名称足够短,不会超过此限制。

星迹

![Star History Chart](https://star-history.com/#executeautomation/mcp-playwright&Date)

目录标签

目录标签

浏览器自动化TypeScriptVS Code本地部署网页测试PlaywrightJavaScript执行网页截图

支持客户端

Claude DesktopClaudeCursorVS CodeVS Code Insiders

接入字段

传输方式(transport,传输协议)

stdio

鉴权方式(authType,认证方式)

none

运行时(runtime,运行环境)

Node.js

来源包(packageName,安装包名)

@michaellatman/mcp-get@latest

工具数量(toolCount,工具数)

0

资源数量(resourceCount,资源数)

0

提示词数量(promptCount,提示词数)

0

权限和风险

stdionone部署方式未说明

接入前请确认传输方式、认证方式和部署位置,并根据实际工具能力限制访问范围。

安装前确认

不要直接授予不必要的文件、网络或账号权限;先核对安装命令和配置内容。

来源信息

继续浏览同类 MCP