MCP-Puppeteer-Advanced-Cursor-...-

MCP-Puppeteer-Advanced-Cursor-...-

3.3

A Model Context Protocol server that provides browser automation capabilities using Puppeteer.

The Puppeteer MCP server enables LLMs to interact with web pages in a real browser environment. It allows for navigation, screenshot capture, image extraction, JavaScript execution, and more. This server is particularly useful for tasks that require browser automation, such as web scraping, testing, and data extraction. With Puppeteer, users can simulate user interactions, manage multiple browser tabs, and customize browser settings to suit their needs. The server supports both headless and non-headless modes, providing flexibility for different use cases.

Features

  • Browser automation
  • Console log monitoring
  • Screenshot capabilities
  • JavaScript execution
  • Basic web interaction (navigation, clicking, form filling)

MCP Tools

  • {'puppeteer_navigate': 'Navigate to any URL in the browser'}
  • {'puppeteer_screenshot': 'Capture screenshots of the entire page or specific elements'}
  • {'puppeteer_click': 'Click elements on the page'}
  • {'puppeteer_hover': 'Hover elements on the page'}
  • {'puppeteer_fill': 'Fill out input fields'}
  • {'puppeteer_select': 'Select an element with SELECT tag'}
  • {'puppeteer_evaluate': 'Execute JavaScript in the browser console'}
  • {'puppeteer_extract_images': 'Extract all images from the page'}
  • {'puppeteer_download_images': 'Download extracted images to a specified folder'}
  • {'puppeteer_analyze_element': 'Analyze a DOM element to extract its HTML structure, Markdown representation, and applied styles'}
  • {'puppeteer_browser_status': 'Check browser status, list open tabs, and manage tab switching'}
  • {'puppeteer_analyze_page_hierarchy': 'Analyze the DOM hierarchy of a page'}
  • {'puppeteer_viewport_switcher': 'Switch the browser viewport to simulate different devices'}
  • {'puppeteer_navigation_history': 'Navigate back or forward in browser history'}

MCP Resources

  • {'Console Logs': 'Browser console output in text format'}
  • {'Screenshots': 'PNG images of captured screenshots'}

Usage with Different Platforms

Docker


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

NPX


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

Launch Options


{
  "mcpServers": {
    "mcp-puppeteer": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-puppeteer"],
      "env": {
        "PUPPETEER_LAUNCH_OPTIONS": "{ \"headless\": false, \"executablePath\": \"C:/Program Files/Google/Chrome/Application/chrome.exe\", \"args\": [] }",
        "ALLOW_DANGEROUS": "true"
      }
    }
  }
}