Browser automation using Puppeteer, with support for local, Docker, and Cloudflare Workers deployments.
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.
npx -y @modelcontextprotocol/server-puppeteer
docker run -i --rm --init -e DOCKER_CONTAINER=true puppeteer-mcp
git clone https://github.com/code-craka/puppeteer-mcp.git
cd puppeteer-mcp
npm install
npm run build
node dist/index.js
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 optionspuppeteer_screenshot
- Capture page or element screenshotspuppeteer_evaluate
- Execute JavaScript in browser contextconsole://logs
- Access browser console outputscreenshot://<name>
- Retrieve captured screenshotsAdd to your claude_desktop_config.json
:
{
"mcpServers": {
"puppeteer": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-puppeteer"]
}
}
}
{
"mcpServers": {
"puppeteer": {
"command": "docker",
"args": ["run", "-i", "--rm", "--init", "-e", "DOCKER_CONTAINER=true", "puppeteer-mcp"]
}
}
}
PUPPETEER_LAUNCH_OPTIONS
- JSON-encoded browser launch optionsALLOW_DANGEROUS
- Enable dangerous browser arguments (default: false)DOCKER_CONTAINER
- Container detection flag{
"mcpServers": {
"puppeteer": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-puppeteer"],
"env": {
"PUPPETEER_LAUNCH_OPTIONS": "{\"headless\": false, \"args\": [\"--no-sandbox\"]}",
"ALLOW_DANGEROUS": "true"
}
}
}
}
# 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
# 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
Live URL: https://puppeteer.techsci.dev
Our Puppeteer MCP server is successfully deployed on Cloudflare Workers with Browserless.io integration.
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 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"}'
See Cloudflare Worker README for detailed setup instructions.
--no-sandbox
--disable-setuid-sandbox
--single-process
--disable-web-security
--ignore-certificate-errors
Override with ALLOW_DANGEROUS=true
environment variable.
{
"name": "puppeteer_screenshot",
"arguments": {
"name": "example-page",
"width": 1280,
"height": 720
}
}
{
"name": "puppeteer_navigate",
"arguments": {
"url": "https://example.com",
"launchOptions": {
"headless": false
}
}
}
{
"name": "puppeteer_evaluate",
"arguments": {
"script": "return document.title;"
}
}
โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ
โ MCP Client โ โ Puppeteer MCP โ โ Browser โ
โ (Claude, etc.) โโโโโบโ Server โโโโโบโ (Chromium) โ
โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ
โ
โผ
โโโโโโโโโโโโโโโโโโโโ
โ Cloud Services โ
โ (Browserless.io) โ
โโโโโโโโโโโโโโโโโโโโ
git checkout -b feature/amazing-feature
git commit -m 'Add amazing feature'
git push origin feature/amazing-feature
This project is licensed under the MIT License - see the LICENSE file for details.
Author: Sayem Abdullah Rihan
License: MIT
Repository: github.com/code-craka/puppeteer-mcp
Extracts and transforms webpage content into clean, LLM-optimized Markdown using the Readability algorithm.
Fetches content from any URL and converts it to HTML, JSON, Markdown, or plain text.
Fetches and converts website content to Markdown with AI-powered cleanup, OpenAPI support, and stealth browsing.
Automate browser interactions in the cloud (e.g. web navigation, data extraction, form filling, and more)
Control a browser for web automation tasks using Playwright on Cloudflare Workers.
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.
Control web browsers using the Selenium WebDriver for automation and testing.
Access YouTube video transcripts and translations using the YouTube Translate API.
Enables powerful, detection-resistant browser automation for AI assistants using puppeteer-real-browser.
Retrieves transcripts from YouTube videos for content analysis and processing.