
Puppeteer
STDIOMCP server providing comprehensive browser automation capabilities through Puppeteer for web interaction and testing
MCP server providing comprehensive browser automation capabilities through Puppeteer for web interaction and testing
A Model Context Protocol (MCP) server that provides Claude Code with comprehensive browser automation capabilities through Puppeteer. This server allows Claude to interact with web pages, take screenshots, execute JavaScript, and perform various browser automation tasks.
Want browser automation in Claude Code? Run this one command:
claude mcp add puppeteer-mcp-claude
Alternative - works for both Claude Desktop & Claude Code:
npx puppeteer-mcp-claude install
That's it! The installer will automatically:
Then restart your Claude apps and ask: "Take a screenshot of google.com" to test it out!
Tool | Description |
---|---|
puppeteer_launch | Launch a new browser instance |
puppeteer_new_page | Create a new browser tab |
puppeteer_navigate | Navigate to a URL |
puppeteer_click | Click on an element |
puppeteer_type | Type text into an input field |
puppeteer_get_text | Extract text from an element |
puppeteer_screenshot | Take a screenshot |
puppeteer_evaluate | Execute JavaScript code |
puppeteer_wait_for_selector | Wait for an element to appear |
puppeteer_close_page | Close a specific tab |
puppeteer_close_browser | Close the entire browser |
Get browser automation in all your Claude apps with just one command:
npx puppeteer-mcp-claude install
What happens automatically:
Cross-platform detection:
~/Library/Application Support/Claude/
(Desktop) + ~/.claude/
(Code)~/.config/Claude/
(Desktop) + ~/.claude/
(Code)~/.claude/
(Code only)After installation:
No manual configuration needed! The installer handles everything across all platforms.
If you prefer to install manually:
Install the package globally:
npm install -g puppeteer-mcp-claude
Configure for Claude Code:
puppeteer-mcp-claude install
For development or contribution:
Clone and install dependencies:
git clone https://github.com/jaenster/puppeteer-mcp-claude.git cd puppeteer-mcp-claude npm install
Build the project:
npm run build
Use local setup script:
npm run setup-mcp
Command | Description |
---|---|
npx puppeteer-mcp-claude install | Install and configure for Claude Desktop & Code |
npx puppeteer-mcp-claude uninstall | Remove from all Claude applications |
npx puppeteer-mcp-claude status | Check installation status across all apps |
npx puppeteer-mcp-claude help | Show help and available tools |
Configure this server using Claude Code's built-in MCP management:
claude mcp add puppeteer-mcp-claude
Create or edit ~/.claude/claude_desktop_config.json
:
{ "mcpServers": { "puppeteer-mcp-claude": { "command": "npx", "args": ["puppeteer-mcp-claude", "serve"], "env": { "NODE_ENV": "production" } } } }
npm run test:integration
You should see the Puppeteer tools listed among the available tools.
// Launch browser await puppeteer_launch({ headless: false }); // Create a new page await puppeteer_new_page({ pageId: "main" }); // Navigate to a website await puppeteer_navigate({ pageId: "main", url: "https://example.com" }); // Take a screenshot await puppeteer_screenshot({ pageId: "main", path: "screenshot.png" });
// Type into a search field await puppeteer_type({ pageId: "main", selector: "input[name='search']", text: "Claude AI" }); // Click a button await puppeteer_click({ pageId: "main", selector: "button[type='submit']" }); // Wait for results to load await puppeteer_wait_for_selector({ pageId: "main", selector: ".search-results" });
// Extract text from an element await puppeteer_get_text({ pageId: "main", selector: "h1" }); // Execute custom JavaScript await puppeteer_evaluate({ pageId: "main", script: "document.querySelectorAll('a').length" });
headless
: Run browser in headless mode (default: true)args
: Array of Chrome arguments (e.g., ["--disable-web-security"]
)waitUntil
: Wait condition for navigation
load
: Wait for load eventdomcontentloaded
: Wait for DOM content loadednetworkidle0
: Wait for no network activitynetworkidle2
: Wait for max 2 network connectionspath
: File path to save screenshotfullPage
: Capture full page scroll height (default: false)Command | Description |
---|---|
npm run setup-mcp | Automatically configure MCP server |
npm run remove-mcp | Remove MCP server configuration |
npm run status-mcp | Check current configuration status |
npm run test:integration | Test the MCP server integration |
Claude Code doesn't see the tools:
claude_desktop_config.json
is correctnpm run status-mcp
"Browser not launched" errors:
puppeteer_launch
before using other toolsElement not found errors:
puppeteer_wait_for_selector
before interacting with elementsPermission errors:
ts-node
is installed and accessibleFor debugging, you can run the server in development mode:
npm run dev
This will show detailed logs of all MCP operations.
Run the test suite to verify everything is working:
npm test
For integration testing with Claude Code:
npm run test:integration
ts-node
)If you encounter issues:
npm run status-mcp
npm run test:integration
For additional help, refer to the Claude Code MCP documentation.