Back to MCP directory
publicPublicdnsLocal runtime

Playwright MCP Server

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

article

README

🚀 Playwright MCP 服务器

一个使用 Playwright 提供浏览器自动化功能的 Model Context Protocol 服务器。它能让 LLM 在真实浏览器环境中与网页交互、截取屏幕截图并执行 JavaScript,为自动化测试和网页操作提供了便利。

smithery 徽章

🚀 快速开始

本服务器借助 Playwright 实现浏览器自动化,LLM 可在真实浏览器环境下与网页交互、截图及执行 JavaScript。

✨ 主要特性

  • 提供浏览器自动化功能,支持 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 @smithery/cli install @executeautomation/playwright-mcp-server --client claude

💻 使用示例

配置使用 Playwright 服务器

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

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

📚 详细文档

🔍 截图

Playwright + Claude

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