# Puppeteer Python MCP Server

> Python-based Model Context Protocol server providing browser automation via Playwright, enabling LLMs to interact with web pages, capture screenshots, execute JavaScript, and monitor console logs in real browser environments.

- **URL:** https://github.com/twolven/mcp-server-puppeteer-py
- **Category:** Testing Debugging Tools
- **Tags:** Testing, Browser Automation, Python
- **Updated:** 2026-03-19 19:36
- **Canonical page:** https://mcpserver.ever.works/uk/items/puppeteer-python-mcp-server

## Details

## Overview

Puppeteer Python MCP Server is a Model Context Protocol server that provides comprehensive browser automation capabilities using Playwright in Python. It enables LLMs to interact with web pages, take screenshots, and execute JavaScript in real browser environments.

## Features

### Browser Automation
- Full browser instance management
- Page navigation with configurable options
- Element interaction (click, type, hover)
- Form submission and input handling
- Scroll and viewport manipulation
- PDF generation from web pages

### Screenshot Capabilities
- Full page screenshots
- Element-specific screenshots
- Configurable quality and format
- Custom viewport sizes
- Screenshot annotations

### JavaScript Execution
- Execute arbitrary JavaScript in page context
- Access page DOM and APIs
- Return values from JavaScript to Python
- Async/await support
- Handle JavaScript errors gracefully

### Console Monitoring
- Capture console.log output
- Monitor console errors and warnings
- Track network requests and responses
- Page event monitoring
- Error tracking and reporting

### Configuration Options
- Configurable timeouts for operations
- Custom user agents
- Proxy support
- Cookie management
- Local storage manipulation
- Session persistence

## Use Cases

- Web scraping and data extraction
- Automated testing workflows
- Visual regression testing
- Page performance monitoring
- SEO audits and analysis
- Accessibility testing
- Content verification
- Screenshot automation for documentation

## Technical Implementation

Built with Python and Playwright, providing a Pythonic interface for browser automation through the Model Context Protocol. Supports headless and headed browser modes.

## Integration

Compatible with Claude Desktop, Cursor, VS Code, and other MCP clients. Works with any MCP-compatible AI assistant that supports the Python runtime.

## Error Handling

Comprehensive error handling with detailed error messages, automatic retry mechanisms for transient failures, and graceful degradation for unsupported features.

---

_This Markdown mirror is generated by Ever Works for AI agents. The canonical HTML page is at https://mcpserver.ever.works/uk/items/puppeteer-python-mcp-server._
