
Claude 浏览器自动化 MCP 服务器,由 Puppeteer 驱动。
概览
一个模型上下文协议服务器,通过 Puppeteer 为 Claude Code(以及任何其他 MCP 客户端)提供真正的浏览器——导航页面、点击和输入、运行 JavaScript、截图、管理 Cookie、拦截请求。 - Node.js ≥ 18 - 一个支持MCP的客户端(Claude Code、Claude Desktop、Cursor、Codex CLI等)- Chromium由Puppeteer首次安装时自动下载(约170 MB) 两个脚本都验证Node ≥ 18,通过npm全局安装包,并在用户权限用Claude Code注册。覆盖范围时,使用SCOPE=project(bash)或$env:SCOPE='project'(PowerShell)。 ——如果你不想运行远程脚本: 然后重启Claude Code并要求:“截图 example.com”。 你不必先调用puppeteer_launch——浏览器在其他工具运行时会自动启动默认。页面ID默认为“default”,因此单标签流可以完全省略pageId。 每个工具以两种并行形式返回结果: - 内容[0]。
概述(AI 翻译)
一个模型上下文协议服务器,通过 Puppeteer 为 Claude Code(以及任何其他 MCP 客户端)提供真正的浏览器——导航页面、点击和输入、运行 JavaScript、截图、管理 Cookie、拦截请求。
要求
- Node.js ≥ 18
- 一个支持MCP的客户端(Claude Code、Claude Desktop、Cursor、Codex CLI等)
- Chromium 由 Puppeteer 首次安装时自动下载(约 170 MB)
安装
macOS / Linux
Windows (PowerShell)
两个脚本都验证Node ≥ 18,通过npm全局安装包,并在用户权限用Claude代码注册。用SCOPE=project(bash)或$env:SCOPE='project'(PowerShell)覆盖范围。
手动——如果你不想运行远程脚本:
然后重启Claude Code并问:“截图 example.com”*。
工具
你不必先调用 puppeteer_launch——浏览器在其他工具运行时会自动启动默认值。页面 ID 默认为 "default",因此单标签页流程可以完全省略 pageId。
| 工具 | 它的作用 |
|---|---|
puppeteer_launch |
(可选)启动浏览器或通过browserWSEndpoint连接现有Chrome浏览器。 |
本页由 AI 翻译,技术细节请以原文为准。
README
以下为原文 README 节选,完整内容请查看原文。
puppeteer-mcp-claude
A Model Context Protocol server that gives Claude Code (and any other MCP-aware client) a real browser via Puppeteer — navigate pages, click and type, run JavaScript, capture screenshots, manage cookies, intercept requests.
Requirements
- Node.js ≥ 18
- An MCP-aware client (Claude Code, Claude Desktop, Cursor, Codex CLI, …)
- Chromium is downloaded automatically by Puppeteer on first install (~170 MB)
Install
macOS / Linux
curl -fsSL https://raw.githubusercontent.com/jaenster/puppeteer-mcp-claude/main/install.sh | bash
Windows (PowerShell)
iwr -useb https://raw.githubusercontent.com/jaenster/puppeteer-mcp-claude/main/install.ps1 | iex
Both scripts verify Node ≥ 18, install the package globally via npm, and register it with Claude Code at user scope. Override scope with SCOPE=project (bash) or $env:SCOPE='project' (PowerShell).
Manual — if you’d rather not run a remote script:
npm install -g puppeteer-mcp-claude
claude mcp add puppeteer-mcp-claude -- npx -y puppeteer-mcp-claude serve
Then restart Claude Code and ask: “Take a screenshot of example.com”.
Tools
You don’t have to call puppeteer_launch first — the browser auto-launches with defaults the moment any other tool runs. Page ids default to "default", so single-tab flows can omit pageId entirely.
| Tool | What it does |
|---|---|
puppeteer_launch |
(Optional) launch a browser or connect to an existing Chrome via browserWSEndpoint. Use this for stealth mode, proxies, custom viewport, etc. |
puppeteer_new_page |
Open a new tab. |
puppeteer_navigate |
Go to a URL. |
puppeteer_click |
Click a CSS selector. |
puppeteer_type |
Type into an input. |
puppeteer_get_text |
Read textContent of an element. |
puppeteer_screenshot |
Capture a PNG — returned inline as an MCP image block, optionally also saved to disk. |
puppeteer_evaluate |
Run a JS expression in page context, returns the value. |
puppeteer_wait_for_selector |
Wait until an element appears. |
puppeteer_close_page |
Close a tab. |
puppeteer_close_browser |
Close the whole browser. |
安装
This server does not publish a one-line install command.
Open the repository installation guide 新手?先看 mcpskill.org 教程 →