Token导航 LogoToken导航

MCP Server · 浏览器工具

Ultimate Playwright MCP

Ultimate Playwright MCP 是一个支持多代理共享单个Chrome浏览器实例的工具,通过标签组隔离确保每个代理操作的独立性。

stdio官方级别未说明来源级核验工具 12ultimate-playwright-mcp
浏览器自动化TypeScriptClaudeCursor

快速开始

作者 / 组织
pm990320
提供方
pm990320
运行时
Node.js

工具数量

12

来源目录标注

资源数量

0

来源目录标注

提示词数量

0

来源目录标注

GitHub Star

3

仓库热度

收录来源

1 个

MCP World

选型结论

Ultimate Playwright MCP 属于浏览器工具类 MCP Server,公开资料标注 12 个工具,通过stdio 本地进程接入,适配 Claude、Cursor,有可以直接复制的安装命令;接入前要先准备 会话凭据。

分类

浏览器工具

传输方式

stdio

认证方式

会话凭据

部署方式

公开资料未说明

安装与配置

安装命令

npx ultimate-playwright-mcp --cdp-endpoint http://localhost:9222

客户端配置示例

{
  "mcpServers": {
    "ultimate-playwright-mcp": {
      "command": "npx",
      "args": [
        "ultimate-playwright-mcp",
        "--cdp-endpoint",
        "http://localhost:9222"
      ]
    }
  }
}

按公开安装命令拼出来的示例,字段名和参数以仓库 README 为准;带 YOUR_API_KEY 这类占位符的位置记得换成自己的值。

上手步骤

  1. 1

    准备运行环境

    stdio 服务在本地起进程,需要先装好 Node.js,再按安装命令拉取依赖。

  2. 2

    安装服务

    复制下面的安装命令执行;命令里带占位符的位置换成自己的密钥或路径。

  3. 3

    写入客户端配置

    在客户端的 MCP 配置里填启动命令和参数,保存后完全退出客户端再打开,让新配置生效。

  4. 4

    验证是否可用

    连接成功后客户端会列出 12 个工具,随便调一个只读工具确认能返回结果。

接入前确认

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

详细介绍

终极剧作家MCP

多代理Playwright MCP服务器,通过标签隔离 targetId允许多个Claude实例(或其他MCP客户端)共享一个Chrome浏览器,同时保持独立的标签组。

为什么是终极剧作家?

官方 @playwright/mcp 为您提供浏览器控制 单智能体但如果你有 多个代理 共享一个浏览器?

终极剧作家MCP 通过以下方式解决此问题 选项卡组隔离:

  • 🔀 多代理选项卡组 --每个代理创建一个 groupId 并且只看到自己的选项卡
  • 🍪 共享Cookie和会话 --所有代理共享相同的BrowserContext(登录一次,每个人都经过身份验证)
  • 🎨 可视化Chrome选项卡组 --配套扩展程序将标签组织成颜色编码的Chrome标签组
  • 💾 持久注册表 --选项卡组在MCP服务器重启后仍然存在(~/.ultimate-playwright-mcp/tab-groups.json)
  • 🔌 连接到现有Chrome --使用CDP连接到正在运行的Chrome浏览器(保留您的个人资料、扩展程序、书签)

比较

特点终极剧作家mcp@剧作家/mcp浏览器使用mcp
多代理选项卡隔离✅ 标签组 groupId❌ 单次会议❌ 单次会议
跨代理共享Cookie✅ 相同的浏览器上下文N/AN/A
连接到现有的Chrome浏览器✅ CDP❌ 启动新浏览器❌ 启动新浏览器
Chrome中的可视选项卡组✅ 扩展❌❌
持久选项卡注册表✅ 重新启动后幸存❌❌
辅助功能树快照✅ 元素引用(e1,e2…)✅❌ 基于屏幕截图
开源✅ MIT✅ 阿帕奇-2.0✅ 麻省理工学院

