Skip to main content
Glama

mcp-playwright

Warp,开发者的AI终端

适用于 MacOS、Linux 和 Windows

剧作家 MCP 服务器🎭

一个使用 Playwright 提供浏览器自动化功能的模型上下文协议 (MLM) 服务器。该服务器使 LLM 能够与网页交互、截取屏幕截图、生成测试代码、从网页中提取网页数据,并在真实的浏览器环境中执行 JavaScript。

截屏

剧作家+克劳德

文档| API 参考

安装

您可以使用 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自动为 Claude Desktop 安装 Playwright MCP:

npx @smithery/cli install @executeautomation/playwright-mcp-server --client claude
在 VS Code 中安装

使用以下按钮之一在 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 Server 的配置

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

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

测试

该项目使用 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

星史

Install Server
A
security – no known vulnerabilities
A
license - permissive license
A
quality - confirmed to work

一个使用 Playwright 提供浏览器自动化功能的模型上下文协议 (MLM) 服务器。该服务器使 LLM 能够在真实的浏览器环境中与网页交互、截取屏幕截图并执行 JavaScript。

  1. 剧作家 MCP 服务器🎭
    1. 截屏
    2. 文档| API 参考
    3. 安装
    4. 使用 Playwright Server 的配置
    5. 测试
    6. 星史

Related MCP Servers

  • -
    security
    F
    license
    -
    quality
    Provides a server utilizing Model Context Protocol to enable human-like browser automation with Playwright, allowing control over browser actions such as navigation, element interaction, and scrolling.
    Last updated -
    2
    TypeScript
  • -
    security
    A
    license
    -
    quality
    A Model Context Protocol server that provides browser automation capabilities using Playwright, enabling LLMs to interact with web pages, take screenshots, and execute JavaScript in a real browser environment.
    Last updated -
    3
    Python
    Apache 2.0
  • A
    security
    A
    license
    A
    quality
    A Model Context Protocol server that provides browser automation capabilities using Playwright, enabling LLMs to interact with web pages through structured accessibility snapshots without requiring screenshots or vision models.
    Last updated -
    21
    306,624
    TypeScript
    Apache 2.0
    • Apple
    • Linux
  • A
    security
    A
    license
    A
    quality
    A Model Context Protocol server that provides browser automation capabilities using Playwright, enabling LLMs to interact with web pages, take screenshots, generate test code, scrape web content, and execute JavaScript in real browser environments.
    Last updated -
    31
    10,534
    TypeScript
    MIT License
    • Linux
    • Apple

View all related MCP servers

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/executeautomation/mcp-playwright'

If you have feedback or need assistance with the MCP directory API, please join our Discord server