Get the FREE Ultimate OpenClaw Setup Guide →

mcp -puppeteer

An MCP server for Puppeteer

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio zed-extensions-mcp-server-puppeteer npx -y @modelcontextprotocol/server-puppeteer

How to use

This MCP server provides a remote Puppeteer-based control surface via the Model Context Protocol. The underlying server (from @modelcontextprotocol) spins up a Puppeteer-powered headless browser and exposes a set of MCP commands to drive pages, interact with DOM elements, evaluate JavaScript, and capture artifacts such as screenshots or PDFs. As a Zed extension wrapper, this server allows your Zed workflows to delegate browser automation tasks to a centralized, scriptable service. You can initiate a browser context, navigate to URLs, fill forms, click elements, evaluate scripts, and request artifacts, all through MCP messages to the puppeteer server. Typical use cases include automated web testing, UI automation, or generating page previews from within your MCP-enabled tooling.

To use it, start the server via the MCP entry point described in this repository (via the mcp_config below). Once running, send MCP commands that correspond to Puppeteer actions (e.g., launch a page, go to a URL, type text, take a screenshot, or extract content). The wrapper exposes the same Puppeteer-like capabilities but through the MCP protocol, enabling integration with other MCP-enabled services and clients.

How to install

Prerequisites:

  • Node.js (12+) and npm installed on the host where you run the MCP server.
  • Internet access to install the npm package if you choose to install locally.

Installation steps:

  1. Ensure Node.js and npm are installed:

    • Check versions: node -v and npm -v
  2. Install and run the MCP Puppeteer server using npx (no permanent installation required):

    • npx -y @modelcontextprotocol/server-puppeteer

    This will fetch the server-puppeteer package and start the MCP server, exposing the configured mcpServers entry.

  3. Optional: install locally for repeatable deployments (alternative):

    • mkdir mcp-puppeteer && cd mcp-puppeteer
    • npm init -y
    • npm install @modelcontextprotocol/server-puppeteer
    • node node_modules/@modelcontextprotocol/server-puppeteer/index.js
  4. Verify the server is reachable and listening for MCP messages at the configured port (as defined by the server, typically localhost:PORT). If you need to customize environment variables, refer to the additional notes.

Additional notes

Notes and tips:

  • Environment variables: you may want to set variables for Puppeteer options, such as headless mode, default viewport, or executablePath for custom Chromium builds. Example placeholders: { "PUPPETEER_HEADLESS": "true", "PUPPETEER_DEFAULT_VIEWPORT": "800x600" }
  • Resource usage: Puppeteer can be memory intensive. Monitor CPU/memory if running multiple concurrent pages.
  • Troubleshooting: If the server fails to start, ensure no other process is bound to the default MCP port and that Node.js dependencies were resolved (no network blocks, correct Node version).
  • Security: Expose command surface only to trusted clients; consider network restrictions and access controls when enabling remote browser automation.
  • Protocol specifics: The server translates MCP commands into Puppeteer API calls. Refer to the MCP server Puppeteer documentation for the exact command names, payload shapes, and response formats.

Related MCP Servers

Sponsor this space

Reach thousands of developers