特性

  • ✅ 选项卡隔离 -每个代理通过唯一的 targetId
  • ✅ 共享Cookie -所有代理共享相同的BrowserContext(Cookie、会话、本地存储)
  • ✅ 并行执行 -多个代理可以同时运行而不受干扰
  • ✅ CDP连接 -通过Chrome DevTools协议连接到现有的Chrome
  • ✅ 本机页面检查点 -捕获结构化工件并生成报告 targetId
  • ✅ 战斗测试 -摘录自 开爪 (麻省理工学院许可)

安装

npm install -g ultimate-playwright-mcp

或者直接使用npx运行:

npx ultimate-playwright-mcp --cdp-endpoint http://localhost:9222

快速开始

1.通过远程调试启动Chrome

# macOS
/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome \
  --remote-debugging-port=9222 \
  --user-data-dir=/tmp/chrome-debug

# Linux
google-chrome --remote-debugging-port=9222 --user-data-dir=/tmp/chrome-debug

# Windows
"C:\\Program Files\\Google\\Chrome\\Application\\chrome.exe" ^
  --remote-debugging-port=9222 ^
  --user-data-dir=C:\\temp\\chrome-debug

2.配置克劳德桌面

添加 ~/Library/Application Support/Claude/claude_desktop_config.json:

{
  "mcpServers": {
    "ultimate-playwright": {
      "command": "npx",
      "args": [
        "ultimate-playwright-mcp",
        "--cdp-endpoint",
        "http://localhost:9222"
      ]
    }
  }
}

3.重新启动克劳德桌面

Claude现在可以访问带有标签隔离的浏览器控制工具。

使用示例

User: Open two tabs and navigate them independently

Claude: I'll create two tabs with separate targetIds:

1. browser_tabs({ action: "new" })
   → **targetId: ABC123...**

2. browser_tabs({ action: "new" })
   → **targetId: XYZ789...**

3. browser_navigate({ targetId: "ABC123...", url: "https://github.com" })
4. browser_navigate({ targetId: "XYZ789...", url: "https://google.com" })

Both tabs are now navigated independently!

可用工具

工具说明关键参数
browser_tab_group创建/列出/删除选项卡组以进行隔离action, name, color, groupId
browser_tabs列出、创建、关闭或选择选项卡action, groupId, targetId, index
browser_navigate导航到URLurl, targetId
browser_snapshot使用引用捕获可访问性树targetId
browser_click单击元素ref, targetId
browser_type在元素中键入文本ref, text, targetId
browser_hover将鼠标悬停在元素上ref, targetId
browser_press_key按键盘键key, targetId
browser_fill_form填写多个表单字段fields, targetId
browser_wait_for等待条件text, selector, url, loadState, targetId
browser_checkpoint为选项卡捕获结构化检查点name, targetId, collectors
browser_checkpoint_report从存储的检查点生成报告format, resultsDir

检查点

使用 browser_checkpoint 当您希望持续捕获当前页面以供以后查看或生成报告时。

  • 检查点的范围为已解决的 targetId,因此它们使用此服务器的选项卡隔离模型。
  • 文物和清单写在 ~/.ultimate-playwright-mcp/checkpoints 默认情况下。
  • 生成的报告写在 ~/.ultimate-playwright-mcp/checkpoints/report.

例子:

1. browser_checkpoint({ targetId: "ABC123", name: "after-login" })
2. browser_checkpoint_report({ format: "html" })

选项卡组(多用户隔离)

当多个用户或代理共享一个浏览器实例时,选项卡组会保留每个人的 标签被隔离。每个会话都创建自己的组,所有选项卡操作都有作用域 对于这个群体。

User: Research product pricing

Claude: I'll create a tab group first, then open tabs within it.

1. browser_tab_group({ action: "create", name: "pricing-research", color: "blue" })
   → **groupId: g_a1b2c3d4e5f6**

2. browser_tabs({ action: "new", groupId: "g_a1b2c3d4e5f6", url: "https://example.com/pricing" })
   → **targetId: ABC123...**

