drio
Open app

Puppeteer MCP Server (Python Implementation)

Source

Mirror of

Catalog onlyCatalog onlySTDIO

Overview

Puppeteer MCP Server is a Model Context Protocol server implemented in Python that provides browser automation capabilities using Playwright, enabling LLMs to interact with web pages, take screenshots, and execute JavaScript in a real browser environment.

To use the server, install the required packages, set up the Playwright browsers, and start the server with a simple Python command. Configuration for Claude desktop is also provided for integration.

  • Full browser automation capabilities - Page navigation - Full-page or element-specific screenshot capture - Form interaction, including clicking and filling forms - JavaScript execution in the browser - Comprehensive error handling and logging
  1. Automating web testing and navigation
  2. Capturing screenshots for web scraping and documentation
  3. Executing JavaScript for dynamic web content manipulation

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": {
    "twolven-mcp-server-puppeteer-py-mcp-mirror": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-twolven-mcp-server-puppeteer-py-mcp-mirror"
      ]
    }
  }
}

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": {
    "twolven-mcp-server-puppeteer-py-mcp-mirror": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-twolven-mcp-server-puppeteer-py-mcp-mirror"
      ]
    }
  }
}

Claude Code

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

.mcp.json (project root)

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

VS Code (Copilot)

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

.vscode/mcp.json

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

Windsurf

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

~/.codeium/windsurf/mcp_config.json

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

Cline

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

Cline MCP Settings (via UI)

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

FAQ

What programming language is Puppeteer MCP Server built with?

It is built in Python using Playwright for browser automation.

Is there any error handling mechanism in place?

Yes! The server provides detailed error messages for common failures including navigation and element not found errors.

Can I run this server in headless mode?

By default, the server runs in non-headless mode for better debugging, but configurations allow headless operation.7:["$","div",null,{"className":"container mx-auto flex flex-col gap-4","children":["$L26","$L27",["$","$L28",null,{"currentProject":{"id":575,"uuid":"e73c0589-097f-4ddc-93be-5cc4b4d1b861","name":"twolven_mcp-server-puppeteer-py","title":"Puppeteer MCP Server (Python Implementation)","description":"Mirror of","avatar_url":"https://avatars.githubusercontent.com/u/192820360?v=4","created_at":"$D2024-12-30T02:56:24.213Z","updated_at":"$D2025-01-05T02:59:52.837Z","status":"created","author_name":"MCP-Mirror","author_avatar_url":"https://avatars.githubusercontent.com/u/192820360?v=4","tags":"puppeteer,browser-automation,python","category":"browser-automation","is_featured":false,"sort":1,"url":"https://github.com/MCP-Mirror/twolven_mcp-server-puppeteer-py","target":"_self","content":"$29","summary":"$2a","img_url":null,"type":null,"metadata":null,"user_uuid":null,"tools":null,"sse_url":null,"sse_provider":null,"sse_params":null,"is_official":false,"server_command":null,"server_params":null,"server_config":null,"allow_call":false,"is_innovation":false,"is_dxt":false,"dxt_manifest":null,"dxt_file_url":null,"is_audit":false},"randomProjects":[],"currentServerKey":"$undefined"}]]}]