Puppeteer MCP Server logo

Puppeteer MCP Server

by merajmehrabi

This MCP server provides browser automation capabilities through Puppeteer, allowing interaction with both new browser instances and existing Chrome windows. It explores alternative approaches to browser automation through the Model Context Protocol.

View on GitHub

Last updated: N/A

What is Puppeteer MCP Server?

The Puppeteer MCP Server is a tool that enables browser automation using Puppeteer within the Model Context Protocol (MCP). It allows users to control and interact with web pages, take screenshots, fill forms, and execute JavaScript, either in new browser instances or by connecting to existing Chrome windows.

How to use Puppeteer MCP Server?

The server can be installed via npm or from source. After installation, it needs to be configured in the MCP settings of applications like Claude (Desktop or VSCode extension). Configuration involves specifying the command to run the server (e.g., puppeteer-mcp-server, npx puppeteer-mcp-server, or node path/to/index.js). The server can be used in standard mode (launching a new browser) or active tab mode (connecting to an existing Chrome instance with remote debugging enabled). Specific tools like puppeteer_navigate, puppeteer_screenshot, etc., are then used to perform actions on the browser.

Key features of Puppeteer MCP Server

  • Navigate web pages

  • Take screenshots

  • Click elements

  • Fill forms

  • Select options

  • Hover elements

  • Execute JavaScript

  • Smart Chrome tab management: Connect to active Chrome tabs, Preserve existing Chrome instances, Intelligent connection handling

Use cases of Puppeteer MCP Server

  • Automated web testing

  • Web scraping

  • Generating screenshots of web pages

  • Automating form filling

  • Integrating browser automation into AI workflows (e.g., with Claude)

FAQ from Puppeteer MCP Server

How do I connect to an existing Chrome instance?

Launch Chrome with remote debugging enabled using the --remote-debugging-port flag. Then, use the puppeteer_connect_active_tab tool.

Where are the logs stored?

Logs are stored in the logs/ directory, with daily rotation and compression.

What if a selector is not found?

The server will return a detailed error message indicating that the element was not found.

How do I install from source?

Clone the repository, install dependencies with npm install, build the project with npm run build, and then run the server with npm start.

What is the default debugging port?

The default debugging port is 9222.