home / mcp / puppeteer mcp server

Puppeteer MCP Server

Provides browser automation, screenshots, and JavaScript execution in a real browser for LLMs.

Installation
Add the following to your MCP client configuration file.

Configuration

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

You can use this MCP server to automate browser tasks with Puppeteer, enabling LLMs to navigate pages, take screenshots, click and fill forms, and run JavaScript in a real browser environment. This makes it possible to interact with web pages programmatically and capture useful outputs like screenshots and console logs.

How to use

You will interact with the Puppeteer MCP server through an MCP client. Choose the local stdio option to run it directly on your machine or run it inside a container with Docker. Use the provided tools to navigate pages, capture screenshots, click elements, hover, fill inputs, select options, and execute JavaScript in the browser. You can access browser console logs and capture screenshots by name for later reference.

How to install

Prerequisites you need installed on your machine:

  • Docker (recommended for containerized use)
  • Node.js and npm (optional if you prefer NPX)

Choose one of the two available installation methods: Docker or NPX.

Docker installation steps:

# Pull and run the Puppeteer MCP server in a container
# This uses the Docker configuration shown for MCP integration
# Ensure Docker is running on your system

# Run the container with the required environment and image
# (This exact command is provided as part of the server setup snippet)

NPX installation steps:

# Start the Puppeteer MCP server locally using NPX
npx -y @modelcontextprotocol/server-puppeteer

Configuration and usage notes

Two MCP server configurations are provided. Use the HTTP-based or local stdio approach depending on your environment. The Docker and NPX commands are shown below as exact start methods.

Configuration snippets

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

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

Available tools

puppeteer_navigate

Navigate to a URL in the browser by passing the target URL as the input string.

puppeteer_screenshot

Capture a screenshot of the entire page or a specific element. Provide name, optional selector, and optional width and height.

puppeteer_click

Click an element on the page using a CSS selector.

puppeteer_hover

Hover over an element on the page using a CSS selector.

puppeteer_fill

Fill out an input field by providing a CSS selector and the value to input.

puppeteer_select

Select an option from a SELECT tag by providing a CSS selector and the value to select.

puppeteer_evaluate

Execute JavaScript in the browser console by providing the script.