Puppeteer MCP Server (Python Implementation)
Overview
Puppeteer MCP Server is a Python-based Model Context Protocol server that facilitates browser automation by allowing large language models (LLMs) to interact with web pages, take screenshots, and execute JavaScript in a real browser environment using Playwright, Python's equivalent to Puppeteer.
- Install the required packages by running
pip install -r requirements.txt. - Install Playwright browsers using
playwright install. - Start the server by executing the command
python puppeteer_server.py. - Configure your application to use the server by updating the Claude configuration file with the server details.
- Full browser automation capabilities. - Page navigation and interaction support. - Screenshot capture functionality for full pages or specific elements. - JavaScript execution in the browser environment. - Console log monitoring and detailed error handling. - Comprehensive logging with multiple severity levels to assist debugging.
- Automating web testing by simulating user interactions.
- Taking screenshots of web pages for documentation purposes.
- Scraping data from websites by interacting with elements dynamically.
- Executing JavaScript code to test site functionality.
Add to your AI client
Use these steps to connect Puppeteer MCP Server (Python Implementation) in Cursor, Claude, VS Code, and other MCP-compatible apps. The same JSON appears in the Use with menu above for one-click copy.
Cursor
Add this to your .cursor/mcp.json file in your project root, then restart Cursor.
.cursor/mcp.json
{
"mcpServers": {
"mcp-server-puppeteer-py-twolven": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-mcp-server-puppeteer-py-twolven"
]
}
}
}Claude Desktop
Add this server entry to the mcpServers object in your Claude Desktop config, then restart the app.
~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows)
{
"mcpServers": {
"mcp-server-puppeteer-py-twolven": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-mcp-server-puppeteer-py-twolven"
]
}
}
}Claude Code
Add this to your project's .mcp.json file. Claude Code will detect it automatically.
.mcp.json (project root)
{
"mcpServers": {
"mcp-server-puppeteer-py-twolven": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-mcp-server-puppeteer-py-twolven"
]
}
}
}VS Code (Copilot)
Add this to your .vscode/mcp.json file. Requires the GitHub Copilot extension with MCP support enabled.
.vscode/mcp.json
{
"servers": {
"mcp-server-puppeteer-py-twolven": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-mcp-server-puppeteer-py-twolven"
]
}
}
}Windsurf
Add this to your Windsurf MCP config file, then restart Windsurf.
~/.codeium/windsurf/mcp_config.json
{
"mcpServers": {
"mcp-server-puppeteer-py-twolven": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-mcp-server-puppeteer-py-twolven"
]
}
}
}Cline
Open Cline settings, navigate to MCP Servers, and add this server configuration.
Cline MCP Settings (via UI)
{
"mcpServers": {
"mcp-server-puppeteer-py-twolven": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-mcp-server-puppeteer-py-twolven"
]
}
}
}