# Browser MCP by [Wrick](https://github.com/wrick17) [![npm version](https://img.shields.io/npm/v/@wrick17/browser-mcp)](https://www.npmjs.com/package/@wrick17/browser-mcp) [![npm downloads](https://img.shields.io/npm/dw/@wrick17/browser-mcp)](https://www.npmjs.com/package/@wrick17/browser-mcp) [![GitHub stars](https://img.shields.io/github/stars/wrick17/browser-mcp)](https://github.com/wrick17/browser-mcp) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) [![MCP](https://img.shields.io/badge/MCP-compatible-blue)](https://modelcontextprotocol.io) [![Chrome Web Store](https://img.shields.io/badge/Chrome_Web_Store-install-green)](https://chromewebstore.google.com/detail/fbkolibajjbfbafbgcmehkkpmoonikll) **Your AI agent drives your real, logged-in Chrome — and works where headless tools die.** [![Browser MCP Demo](assets/demo.gif)](assets/demo.gif) Browser MCP gives Claude Code (and any MCP client — Cursor, VS Code agent mode) control of your actual Chrome: your cookies, your sessions, your 2FA. So it works on CAPTCHA, 2FA and anti-bot sites where Playwright and Puppeteer get blocked — because it's *you* browsing. The killer move: it hits a login wall, reads the verification code from your own Gmail tab, and continues the sign-in. No API can do that. Operate platforms with no API, QA your own web app end-to-end, or work dashboards, LinkedIn and Reddit at human pace — with you approving the sensitive steps. 42 tools. Auto-clicks the reCAPTCHA v2 checkbox, with a human fallback for the rest. Multi-session color-coded tab groups, including agent-controlled group names. **MIT, free, and 100% local — nothing leaves your machine.** This is an independent fork of [Agent360's original Browser MCP](https://github.com/Agent360dk/browser-mcp). It is published separately because the original extension/MCP pair does not expose tab-group renaming and creates a placeholder blank tab when starting the first group. This fork adds agent-controlled group names and creates the first group directly around the requested tab. ## Install — 2 steps (~60 seconds) ### Step 1: Configure the MCP server ```bash npx @wrick17/browser-mcp install ``` This copies the Chrome extension files to `~/.browser-mcp/extension/` and adds the MCP server to your Claude Code config. **You'll see the path to the extension folder printed in the terminal — copy it.** ### Step 2: Load the extension in Chrome > Chrome won't let extensions install themselves from npm — you load it manually one time. To **update** later, re-run the install command and reload it (see [Keeping it updated](#keeping-it-updated)). Prefer the [Chrome Web Store](#chrome-web-store-one-click-install) install if you'd rather have the extension auto-update. 1. **Open Chrome** and type `chrome://extensions` in the address bar 2. **Toggle "Developer mode"** ON (top right corner) 3. **Click "Load unpacked"** (top left, next to "Pack extension") 4. **Navigate to `~/.browser-mcp/extension/`** and click "Select" - On Mac: Press `Cmd+Shift+G` in the file picker, paste `~/.browser-mcp/extension/`, press Enter - On Windows: Paste `%USERPROFILE%\.browser-mcp\extension\` in the address bar - On Linux: Type `~/.browser-mcp/extension/` in the path field 5. **Restart Claude Code** so it picks up the new MCP server That's it. The Browser MCP icon will appear in your toolbar, and 42 browser tools are now available in Claude Code. ### Alternative: Manual zip download (no npm) If you don't want to use npm, download the extension directly: 1. [Download `browser-mcp-by-wrick-1.26.1.zip`](https://github.com/wrick17/browser-mcp/releases/latest) from the latest GitHub release 2. Unzip the file (anywhere — e.g. `~/Downloads/browser-mcp-extension/`) 3. Follow Step 2 above, but select the unzipped folder instead of `~/.browser-mcp/extension/` 4. Configure Claude Code manually by adding this to your `~/.claude.json` (or run `npx @wrick17/browser-mcp install --skip-extension`): ```json { "mcpServers": { "browser-mcp": { "command": "npx", "args": ["@wrick17/browser-mcp"] } } } ``` ### Chrome Web Store (one-click install) [**Install from Chrome Web Store →**](https://chromewebstore.google.com/detail/fbkolibajjbfbafbgcmehkkpmoonikll) No Developer mode needed. Then run `npx @wrick17/browser-mcp install --skip-extension` to configure Claude Code. ## Why This Over Playwright MCP / BrowserMCP? | | Browser MCP | Playwright MCP | BrowserMCP.io | |---|---|---|---| | **Browser** | Your real Chrome | Headless (new session) | Your real Chrome | | **Maintained** | Actively — v1.25.0 this week | Actively (Microsoft) | Last commit Apr 2025 | | **Logins/cookies** | Already authenticated | Must log in every time | Already authenticated | | **Multi-session** | 10 concurrent sessions with color-coded tab groups | Single session | Single session | | **Human-in-the-loop** | `browser_ask_user` — 2FA, CAPTCHA, credential input | None | None | | **Provider integrations** | 9 built-in (Stripe, HubSpot, Slack...) | None | None | | **CORS bypass** | `browser_fetch` from extension background | N/A | Limited | | **Network monitoring** | `browser_wait_for_network` via CDP | Built-in | None | | **CSP-strict sites** | Chrome Debugger API throughout | Works (headless) | Limited | | **Custom dropdowns** | Angular Material, React Select support | Works (headless) | Limited | | **Install** | `npx @wrick17/browser-mcp install` | `npx @playwright/mcp` | Manual clone | > **On the name:** the similarly named `browsermcp.io` (`@browsermcp/mcp`) is a different, unaffiliated project. This package is `@wrick17/browser-mcp`. ## 42 Tools ### Navigation & Content | Tool | Description | |------|-------------| | `browser_navigate` | Navigate to URL (reuses tab, or `new_tab=true`) | | `browser_get_page_content` | Get page text or HTML | | `browser_screenshot` | Screenshot via Chrome Debugger (works even when tab isn't focused) | | `browser_execute_script` | Run JavaScript in page context | ### Interaction | Tool | Description | |------|-------------| | `browser_click` | Click via CSS or text selector (`text=Submit`, `button:text(Next)`) | | `browser_fill` | Fill input fields (works on CSP-strict sites) | | `browser_press_key` | Keyboard events (Enter, Tab, Escape, modifiers) | | `browser_scroll` | Scroll to element or by pixels | | `browser_wait` | Wait for element to appear | | `browser_hover` | Hover for tooltips/dropdowns | | `browser_select_option` | Native `` via Chrome Debugger API (no dialog) | | `browser_drop_file` | Upload via drop-zones: finds hidden `` in target subtree/parent (up to 2 levels). Use when `browser_upload_file` fails because the zone has no visible input | ## Multi-Session Support Each Claude Code conversation gets its own MCP server on a unique port (9876-9885). The Chrome extension connects to all active servers simultaneously. ``` Claude Session 1 ←(stdio)→ MCP :9876 ←(WS)→ Claude Session 2 ←(stdio)→ MCP :9877 ←(WS)→ Chrome Extension → Browser Claude Session 3 ←(stdio)→ MCP :9878 ←(WS)→ ``` - **Session isolation** — each session gets a color-coded Chrome Tab Group - **Tab ownership** — sessions can only see and control their own tabs - **Auto-cleanup** — processes exit when Claude Code closes the conversation ## Built-in Provider Integrations `browser_extract_token` navigates to the provider's API settings page and guides token extraction: | Provider | Token Format | Dashboard | |----------|-------------|-----------| | Stripe | `sk_test_...` / `sk_live_...` | stripe.com/apikeys | | HubSpot | `pat-...` | app.hubspot.com | | Slack | `xoxb-...` | api.slack.com/apps | | Shopify | Admin API token | admin.shopify.com | | Pipedrive | UUID | app.pipedrive.com | | Calendly | JWT | calendly.com | | Mailchimp | `...-us1` | admin.mailchimp.com | | Google | OAuth Client | console.cloud.google.com | | LinkedIn | Client ID/Secret | linkedin.com/developers | ## Architecture ``` extension/ manifest.json # Manifest V3 background.js # Service worker — Chrome API dispatcher, session tab groups offscreen.js # Persistent WebSocket bridge (multi-port scanning) popup.html/js # Status UI — sessions, tabs, action log mcp-server/ index.js # MCP server (stdio) + WebSocket client tools.js # 34 tool definitions bin/cli.js # Install CLI ``` ### How It Works 1. Claude Code starts → spawns MCP server via stdio 2. MCP server binds to first available port (9876-9885) 3. Extension's offscreen document scans ports every 2s 4. WebSocket connection established 5. Commands flow: Claude Code → MCP → Extension → Chrome APIs 6. Process auto-exits when Claude Code closes (stdin detection) ## Keeping it updated Browser MCP has two parts, and they update independently — how the **extension** updates depends on how you installed it: | Part | Install method | How it updates | |------|----------------|----------------| | **MCP server** | any | **Automatic.** Runs via `npx @wrick17/browser-mcp@latest`, so every Claude Code session pulls the newest from npm. Nothing to do. | | **Extension** | **Chrome Web Store** | **Automatic.** Chrome updates it in the background (usually within a few hours). Nothing to do. | | **Extension** | **Unpacked** (`npx … install` or manual zip) | **Manual.** Chrome never auto-updates a load-unpacked extension. Re-run `npx @wrick17/browser-mcp install`, then open `chrome://extensions` → Browser MCP → **↻ reload**. | **Not sure which you have?** Open `chrome://extensions` and find Browser MCP. If it shows a **"Loaded from /path/…"** line, it's unpacked (manual updates). If there's no such line, it came from the Chrome Web Store (auto-updates). **Want zero-maintenance updates?** Install the extension from the [Chrome Web Store](https://chromewebstore.google.com/detail/fbkolibajjbfbafbgcmehkkpmoonikll), then run `npx @wrick17/browser-mcp install --skip-extension` to wire up just the MCP server. After that, both parts stay current on their own. ## Troubleshooting **"Chrome extension not connected"** - Check extension is loaded in `chrome://extensions` - Click the extension popup → "Reconnect" - Wait 2-3 seconds for port scan **Screenshot fails** - Uses Chrome Debugger API (works even when tab isn't focused) - Falls back to `captureVisibleTab` if debugger unavailable **Click doesn't work on SPA** - Try text selector: `browser_click("text=Submit")` - Uses real mouse events via Chrome Debugger API automatically **Stale processes** - Processes auto-exit when Claude Code closes (stdin detection) - Idle timeout: 4 hours without commands → auto-exit - Manual cleanup: `lsof -i :9876-9885 | grep LISTEN` ## 💡 Help Shape Browser MCP Browser MCP is built in the open and shaped by the people using it. ### Browse what others want / built - 💡 **[Wishlist →](WISHLIST.md)** — features people are asking for - 🎯 **[Use-cases →](USE_CASES.md)** — what others have built (LinkedIn ICP scraping, vendor research, daily ops, …) ### Contribute in 30 seconds - 💡 [Wish for a feature](https://github.com/wrick17/browser-mcp/issues/new?template=wish.yml) - 🎯 [Share a use-case](https://github.com/wrick17/browser-mcp/issues/new?template=use-case.yml) - 🐛 [Report a bug](https://github.com/wrick17/browser-mcp/issues/new?template=bug.yml) Or just **ask Claude** — it knows about the `browser_about` tool and will draft + submit on your behalf when you say things like *"I wish browser-mcp could …"* or *"share my browser-mcp use-case"*. ## License MIT — fork maintained by [Wrick](https://github.com/wrick17); original work by [Agent360](https://agent360.dk).