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
Dynamically scan and analyze potentially malicious URLs using the urlDNA.io
Fetch the content of a remote URL as Markdown with Jina Reader.
High-quality screenshot capture optimized for Claude Vision API. Automatically tiles full pages into 1072x1072 chunks (1.15 megapixels) with configurable viewports and wait strategies for dynamic content.
Extract web data with Firecrawl
Leverage Notte Web AI agents & cloud browser sessions for scalable browser automation & scraping workflows
Fetch YouTube subtitles
Scrape Weibo user information, feeds, and perform searches.
Download webpages as markdown files using the r.jina.ai service, with configurable directories and persistent settings.
Easy web data access. Simplified retrieval of information from websites and online sources.
Enable AI agents to get structured data from unstructured web with AgentQL.