Get the FREE Ultimate OpenClaw Setup Guide →

mcp -puppeteer-py

MCP server providing browser automation via Playwright (Python), enabling LLMs to interact with web pages, take screenshots, and execute JavaScript in a real browser.

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio twolven-mcp-server-puppeteer-py python path/to/puppeteer.py

How to use

This MCP server provides browser automation capabilities via Playwright in Python. It exposes tools that let an LLM-driven agent open web pages, navigate, take full-page or element-specific screenshots, interact with forms and UI elements, and execute JavaScript within a real browser. Key tools include puppeteer_navigate for loading URLs, puppeteer_screenshot for capturing visuals, puppeteer_click and puppeteer_fill for interacting with page elements, and puppeteer_evaluate for running scripts in the page context. The server outputs structured results and captures console logs to help diagnose issues during browser automation tasks.

How to install

Prerequisites:

  • Python 3.8+
  • pip (Python package installer)

Installation steps:

  1. Create and activate a Python virtual environment (optional but recommended): python -m venv venv source venv/bin/activate # On Windows use: venv\Scripts\activate

  2. Install required packages: pip install -r requirements.txt

  3. Install Playwright browsers: playwright install

  4. Run the server: python puppeteer_server.py

Notes:

  • Ensure that the path the MCP uses to puppeteer_server.py matches your project structure.
  • If you modify dependencies, update requirements.txt accordingly.

Additional notes

Tips and considerations:

  • Browser launches may be non-headless by default for debugging; verify your configuration if headless behavior is required.
  • The default viewport is 1280x720; adjust as needed for your tasks.
  • Timeouts are configurable per tool invocation—tune them to balance responsiveness and reliability in your environment.
  • Console logs from the automated browser are captured for analysis; inspect them when failures occur.
  • Screenshots are stored in memory and can be returned as base64-encoded data; adjust storage strategy if you need persistent artifacts.
  • If you encounter navigation or element-not-found errors, double-check selectors and page readiness before retrying.

Related MCP Servers

Sponsor this space

Reach thousands of developers