drio
Open app

Puppeteer MCP Server (Python Implementation)

Source

Catalog onlyCatalog onlySTDIO

Overview

Puppeteer MCP Server is a Python-based Model Context Protocol server that facilitates browser automation by allowing large language models (LLMs) to interact with web pages, take screenshots, and execute JavaScript in a real browser environment using Playwright, Python's equivalent to Puppeteer.

  1. Install the required packages by running pip install -r requirements.txt.
  2. Install Playwright browsers using playwright install.
  3. Start the server by executing the command python puppeteer_server.py.
  4. Configure your application to use the server by updating the Claude configuration file with the server details.
  • Full browser automation capabilities. - Page navigation and interaction support. - Screenshot capture functionality for full pages or specific elements. - JavaScript execution in the browser environment. - Console log monitoring and detailed error handling. - Comprehensive logging with multiple severity levels to assist debugging.
  1. Automating web testing by simulating user interactions.
  2. Taking screenshots of web pages for documentation purposes.
  3. Scraping data from websites by interacting with elements dynamically.
  4. Executing JavaScript code to test site functionality.

Add to your AI client

Use these steps to connect Puppeteer MCP Server (Python Implementation) in Cursor, Claude, VS Code, and other MCP-compatible apps. The same JSON appears in the Use with menu above for one-click copy.

Cursor

Add this to your .cursor/mcp.json file in your project root, then restart Cursor.

.cursor/mcp.json

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

Claude Desktop

Add this server entry to the mcpServers object in your Claude Desktop config, then restart the app.

~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows)

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

Claude Code

Add this to your project's .mcp.json file. Claude Code will detect it automatically.

.mcp.json (project root)

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

VS Code (Copilot)

Add this to your .vscode/mcp.json file. Requires the GitHub Copilot extension with MCP support enabled.

.vscode/mcp.json

{
  "servers": {
    "mcp-server-puppeteer-py-twolven": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-mcp-server-puppeteer-py-twolven"
      ]
    }
  }
}

Windsurf

Add this to your Windsurf MCP config file, then restart Windsurf.

~/.codeium/windsurf/mcp_config.json

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

Cline

Open Cline settings, navigate to MCP Servers, and add this server configuration.

Cline MCP Settings (via UI)

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