Navigation
Puppeteer: Browser Automation & Web Scraping - MCP Implementation

Puppeteer: Browser Automation & Web Scraping

Puppeteer: Master browser automation and web scraping – seamlessly automate tasks, extract data reliably, and conquer complex workflows effortlessly." (139 characters)

Browser Automation
4.7(49 reviews)
73 saves
34 comments

Ranked in the top 8% of all AI tools in its category

About Puppeteer

What is Puppeteer: Browser Automation & Web Scraping?

Puppeteer is a Model Context Protocol (MCP) server enabling browser automation and web scraping tasks. It leverages Headless Chrome to let Large Language Models (LLMs) interact with real web pages, execute JavaScript, capture screenshots, and perform user-like actions such as clicks, form fills, and element selections. This server acts as a bridge between AI systems and dynamic web content, extending their operational capabilities beyond static text processing.

How to use Puppeteer: Browser Automation & Web Scraping?

Deployment Options

  • Docker: Run headless Chromium via Docker with the command:
    docker run -i --rm --init -e DOCKER_CONTAINER=true mcp/puppeteer
  • NPX: Launch a visible browser window using:
    npx -y @modelcontextprotocol/server-puppeteer

Once deployed, access tools like puppeteer_click or puppeteer_evaluate through the MCP interface to automate tasks programmatically.

Puppeteer Features

Key Features of Puppeteer: Browser Automation & Web Scraping?

Core capabilities include:

  • Full-page or element-specific screenshots with customizable dimensions
  • Real-time console log access for debugging
  • Programmatic interaction with web elements (clicks, hovers, form inputs)
  • Custom JavaScript execution in browser context
  • Resource management for persistent console logs and screenshot storage

Use cases of Puppeteer: Browser Automation & Web Scraping?

Common applications include:

  • Automated UI testing for web applications
  • Data extraction from JavaScript-rendered websites
  • Generating compliance-ready screenshots for audits
  • Automating repetitive form submissions
  • Monitoring dynamic content like stock prices or flight data

Puppeteer FAQ

FAQ: Puppeteer Browser Automation

Can I run Puppeteer in non-headless mode?

Yes – the NPX method launches a visible browser window for interactive debugging. Docker deployments default to headless mode for server environments.

How is session data handled?

Console logs and screenshots are stored as persistent resources, accessible via MCP API endpoints. Developers can programmatically retrieve these for analysis or reporting.

What licensing applies?

Puppeteer follows the MIT License, allowing free use and modification for both open-source and commercial projects. Full terms available here.

Content

Puppeteer

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

Components

Tools

  • puppeteer_navigate

    • Navigate to any URL in the browser
    • Input: url (string)
  • puppeteer_screenshot

    • Capture screenshots of the entire page or specific elements
    • Inputs:
      • name (string, required): Name for the screenshot
      • selector (string, optional): CSS selector for element to screenshot
      • width (number, optional, default: 800): Screenshot width
      • height (number, optional, default: 600): Screenshot height
  • puppeteer_click

    • Click elements on the page
    • Input: selector (string): CSS selector for element to click
  • puppeteer_hover

    • Hover elements on the page
    • Input: selector (string): CSS selector for element to hover
  • puppeteer_fill

    • Fill out input fields
    • Inputs:
      • selector (string): CSS selector for input field
      • value (string): Value to fill
  • puppeteer_select

    • Select an element with SELECT tag
    • Inputs:
      • selector (string): CSS selector for element to select
      • value (string): Value to select
  • puppeteer_evaluate

    • Execute JavaScript in the browser console
    • Input: script (string): JavaScript code to execute

Resources

The server provides access to two types of resources:

  1. Console Logs (console://logs)
* Browser console output in text format
* Includes all console messages from the browser
  1. Screenshots (screenshot://<name>)
* PNG images of captured screenshots
* Accessible via the screenshot name specified during capture

Key Features

  • Browser automation
  • Console log monitoring
  • Screenshot capabilities
  • JavaScript execution
  • Basic web interaction (navigation, clicking, form filling)

Configuration to use Puppeteer Server

Here's the Claude Desktop configuration to use the Puppeter server:

Docker

NOTE The docker implementation will use headless chromium, where as the NPX version will open a browser window.

{
  "mcpServers": {
    "puppeteer": {
      "command": "docker",
      "args": ["run", "-i", "--rm", "--init", "-e", "DOCKER_CONTAINER=true", "mcp/puppeteer"]
    }
  }
}

NPX

{
  "mcpServers": {
    "puppeteer": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-puppeteer"]
    }
  }
}

Build

Docker build:

docker build -t mcp/puppeteer -f src/puppeteer/Dockerfile .

License

This MCP server is licensed under the MIT License. This means you are free to use, modify, and distribute the software, subject to the terms and conditions of the MIT License. For more details, please see the LICENSE file in the project repository.

Related MCP Servers & Clients