Browser Automation MCP for Claude Code
Wire Playwright or Puppeteer into Claude Code over MCP and drive real browsers with plain-language requests instead of selector scripts.
Problem: Running regression clicks, scraping pages, and babysitting QA flows by hand burns a chunk of every workday. An MCP browser server hands all of that to Claude.
Quick Win: Drop the Puppeteer MCP server into your Claude Code config and your first automation is minutes away. Paste this into your settings file:
{
"mcpServers": {
"puppeteer": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-puppeteer"]
}
}
}Then say to Claude: "Open a browser, navigate to example.com, and take a screenshot". The browser, the navigation, and the screenshot all happen without another keystroke from you.
Old-school browser work means selector plumbing, state juggling, and fifty lines of code to fill one form. An MCP browser server flips that. You describe the outcome in words and Claude drives.
Instead of writing fifty lines of Puppeteer, say: "Fill out this contact form with test data and submit it." That's the whole script.
Installing the Browser MCP Server
Puppeteer MCP Server Configuration
The Puppeteer config lives in your MCP file. Use ~/.claude.json on the CLI or claude_desktop_config.json for Desktop:
{
"mcpServers": {
"puppeteer": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-puppeteer"]
}
}
}Save, restart Claude Code, and the server registers. To check, ask Claude to launch a browser and open any URL.
Playwright MCP Server Setup
Playwright gives you Chrome, Firefox, and Safari in one package, which is why teams pick it for real test suites. First install @modelcontextprotocol/server-playwright:
npm install -g @modelcontextprotocol/server-playwrightThen register it in your MCP config:
{
"mcpServers": {
"playwright": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-playwright"]
}
}
}Alternative Playwright MCP: A community build at @executeautomation/playwright-mcp-server offers the same basic surface:
{
"mcpServers": {
"playwright": {
"command": "npx",
"args": ["-y", "@executeautomation/playwright-mcp-server"]
}
}
}Cross-browser coverage is the reason most full test suites end up on Playwright MCP for serious automation with Claude Code.
What You Can Ask It To Do
Web Scraping Made Simple
Ask for scraped data in plain English. A request like "Open example.com, find all product listings, and extract the titles and prices into a CSV file" gets the full pipeline: browser launch, element lookup, data pull, CSV write.
Form Testing Automation
Try this one: "Open my local development site at localhost:3000, fill out the signup form with test data, submit it, and verify the success message appears". One sentence replaces the whole manual QA loop. Claude visits the URL, invents plausible inputs, fills every field, and checks the success state.
Visual Regression Testing
A snapshot run across three breakpoints sounds like: "Take screenshots of my homepage at different screen sizes (mobile, tablet, desktop) and save them to ./screenshots/".
Multi-Step User Journeys
Bigger flows work too. Try: "Simulate a complete e-commerce purchase flow: browse products, add to cart, go through checkout with test details, and verify the order confirmation page".
Authentication Flows
Login states are a one-liner: "Log into my staging environment, navigate to the admin dashboard, and verify all navigation links work correctly".
Performance Monitoring
Ask for timing too: "Open my app, measure page load times for the dashboard, and report any pages that take longer than 3 seconds to load".
Troubleshooting Browser Automation
Browser launch fails: Chrome or Chromium has to exist on the box. On Linux:
sudo apt-get install -y chromium-browserElements not found: Dynamic pages need a wait. Ask Claude: "Wait for the login button to be visible before clicking it."
Timeouts: Slow pages need more patience. Say: "Navigate to the page and wait up to 30 seconds for it to fully load."
Integration With Your Workflow
Browser automation slots straight into the rest of your dev loop:
- Testing: Regression runs during the build
- Debugging: Screenshots that prove the bug
- Monitoring: Quiet polling of production pages
- Development: Feature checks across every browser
Context Optimization with MCP Tool Search
These servers pair well with MCP Tool Search. Tool Search only pulls Playwright or Puppeteer definitions into context when the job actually needs a browser, which leaves your window free for everything else.
Work up from small pieces. Start with a screenshot request. Move to a form. Then build your way to full end-to-end user journeys as the natural-language flow starts to feel normal.
Stop configuring. Start building.
Claude Code Search
Attach a web search MCP server to Claude Code and it can pull live pages, current docs, and fresh benchmarks from inside your terminal.
Social Media Automation with Claude Code
Automate social posts with Claude Code. Generate platform-specific content, build API integrations, and schedule output with code you own.