Back to MCP Servers

Puppeteer MCP Server

Reference MCP server for browser automation with Puppeteer: navigate pages, fill forms, click elements, capture screenshots, and run JavaScript. Now archived.

Browser & Web by Anthropic / Model Context Protocol (archived) None active
Overview

Puppeteer is one of the original reference MCP servers published by the Model Context Protocol project. It wraps Puppeteer to give an LLM a real Chromium browser it can drive: navigate to URLs, click and hover over elements, fill inputs, select dropdown options, evaluate arbitrary JavaScript, and capture screenshots of pages or specific elements. Browser console output and saved screenshots are exposed back to the model as MCP resources (console://logs and screenshot://<name>).

The server is distributed as the npm package @modelcontextprotocol/server-puppeteer and as a Docker image (mcp/puppeteer). NPX mode launches a visible browser on the host machine, while the Docker mode runs headless Chromium inside the container. Launch behavior can be tuned with the PUPPETEER_LAUNCH_OPTIONS env var or a launchOptions argument on puppeteer_navigate, and dangerous flags such as --no-sandbox are gated behind an ALLOW_DANGEROUS / allowDangerous opt-in.

Note: this server has been moved to the modelcontextprotocol/servers-archived repository and is no longer actively maintained by the MCP team. It still works for local browsing tasks, but for production browser automation most users now migrate to actively maintained alternatives such as Microsoft's Playwright MCP server or hosted options like Browserbase.

Tools

Tool Description
puppeteer_navigate Navigate the browser to a URL. Can optionally pass Puppeteer launchOptions (restarts the browser if changed) and allowDangerous to permit security-reducing flags like --no-sandbox.
puppeteer_screenshot Take a screenshot of the full page or a specific element identified by a CSS selector. Returns as a saved screenshot resource or as a base64 data URI.
puppeteer_click Click an element on the page matching the given CSS selector.
puppeteer_hover Hover the mouse over an element matching the given CSS selector.
puppeteer_fill Fill an input field with the given text value.
puppeteer_select Choose an option from a SELECT dropdown element.
puppeteer_evaluate Execute arbitrary JavaScript in the browser page context and return the result.
Setup Guide

Prerequisites

  • Node.js (for NPX) or Docker
  • An MCP-compatible client such as Claude Desktop, Cursor, or VS Code
  • No API keys or accounts required (runs a local browser)

Option 1: NPX (visible browser on the host)

Add to your Claude Desktop claude_desktop_config.json:

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

Option 2: Docker (headless Chromium)

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

Build the image locally if needed:

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

Optional environment variables

{
  "env": {
    "PUPPETEER_LAUNCH_OPTIONS": "{\"headless\": false, \"executablePath\": \"C:/Program Files/Google/Chrome/Application/chrome.exe\"}",
    "ALLOW_DANGEROUS": "true"
  }
}
  • PUPPETEER_LAUNCH_OPTIONS: JSON-encoded Puppeteer launch config (headless mode, executable path, etc.).
  • ALLOW_DANGEROUS: set to true to permit launch flags that reduce browser security (such as --no-sandbox).

Security note

Per the README, this server can access local files and local/internal IP addresses because the browser runs on your machine. Treat it like any other tool with local network access.

Status

This server has been moved to modelcontextprotocol/servers-archived and is no longer actively maintained by the MCP team.

Use Cases
  • Drive an end-to-end web flow (open a URL, fill a login form, click through to a page) and capture a screenshot for the agent to inspect.
  • Scrape data from pages that require JavaScript execution by calling puppeteer_evaluate with custom DOM queries.
  • Visual regression checks: navigate to a route and save full-page or element-level screenshots as MCP resources.
  • Debug a third-party site by reading console://logs after navigating, to surface JS errors and warnings to the LLM.
  • Quick exploratory QA on a staging environment from inside a chat client without writing a Playwright/Puppeteer script.
Example Prompts
  • "Open https://news.ycombinator.com, take a screenshot named hn-home, and list the titles of the top 10 stories."
  • "Go to example.com/login, fill #email with test@acme.com and #password with hunter2, then click button[type=submit] and screenshot the resulting page."
  • "Navigate to our staging dashboard and run a puppeteer_evaluate script that returns the text of every .error element."
  • "Hover over the pricing tooltip on stripe.com/pricing and capture an element screenshot of .tooltip."
  • "Read the latest console logs and tell me if any JS errors occurred after loading the checkout page."
Pros
  • Official MCP reference implementation, so the tool schemas are clean and well aligned with the spec.
  • Covers the core browser automation surface (navigate, click, hover, fill, select, evaluate, screenshot) in seven simple tools.
  • Two zero-config install paths (NPX and Docker), no API keys or external accounts required.
  • Exposes browser console output and screenshots as MCP resources, which agents can read back.
Limitations
  • Archived: moved to modelcontextprotocol/servers-archived and no longer actively maintained. Bugs and Puppeteer/Chromium updates are unlikely to land upstream.
  • No built-in support for multiple tabs/contexts, waiting strategies, network interception, or downloads. It is a minimal reference, not a full browser automation framework.
  • Runs a real browser on the host, with access to local files and internal IPs. Needs to be sandboxed or run in Docker for untrusted workloads.
Alternatives
  • Playwright MCP by Microsoft, an actively maintained Playwright-based browser automation server.
  • Browserbase MCP, a hosted browser automation server backed by Browserbase's cloud Chromium fleet.
  • Community Puppeteer forks such as merajmehrabi/puppeteer-mcp-server, which add attaching to existing Chrome windows.