Puppeteer MCP Server (Python) logo

Puppeteer MCP Server (Python)

by twolven

A Model Context Protocol server providing browser automation capabilities using Playwright (Python's equivalent to Puppeteer). It enables LLMs to interact with web pages, take screenshots, and execute JavaScript in a real browser environment.

View on GitHub

Last updated: N/A

What is Puppeteer MCP Server (Python)?

This Python implementation of a Model Context Protocol (MCP) server provides browser automation capabilities, allowing Large Language Models (LLMs) to interact with web pages through Playwright, the Python equivalent of Puppeteer. It offers improved error handling and logging compared to the TypeScript version.

How to use Puppeteer MCP Server (Python)?

  1. Install Python 3.8+ and pip. 2. Install required packages using pip install -r requirements.txt. 3. Install Playwright browsers using playwright install. 4. Run the server using python puppeteer_server.py. 5. Configure your Claude Desktop application to use the server by adding the server configuration to your Claude configuration file.

Key features of Puppeteer MCP Server (Python)

  • Full browser automation

  • Page navigation

  • Screenshot capture (full page or elements)

  • Form interaction (clicking and filling)

  • JavaScript execution

  • Console log monitoring

  • Configurable timeouts

  • Detailed error handling

  • Comprehensive logging

Use cases of Puppeteer MCP Server (Python)

  • Automated web scraping

  • LLM-driven web interaction

  • Automated testing

  • Generating screenshots for documentation

FAQ from Puppeteer MCP Server (Python)

What is the default viewport size?

The default viewport size is 1280x720.

Are timeouts configurable?

Yes, all timeouts are configurable.

Are console logs captured?

Yes, console logs are captured and stored.

How are screenshots stored?

Screenshots are stored in memory with base64 encoding.

What license is this project under?

This project is licensed under the Apache 2.0 License.