twolven_mcp-server-puppeteer-py

twolven_mcp-server-puppeteer-py

3.4

A Model Context Protocol server that provides browser automation capabilities using Playwright (Python's equivalent to Puppeteer).

The Puppeteer MCP Server (Python Implementation) is a robust tool for browser automation, leveraging Playwright to offer capabilities similar to Puppeteer. This server allows LLMs to interact with web pages, take screenshots, and execute JavaScript in a real browser environment. It is designed to be a stable alternative to the TypeScript version, with enhanced error handling and logging. The server supports full browser automation, page navigation, screenshot capture, form interaction, JavaScript execution, and console log monitoring. It is highly configurable, with options for timeouts and detailed error handling, making it a comprehensive solution for browser automation tasks.

Features

  • Full browser automation
  • Page navigation
  • Screenshot capture (full page or elements)
  • Form interaction (clicking and filling)
  • JavaScript execution

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_fill: Fill out input fields.
  • puppeteer_evaluate: Execute JavaScript in the browser console.

Usage with Different Platforms

Starting the Server

bash
python puppeteer_server.py

Claude Desktop Configuration


{
  "mcpServers": {
    "puppeteer": {
      "command": "python",
      "args": ["path/to/puppeteer.py"]
    }
  }
}