Puppeteer
Browser automation using Puppeteer, with support for local, Docker, and Cloudflare Workers deployments.
Puppeteer MCP Server
A comprehensive Model Context Protocol (MCP) server that provides browser automation capabilities using Puppeteer. This server enables Large Language Models (LLMs) to interact with web pages, take screenshots, and execute JavaScript in both local and cloud environments.
π Features
Core Capabilities
- Browser Automation: Navigate, click, fill forms, and interact with web pages
- Screenshot Capture: Take full-page or element-specific screenshots
- JavaScript Execution: Run custom scripts in browser context
- Console Monitoring: Capture and access browser console logs
- Resource Management: Store and retrieve screenshots and logs
- Security Controls: Configurable dangerous argument filtering
Deployment Options
- Local Development: Direct Puppeteer integration with Chromium
- Docker Container: Containerized deployment with ARM64 support
- Cloudflare Workers: Cloud deployment using external browser services
π¦ Installation & Usage
Option 1: NPX (Recommended for Local Development)
npx -y @modelcontextprotocol/server-puppeteer
Option 2: Docker
docker run -i --rm --init -e DOCKER_CONTAINER=true puppeteer-mcp
Option 3: Build from Source
git clone https://github.com/code-craka/puppeteer-mcp.git
cd puppeteer-mcp
npm install
npm run build
node dist/index.js
π οΈ Available Tools
Navigation & Interaction
puppeteer_navigate- Navigate to URLs with optional launch optionspuppeteer_click- Click elements using CSS selectorspuppeteer_hover- Hover over elementspuppeteer_fill- Fill input fields and formspuppeteer_select- Select dropdown options
Content & Automation
puppeteer_screenshot- Capture page or element screenshotspuppeteer_evaluate- Execute JavaScript in browser context
Resources
console://logs- Access browser console outputscreenshot://<name>- Retrieve captured screenshots
π§ Configuration
Claude Desktop Configuration
Add to your claude_desktop_config.json:
{
"mcpServers": {
"puppeteer": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-puppeteer"]
}
}
}
Docker Configuration
{
"mcpServers": {
"puppeteer": {
"command": "docker",
"args": ["run", "-i", "--rm", "--init", "-e", "DOCKER_CONTAINER=true", "puppeteer-mcp"]
}
}
}
Environment Variables
PUPPETEER_LAUNCH_OPTIONS- JSON-encoded browser launch optionsALLOW_DANGEROUS- Enable dangerous browser arguments (default: false)DOCKER_CONTAINER- Container detection flag
Browser Launch Options
{
"mcpServers": {
"puppeteer": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-puppeteer"],
"env": {
"PUPPETEER_LAUNCH_OPTIONS": "{\"headless\": false, \"args\": [\"--no-sandbox\"]}",
"ALLOW_DANGEROUS": "true"
}
}
}
}
ποΈ Development
Local Development
# Clone the repository
git clone https://github.com/code-craka/puppeteer-mcp.git
cd puppeteer-mcp
# Install dependencies
npm install
# Development with watch mode
npm run watch
# Build for production
npm run build
Docker Development
# Build Docker image
docker build -t puppeteer-mcp .
# Run with environment variables
docker run -i --rm --init \
-e DOCKER_CONTAINER=true \
-e PUPPETEER_LAUNCH_OPTIONS='{"headless":true}' \
puppeteer-mcp
βοΈ Cloudflare Workers Deployment
π Live Production Deployment
Live URL: https://puppeteer.techsci.dev
Our Puppeteer MCP server is successfully deployed on Cloudflare Workers with Browserless.io integration.
β Deployment Status
- Status: Live and operational
- Browser Service: Browserless.io connected
- API Calls: Screenshots working β
- Tools Available: 6 browser automation tools
- Response Time: ~1-2 seconds average
π οΈ Deploy Your Own
cd cloudflare-worker
npm install # Installs Wrangler v4.22.0 + secure dependencies
npx wrangler login
echo "YOUR_BROWSERLESS_TOKEN" | npx wrangler secret put BROWSERLESS_TOKEN
npm run build # Compile TypeScript to dist/index.js
npm run deploy # Deploy using latest Wrangler v4.22.0
π§ͺ Test the Live Deployment
# Test tools listing
curl -X POST https://puppeteer.techsci.dev \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"tools/list","id":"test"}'
# Test screenshot capture
curl -X POST https://puppeteer.techsci.dev \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"tools/call","params":{"name":"browser_screenshot","arguments":{"name":"test","url":"https://example.com"}},"id":"test"}'
π° Production Costs
- Cloudflare Workers: 100,000 requests/day free
- Browserless.io: ~$0.0025 per second of browser usage
- Monthly estimate: $10-50 for moderate usage
See Cloudflare Worker README for detailed setup instructions.
π Security
Default Security Measures
- Dangerous browser arguments are filtered by default
- Configurable security levels via environment variables
- Headless mode in Docker containers
- Scoped permissions for different deployment environments
- Latest Updates: All dependencies updated, 0 security vulnerabilities
- Secure Build: esbuild v0.25.0+ and Wrangler v4.22.0 with latest patches
Dangerous Arguments (Filtered by Default)
--no-sandbox--disable-setuid-sandbox--single-process--disable-web-security--ignore-certificate-errors
Override with ALLOW_DANGEROUS=true environment variable.
π Examples
Basic Screenshot
{
"name": "puppeteer_screenshot",
"arguments": {
"name": "example-page",
"width": 1280,
"height": 720
}
}
Navigate and Interact
{
"name": "puppeteer_navigate",
"arguments": {
"url": "https://example.com",
"launchOptions": {
"headless": false
}
}
}
Execute JavaScript
{
"name": "puppeteer_evaluate",
"arguments": {
"script": "return document.title;"
}
}
π Architecture
βββββββββββββββββββ ββββββββββββββββββββ βββββββββββββββββββ
β MCP Client β β Puppeteer MCP β β Browser β
β (Claude, etc.) βββββΊβ Server βββββΊβ (Chromium) β
βββββββββββββββββββ ββββββββββββββββββββ βββββββββββββββββββ
β
βΌ
ββββββββββββββββββββ
β Cloud Services β
β (Browserless.io) β
ββββββββββββββββββββ
π€ Contributing
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature - Commit your changes:
git commit -m 'Add amazing feature' - Push to the branch:
git push origin feature/amazing-feature - Open a Pull Request
π License
This project is licensed under the MIT License - see the LICENSE file for details.
π Acknowledgments
- Model Context Protocol - The protocol that makes this possible
- Puppeteer - Headless Chrome Node.js API
- Anthropic - Original MCP server implementation
- Browserless.io - Cloud browser automation service
π Related Projects
- MCP SDK - Model Context Protocol SDK
- Claude Desktop - AI assistant with MCP support
- Puppeteer - Browser automation library
π Support
- Create an issue for bug reports
- Join discussions in GitHub Discussions
- Check the CLAUDE.md for development guidance
π·οΈ Version History
- v1.0.0 - Initial release with local Puppeteer support
- v1.1.0 - Added Docker support and ARM64 compatibility
- v1.2.0 - Cloudflare Workers adaptation with external browser services
- v1.3.0 - β Live Production Deployment - Successfully deployed on Cloudflare Workers with Browserless.io integration, tested and confirmed working
- v1.4.0 - π Security & Performance Update - Updated Wrangler to v4.22.0, fixed esbuild vulnerabilities, added observability logs, resolved all npm audit issues (0 vulnerabilities)
Author: Sayem Abdullah Rihan
License: MIT
Repository: github.com/code-craka/puppeteer-mcp
Verwandte Server
Bright Data
SponsorDiscover, extract, and interact with the web - one interface powering automated access across the public internet.
Conduit
Headless browser with SHA-256 hash-chained audit trails and Ed25519-signed proof bundles. MCP server for AI agents.
scrape-do-mcp
MCP Server for Scrape.do - Web Scraping & Google Search with anti-bot bypass
Redbook Search & Comment Tool
An automated tool to search notes, analyze content, and post AI-generated comments on Xiaohongshu (Redbook) using Playwright.
Website Snapshot
A MCP server that provides comprehensive website snapshot capabilities using Playwright. This server enables LLMs to capture and analyze web pages through structured accessibility snapshots, network monitoring, and console message collection.
Query Table
A financial web table crawler using Playwright that queries data from multiple websites with fallback switching.
BrowserAct
BrowserAct MCP Server is a standardized MCP service that lets MCP clients connect to the BrowserAct platform to discover and run browser automation workflows, access results/files and related storage, and trigger real-world actions via natural language.
MCP Orlen Wholesale Price
Model Context Protocol Servers for Orlen Wholesale Price.
Yahoo Finance
Provides comprehensive financial data from Yahoo Finance, including historical prices, company info, financial statements, and market news.
Intelligence Aeternum (Fluora MCP)
AI training dataset marketplace β 2M+ museum artworks across 7 world-class institutions with on-demand 111-field Golden Codex AI enrichment. x402 USDC micropayments on Base L2. First monetized art/provenance MCP server. Research-backed: dense metadata improves VLM capability by +25.5% (DOI: 10.5281/zenodo.18667735)
Amazon Scraper API
An MCP server that connects AI agents to Amazon product, search, and review data across 20 marketplaces via the ChocoData Amazon Scraper API.