mcp-puppeteer

mcp-puppeteer

3.5

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

Top Comments

The Puppeteer MCP server enables Language Model Models (LLMs) to interact with web pages in a real browser environment. It allows for browser automation, including navigation, clicking, form filling, and JavaScript execution. This server is particularly useful for tasks that require interaction with web pages, such as taking screenshots or monitoring console logs. By leveraging Puppeteer, the server can perform complex web interactions, making it a powerful tool for developers and researchers working with LLMs. The server supports both Docker and NPX configurations, providing flexibility in deployment. It is licensed under the MIT License, allowing for free use, modification, and distribution.

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'}

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"]
    }
  }
}

Docker Build

bash
docker build -t mcp/puppeteer -f src/puppeteer/Dockerfile .