Automate Browser Interactions with Puppeteer
Automate browsers with Puppeteer - navigate, screenshot, click, fill forms, and run JavaScript directly from Claude.
Why it matters
Leverage the Puppeteer MCP server to automate browser interactions, enabling AI models to navigate websites, extract data, and perform automated testing.
Outcomes
What it gets done
Navigate to specified URLs
Interact with web elements (click, fill, hover)
Capture screenshots of web pages or elements
Execute JavaScript within the browser context
Install
Add it to your toolbox
Run in your project directory:
curl -fsSL https://spark.entire.vc/get/vb-puppeteer | bash Capabilities
Tools your agent gets
Navigate to a URL in the browser.
Take a screenshot of the current page or specific element.
Click on an element identified by CSS selector.
Fill in a form field with text value.
Select an option from a dropdown menu.
Hover over an element on the page.
Execute JavaScript code in the page context.
Overview
Puppeteer MCP
Puppeteer MCP gives Claude browser automation via Puppeteer - navigation, screenshots, form interaction, and JavaScript execution in the page context - in headless or headed mode. It is an official MCP reference server; its upstream repository is archived. Use it for AI-driven browser automation like scraping, testing, and screenshot documentation. Avoid puppeteer_evaluate with untrusted scripts against pages you don't control.
What it does
Puppeteer MCP enables browser automation through Puppeteer, letting Claude navigate websites, take screenshots, interact with page elements, and extract content, in either headless or headed browser mode. Beyond direct page interaction, it also supports network request interception and PDF generation as broader automation features.
When to use - and when NOT to
Use it when you want Claude to drive a real browser - navigating to a URL, clicking or filling form fields, selecting dropdown options, capturing screenshots (viewport or full page), or executing JavaScript in the page context. It's suited for web scraping, automated testing, screenshot documentation, form automation, and visual regression testing. Do not use puppeteer_evaluate to run untrusted scripts against pages you don't control - it executes arbitrary JavaScript in the page context. This server is one of the official Model Context Protocol reference implementations, now maintained in the modelcontextprotocol/servers-archived repository, which is archived and no longer receiving updates.
Capabilities
puppeteer_navigate(url): navigate to a URL.puppeteer_screenshot(options?): capture a screenshot, withname,selector(element-specific), andfullPageoptions.puppeteer_click(selector): click an element.puppeteer_fill(selector, value): fill a form field.puppeteer_select(selector, value): select a dropdown option.puppeteer_hover(selector): hover over an element.puppeteer_evaluate(script): execute JavaScript in the page context.
Broader features include network request interception and PDF generation.
How to install
npm install -g @modelcontextprotocol/server-puppeteer
Configure Claude Code:
{
"mcpServers": {
"puppeteer": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-puppeteer"]
}
}
}
For a custom browser path, set the PUPPETEER_EXECUTABLE_PATH environment variable in the server config's env block to point at a specific Chrome binary instead of the bundled one.
Who it's for
Developers who want Claude to automate real browser interactions - scraping pages, testing web flows, capturing screenshots, and filling forms - conversationally.
Source README
The Puppeteer MCP server enables browser automation through Puppeteer, allowing Claude to navigate websites, take screenshots, interact with web elements, and extract content.
Installation
npm install -g @modelcontextprotocol/server-puppeteer
Configuration
Add to your Claude Code settings:
{
"mcpServers": {
"puppeteer": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-puppeteer"]
}
}
}
With Custom Browser Path
{
"mcpServers": {
"puppeteer": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-puppeteer"],
"env": {
"PUPPETEER_EXECUTABLE_PATH": "/path/to/chrome"
}
}
}
}
Available Tools
puppeteer_navigate
Navigate to a URL.
puppeteer_navigate(url: string): NavigationResult
puppeteer_screenshot
Take a screenshot of the current page or element.
puppeteer_screenshot(options?: ScreenshotOptions): Screenshot
Options:
name- Screenshot identifierselector- CSS selector for element screenshotfullPage- Capture full scrollable page
puppeteer_click
Click on an element.
puppeteer_click(selector: string): ClickResult
puppeteer_fill
Fill in a form field.
puppeteer_fill(selector: string, value: string): FillResult
puppeteer_select
Select an option from a dropdown.
puppeteer_select(selector: string, value: string): SelectResult
puppeteer_hover
Hover over an element.
puppeteer_hover(selector: string): HoverResult
puppeteer_evaluate
Execute JavaScript in the page context.
puppeteer_evaluate(script: string): EvaluationResult
Features
- Headless and headed browser modes
- Screenshot capture (viewport or full page)
- Form interaction (click, fill, select)
- JavaScript execution in page context
- Network request interception
- PDF generation
Usage Example
Claude, navigate to https://example.com, take a screenshot,
then fill in the search form with "MCP servers" and submit it.
Use Cases
- Web scraping and data extraction
- Automated testing
- Screenshot documentation
- Form automation
- Visual regression testing
FAQ
Common questions
Discussion
Questions & comments ยท 0
Sign In Sign in to leave a comment.