@automatalabs/mcp-server-playwright

中文文档
1.2.1发布于 2025/01/24MITES Module近 30 天下载 1797

MCP server for browser automation using Playwright

原始使用文档
文档目录9 节
  1. Table of Contents
  2. Features
  3. Installation
  4. Installing via Smithery
  5. Configuration
  6. Components
  7. Tools
  8. Resources
  9. License

MCP Server Playwright

MCP Playwright

A Model Context Protocol server that provides browser automation capabilities using Playwright
Enable LLMs to interact with web pages, take screenshots, and execute JavaScript in a real browser environment

NPM Version Downloads per month License Smithery Installs

MCP-Server-Playwright MCP server

Table of Contents

Features

  • 🌐 Full browser automation capabilities
  • 📸 Screenshot capture of entire pages or specific elements
  • 🖱️ Comprehensive web interaction (navigation, clicking, form filling)
  • 📊 Console log monitoring
  • 🔧 JavaScript execution in browser context

Installation

Installing via Smithery

To install MCP Server Playwright for Claude Desktop automatically via Smithery:

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

You can install the package using either npx or mcp-get:

Using npx:

npx @automatalabs/mcp-server-playwright install

This command will:

  1. Check your operating system compatibility (Windows/macOS)
  2. Create or update the Claude configuration file
  3. Configure the Playwright server integration

The configuration file will be automatically created/updated at:

  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json

Using mcp-get:

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

Configuration

The installation process will automatically add the following configuration to your Claude config file:

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

Components

Tools

browser_navigate

Navigate to any URL in the browser

{
  "url": "https://stealthbrowser.cloud"
}

browser_screenshot

Capture screenshots of the entire page or specific elements

{
  "name": "screenshot-name",     // required
  "selector": "#element-id",     // optional
  "fullPage": true              // optional, default: false
}

browser_click

Click elements on the page using CSS selector

{
  "selector": "#button-id"
}

browser_click_text

Click elements on the page by their text content

{
  "text": "Click me"
}

browser_hover

Hover over elements on the page using CSS selector

{
  "selector": "#menu-item"
}

browser_hover_text

Hover over elements on the page by their text content

{
  "text": "Hover me"
}

browser_fill

Fill out input fields

{
  "selector": "#input-field",
  "value": "Hello World"
}

browser_select

Select an option in a SELECT element using CSS selector

{
  "selector": "#dropdown",
  "value": "option-value"
}

browser_select_text

Select an option in a SELECT element by its text content

{
  "text": "Choose me",
  "value": "option-value"
}

browser_evaluate

Execute JavaScript in the browser console

{
  "script": "document.title"
}

Resources

  1. Console Logs (console://logs)

    • Access browser console output in text format
    • Includes all console messages from the browser
  2. Screenshots (screenshot://<n>)

    • Access PNG images of captured screenshots
    • Referenced by the name specified during capture

License

This project is licensed under the MIT License - see the LICENSE file for details.

版本与发布记录

@automatalabs/mcp-server-playwright 共发布 16 个版本,首次发布于 2024/12/02;过去 12 个月发布了 0 个版本。

版本发布日期距今
1.2.1latest2025/01/241.8 年前
1.2.02025/01/201.8 年前
1.1.02025/01/201.8 年前
1.0.02025/01/201.8 年前
0.9.02024/12/121.9 年前
0.8.02024/12/051.9 年前

关于 @automatalabs/mcp-server-playwright 的常见问题

@automatalabs/mcp-server-playwright 是什么?

MCP server for browser automation using Playwright

如何安装 @automatalabs/mcp-server-playwright?

在项目目录运行 npm install @automatalabs/mcp-server-playwright,或使用 pnpm add / yarn add / bun add。它还提供命令行工具 mcp-server-playwright,可以用 npx mcp-server-playwright 直接运行。

@automatalabs/mcp-server-playwright 支持 TypeScript 吗?

该包的 package.json 没有声明类型入口。需要类型提示时,可以在 npm 上查找社区维护的 @types/automatalabs__mcp-server-playwright 是否存在。

@automatalabs/mcp-server-playwright 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

@automatalabs/mcp-server-playwright 可以商用吗?

@automatalabs/mcp-server-playwright 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@automatalabs/mcp-server-playwright 的下载量有多少?

根据 npm 官方下载统计,@automatalabs/mcp-server-playwright 在 2026/10/07 – 2026/11/05 这 30 天内被下载 1,797 次,日均约 60 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@automatalabs/mcp-server-playwright 还在维护吗?

最新版本 1.2.1 发布于 2025/01/24(1.8 年前);至今共发布 16 个版本,其中过去 12 个月发布了 0 个;首次发布于 2024/12/02。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。