NativeAIHub
Puppeteer MCP Server

Puppeteer MCP Server

Give your AI agent hands to use a browser. Navigate pages, click buttons, fill forms, take screenshots, run JavaScript, and test UI flows, all from your terminal.

MCP Server·3 sections·1 min read
codingresearch
Install Prompt

Paste this into Claude Code to set it up:

I want to add the Puppeteer MCP Server to my Claude Code setup.

IMPORTANT: Never use Read/Edit tools on ~/.claude.json. Use jq via Bash instead.

No API key is needed. Puppeteer uses your local Chrome or Chromium installation.

Run this command to add the MCP server:
```bash
jq '.mcpServers["puppeteer"] = {"type": "stdio", "command": "npx", "args": ["-y", "@modelcontextprotocol/server-puppeteer"]}' ~/.claude.json > /tmp/claude-json-tmp && mv /tmp/claude-json-tmp ~/.claude.json
```

After adding, restart Claude Code. The server launches a browser instance and gives your agent the ability to navigate pages, click buttons, fill forms, take screenshots, and run JavaScript.

01What It Does

Eyes and hands for your agent

Firecrawl reads page content (eyes). Puppeteer interacts with pages like a human user would (hands). It can navigate to URLs, click buttons, fill forms, take screenshots, select dropdown options, hover over elements, and run custom JavaScript. Think of it as giving your agent the ability to use a browser, not just read one.
🖱️
Click and NavigateOpen URLs, click buttons and links, hover over elements to reveal tooltips and menus.
⌨️
Fill and SelectType text into input fields, choose options from dropdowns, and submit forms.
📸
Screenshot and EvaluateCapture screenshots for visual verification. Run custom JavaScript to extract data or modify page behavior.

02Real Scenarios

1

"Take a screenshot of our landing page on mobile"

The agent navigates to your URL, resizes the viewport to mobile dimensions, and captures a screenshot for visual review.

2

"Fill out the registration form on staging"

The agent navigates to the form, fills in each field, and submits. Quick testing across environments without manual effort.

3

"Check if the login flow works end to end"

The agent navigates to login, enters credentials, clicks submit, and verifies the redirect. A lightweight smoke test from your terminal.

4

"Scrape the dynamic pricing table"

The agent navigates, waits for JavaScript to render, then extracts data with evaluate. Works on SPAs and dynamic content.

03Setup

# Add to ~/.claude.json under mcpServers
"puppeteer": {
  "type": "stdio",
  "command": "npx",
  "args": ["-y", "@anthropic/puppeteer-mcp"]
}
No API key needed. Puppeteer uses your local Chrome installation. If Chrome is installed, it works.
Screenshots are your verification tool. Capture visual proof of UI changes without context switching.
Avoid JavaScript alerts. They block the browser. Use evaluate to override confirmation dialogs first.