What is Puppeteer MCP?
Puppeteer MCP is an MCP server for browser automation that exposes a single execute tool, which runs arbitrary JavaScript code with direct access to the Puppeteer Browser instance. It is designed for trusted local development with LLM assistants like Claude Code and Cursor.
How to use Puppeteer MCP?
Install globally via npm install -g pptr-mcp, then add the server to your MCP client configuration (e.g., Claude Desktop) using npx pptr-mcp as the command. Optionally pass custom Chrome flags or set environment variables like CHROME_PATH, PUPPETEER_EXECUTABLE_PATH, and PPTR_MCP_TIMEOUT. Use the execute tool with a code parameter (JavaScript string) and optional persistent boolean (default true) to reuse the browser session.
Key features of Puppeteer MCP
- Single
execute tool runs arbitrary Puppeteer JavaScript code.
- Full Puppeteer API access within one round-trip call.
- Persistent browser session across calls (configurable).
- Supports custom Chrome flags (window size, proxy, etc.).
- Works as a Claude Code plugin via
/plugin add.
Use cases of Puppeteer MCP
- Automating complex multi-step browser workflows in one call.
- Taking screenshots, scraping content, or filling forms with custom logic.
- Testing web applications by executing Puppeteer scripts from an LLM.
- Debugging and interacting with pages that require custom navigation or state.
コメント