3. browser_tabs({ action: "list", groupId: "g_a1b2c3d4e5f6" })
   → Only shows tabs in this group (not other users' tabs)

同时,同一服务器上的另一个用户:

1. browser_tab_group({ action: "create", name: "docs-review", color: "green" })
   → **groupId: g_x9y8z7w6v5u4**

2. browser_tabs({ action: "new", groupId: "g_x9y8z7w6v5u4", url: "https://docs.example.com" })
   → **targetId: XYZ789...**

两个用户共享相同的Cookie/会话,但只能看到自己的标签页!

选项卡组生命周期

  1. 创建 会话开始时的小组
  2. 打开选项卡 组内使用 groupId
  3. 工作 使用标签 targetId 和以前一样
  4. 删除 完成后的组(可选关闭所有选项卡)

组状态将持久化为 ~/.ultimate-playwright-mcp/tab-groups.json 所以 在MCP服务器重启后幸存。

建筑

┌─────────────────────────────────────────────┐
│        Single Chrome Process                │
│    (--remote-debugging-port=9222)           │
│  ┌─────────────────────────────────────┐   │
│  │     Single BrowserContext            │   │
│  │  (shared cookies, storage)           │   │
│  │                                      │   │
│  │  Group: alice (blue)                 │   │
│  │  ┌─────┐ ┌─────┐                    │   │
│  │  │ Tab │ │ Tab │                    │   │
│  │  │  A  │ │  B  │                    │   │
│  │  └─────┘ └─────┘                    │   │
│  │                                      │   │
│  │  Group: bob (green)                  │   │
│  │  ┌─────┐ ┌─────┐ ┌─────┐            │   │
│  │  │ Tab │ │ Tab │ │ Tab │            │   │
│  │  │  C  │ │  D  │ │  E  │            │   │
│  │  └─────┘ └─────┘ └─────┘            │   │
│  └─────────────────────────────────────┘   │
└─────────────────────────────────────────────┘
                   ↑
           CDP Connection
                   ↓
┌─────────────────────────────────────────────┐
│    ultimate-playwright-mcp (MCP Server)     │
│    - Tab routing via targetId               │
│    - Tab groups via groupId                 │
│    - Shared ownership registry (JSON file)  │
│    - Stdio transport                        │
└─────────────────────────────────────────────┘
         ↓           ↓           ↓
   ┌─────────┐ ┌─────────┐ ┌─────────┐
   │ Alice   │ │  Bob    │ │ Charlie │
   │ (Claude)│ │ (Claude)│ │ (Cursor)│
   └─────────┘ └─────────┘ └─────────┘

MCP配置

光标/风帆/通用MCP客户端

{
  "mcpServers": {
    "ultimate-playwright": {
      "command": "npx",
      "args": ["ultimate-playwright-mcp", "--cdp-endpoint", "http://localhost:9222"]
    }
  }
}

带环境变量

{
  "mcpServers": {
    "ultimate-playwright": {
      "command": "npx",
      "args": ["ultimate-playwright-mcp"],
      "env": {
        "CDP_ENDPOINT": "http://localhost:9222"
      }
    }
  }
}

CLI选项

ultimate-playwright-mcp [options]

Options:
  --cdp-endpoint   CDP endpoint URL (e.g., http://localhost:9222)
                        Can also use CDP_ENDPOINT env var.
                        If omitted, daemon-managed Chrome is started lazily on first tool call.
  --agent-id        Optional agent ID for logging/debugging
                        Can also use AGENT_ID env var
  --keep-alive          Auto-restart daemon-managed Chrome if it exits
                        Use --no-keep-alive for testing workflows where you want Chrome to stay down after kill
                        Default: disabled (no auto-restart)
                        Can also use KEEP_ALIVE env var (set to "false" to disable)
  --checkpoint-output-dir 

                        Root directory for checkpoint manifests, artifacts, and reports
                        Can also use CHECKPOINT_OUTPUT_DIR env var
  -V, --version         Output version number
  -h, --help            Display help

多代理设置

运行多个Claude代码实例

每个实例都连接到同一个MCP服务器,并获得隔离的选项卡:

1号航站楼:

claude-code --mcp-config ./mcp-config.json
# Agent A creates tabs with targetIds starting from ABC...

2号航站楼:

claude-code --mcp-config ./mcp-config.json
# Agent B creates tabs with targetIds starting from XYZ...

两个代理共享Cookie和会话,但在不同的选项卡上操作!

持久Chrome设置(macOS)

对于使用调试端口自动启动的Chrome实例:

创建 ~/Library/LaunchAgents/com.user.chrome-debug.plist:


    Label
    com.user.chrome-debug
    ProgramArguments
    
        /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
        --remote-debugging-port=9222
        --user-data-dir=/Users/YOUR_USERNAME/chrome-debug-profile
    
    RunAtLoad
    
    KeepAlive
    

加载:

launchctl load ~/Library/LaunchAgents/com.user.chrome-debug.plist

发展

# Install dependencies
npm install

# Build
npm run build

# Type check
npm run type-check

# Lint
npm run lint

# Watch mode
npm run watch

许可证

麻省理工学院

归因

此项目从中提取浏览器控制代码 开爪 (麻省理工学院授权),提供经过实战测试的标签隔离和Playwright集成。

关键提取成分:

  • CDP会话管理(pw-session.ts)
  • 浏览器操作(pw-tools-*.ts)
  • 基于角色的元素引用(pw-role-snapshot.ts)

链接

工具与能力

工具数量

12

资源数量

0

提示词数量

0

能力标签

浏览器自动化TypeScript本地部署多代理支持标签隔离共享会话开发工具

支持客户端

ClaudeCursor

数量来自来源目录的标注,具体工具清单以官方文档为准。

典型使用场景

自动操作网页

打开页面、点击、填表,把浏览器动作交给模型执行。

抓结构化数据

把页面内容整理成表格或 JSON,省掉手工复制粘贴。

走一遍关键流程

按步骤检查页面是否正常,回归时少漏环节。

选择建议

值得选的地方

  • 工具数量 12 个,一次接入能覆盖的操作比单点工具更全。
  • 有现成的安装命令,不用自己找入口,照着跑就能起服务。
  • 已经适配 Claude、Cursor,换客户端不用重新研究配置。

先想清楚的地方

  • stdio 方式要求本地装好 Node.js,换机器要重新装一遍。
  • 需要自备会话凭据,没有凭据没法直接试。
  • 第三方目录整理,版本更新和行为细节以官方仓库为准。

更适合

  • 需要在浏览器工具场景里让模型直接调用外部能力的人。
  • 已经在用 Claude 的用户,接入路径最短。
  • 想先快速试一下、能接受在本地跑服务的人。

不太适合

  • 完全不想在本地装环境的人。
  • 暂时拿不到会话凭据的人。
  • 需要厂商级 SLA 和技术支持的生产环境。

同类对比

5 个同类
MCP Server工具数传输方式安装命令收录来源最后核验
Ultimate Playwright MCP

MCP World · 本页

12stdio有1 个2026-05-17
Fetch 9a2682de

MCP.so

1SSE有3 个2026-05-17
Browser 738d52bc

MCP World

0stdio有1 个2026-05-17
Playwright MCP Server

MCP.so

21stdio有4 个2026-05-17
Skyvern MCP

MCP World

0stdio有2 个2026-05-17

按同分类和工具数量挑出最接近的几条,字段以各自详情页为准。

常见问题

5 条

Ultimate Playwright MCP 怎么安装?

公开资料给出的安装命令是 npx ultimate-playwright-mcp --cdp-endpoint http://localhost:9222,运行环境为 Node.js。装完后按客户端要求写进 MCP 配置,重启客户端生效。

Ultimate Playwright MCP 怎么在 Claude Desktop、Cursor 里配置?

它是stdio 本地进程,客户端配置里要写启动命令和参数,运行环境是 Node.js;保存后完全退出客户端再打开,配置才会生效。

Ultimate Playwright MCP 收费吗?

本站只整理公开资料,不代收费用,也没有标注具体价格。是否收费取决于服务本身和背后的接口额度,正式使用前按官方说明确认。

Ultimate Playwright MCP 需要 API Key 吗?

公开资料标注的认证方式是会话凭据,也就是要先拿到凭据才能连上;凭据只填在自己本地的配置里,不要写进公开仓库。

Ultimate Playwright MCP 支持哪些客户端?

公开资料标注支持 Claude、Cursor;其他客户端只要能配置 MCP Server,也能用同样的命令或地址接入。

来源信息

继续浏览同类 MCP