Puppeteer

v1.0.0Browser Automationstable

Self-hosted Puppeteer MCP server with remote SSE access, API key authentication, and Docker deployment. Complete tool suite for browser automation via Model Context Protocol.

apiauthenticationbrowser-automationdockerheadless-browser
Share:
19
Stars
0
Downloads
0
Weekly
0/5

What is Puppeteer?

Puppeteer is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to self-hosted puppeteer mcp server with remote sse access, api key authentication, and docker deployment. complete tool suite for browser automation via model context protocol.

Self-hosted Puppeteer MCP server with remote SSE access, API key authentication, and Docker deployment. Complete tool suite for browser automation via Model Context Protocol.

This server falls under the Browser Automation category on MCPgee, the world's largest MCP server directory with 33,000+ servers.

Features

  • puppeteer_navigate
  • puppeteer_screenshot
  • puppeteer_click
  • puppeteer_fill
  • puppeteer_select

Use Cases

Headless browser automation
Web scraping and testing
sultannaufal

Maintainer

LicenseMIT
Languagetypescript
Versionv1.0.0
UpdatedApr 10, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

NPM

npx -y @modelcontextprotocol/server-puppeteer

Manual Installation

npx -y @modelcontextprotocol/server-puppeteer

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

How to Set Up and Use Puppeteer

This Puppeteer MCP Server provides a self-hosted, remotely accessible browser automation gateway built on top of Puppeteer, exposing 16 tools for navigation, screenshot capture, form interaction, JavaScript execution, cookie management, and advanced mouse control. It runs as a Docker container with API key authentication and supports both Streamable HTTP (MCP 2025-06-18) and legacy SSE transports, making it suitable for teams that need shared browser automation infrastructure accessible from multiple Claude instances or CI pipelines rather than a locally installed browser.

Prerequisites

  • Docker and Docker Compose installed on your server
  • Node.js 18+ if running without Docker
  • An MCP-compatible client such as Claude Desktop or Cursor
  • A securely generated API key for bearer token authentication (the server requires one — it has no default)
1

Clone the repository

Clone the puppeteer-mcp-server repository to your machine or server.

git clone https://github.com/sultannaufal/puppeteer-mcp-server.git
cd puppeteer-mcp-server
2

Create the .env file with your API key

Generate a secure random API key and write it to a .env file. This key will be required for all MCP connections to the server.

echo "API_KEY=$(openssl rand -hex 32)" > .env
# Also optionally set:
# PORT=3000
# BROWSER_TIMEOUT=30000
# LOG_LEVEL=info
3

Start the server with Docker Compose

Build and start the container. The server binds to the configured PORT (default 3000) and launches a headless Chromium instance inside the container.

docker compose --env-file .env up -d
4

Verify the server is running

Check the container logs to confirm the MCP server started and Chromium initialized correctly.

docker compose logs -f
5

Add the server to your MCP client configuration

Register the running server endpoint in claude_desktop_config.json. Use the Streamable HTTP transport pointing to your server's address with the API key as the bearer token.

Puppeteer Examples

Client configuration

Claude Desktop configuration connecting to the self-hosted Puppeteer MCP server over HTTP with bearer token authentication. Replace the API key and host with your actual values.

{
  "mcpServers": {
    "puppeteer": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-puppeteer"],
      "env": {
        "API_KEY": "your_secure_api_key_here",
        "PORT": "3000",
        "BROWSER_TIMEOUT": "30000"
      }
    }
  }
}

Prompts to try

Use Puppeteer tools to automate browser tasks, capture screenshots, and interact with web applications.

- "Navigate to https://example.com and take a screenshot."
- "Fill the login form at https://app.example.com with username '[email protected]' and submit it."
- "Take a screenshot of https://dashboard.example.com after logging in with the stored session cookie."
- "Execute this JavaScript on the current page and return the result: document.querySelectorAll('h1').length"
- "Drag the element with id 'card-1' and drop it onto the element with id 'column-2'."
- "Get all cookies for the current session and show me the authentication tokens."

Troubleshooting Puppeteer

Container starts but Chromium crashes immediately

Headless Chromium inside Docker requires the --no-sandbox flag and sufficient shared memory. Add '--shm-size=2gb' to your docker run command or add 'shm_size: 2gb' under the service in docker-compose.yml. Also ensure the container has at least 512MB of RAM available.

Authentication errors: '401 Unauthorized' from the MCP server

The API_KEY environment variable in your MCP client config must exactly match the API_KEY set in the server's .env file. Check for leading/trailing spaces or newline characters if copying the key manually.

Timeouts on slow pages or complex interactions

Increase BROWSER_TIMEOUT in the server's .env file (default is 30000ms = 30 seconds). For JavaScript-heavy SPAs, add explicit waits in your prompts: ask Claude to 'wait for the network to be idle' before taking a screenshot.

Frequently Asked Questions about Puppeteer

What is Puppeteer?

Puppeteer is a Model Context Protocol (MCP) server that self-hosted puppeteer mcp server with remote sse access, api key authentication, and docker deployment. complete tool suite for browser automation via model context protocol. It connects AI assistants to external tools and data sources through a standardized interface.

How do I install Puppeteer?

Install via npm with the command: npx -y @modelcontextprotocol/server-puppeteer. Then add the server configuration to your AI client's JSON config file (e.g., claude_desktop_config.json or .cursor/mcp.json).

Which AI clients work with Puppeteer?

Puppeteer works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.

Is Puppeteer free to use?

Yes, Puppeteer is open source and available under the MIT license. You can use it freely in both personal and commercial projects.

Browse More Browser Automation MCP Servers

Explore all browser automation servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.

Quick Config Preview

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

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

Ready to use Puppeteer?

Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.

33,000+ ServersFree & Open SourceStep-by-Step Guides