NativeAIHub
BrowserMCP

BrowserMCP

Browser automation via the BrowserMCP package. Navigate, click, type, screenshot, and interact with web pages programmatically.

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

Paste this into Claude Code to set it up:

I want to add BrowserMCP to my Claude Code setup.

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

Prerequisites: Install the BrowserMCP Chrome extension from the Chrome Web Store. It provides the local server that Claude Code connects to.

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

After adding, restart Claude Code. The BrowserMCP server launches a browser instance that the agent can control directly.

01What It Does

Headless browser automation for your agent

BrowserMCP gives your AI agent a real browser it can control. The agent can visit pages, read their content after JavaScript rendering, click buttons, fill forms, and take screenshots. It is well suited for testing web applications, verifying deployments, and automating repetitive browser tasks.
🧭
Page NavigationVisit any URL and wait for full page load, including JavaScript rendering. Read the final DOM state after all scripts have run.
🖱️
Element InteractionClick buttons, fill text inputs, select dropdown options, and submit forms. Target elements by CSS selector or text content.
📸
Visual CaptureTake full page or element level screenshots. Useful for visual regression testing, generating documentation, or verifying UI changes.

02Setup

# Add to ~/.claude.json under mcpServers
"browsermcp": {
  "type": "stdio",
  "command": "npx",
  "args": ["-y", "@anthropic/browsermcp"]
}
BrowserMCP runs locally via npx and does not require an API key. It spawns a browser process that the agent controls through the MCP protocol. Make sure you have Node.js 18+ installed.

03Usage Patterns

🧪
Web App TestingNavigate through user flows, fill forms, click buttons, and verify the resulting page state. Catch regressions before they reach production.
🚀
Deployment VerificationAfter deploying, the agent visits the live URL, checks that critical pages load, and takes screenshots to confirm everything looks correct.