# BrowserAttach

> BrowserAttach is an open-source MCP server for browser automation. Drive your already signed-in Chrome and Edge tabs from an MCP client. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Open source
- **Platforms:** macOS, Windows, Linux, CLI, Chrome extension, Self-hosted
- **Repository:** https://github.com/evannzhongg/browserattach
- **MCP Registry name:** io.github.EvannZhongg/browser-attach
- **Categories:** [browser automation](https://ai-powered.com/categories/browser-automation)
- **Listing updated:** 2026-11-23

## About

BrowserAttach works through a locally paired browser extension rather than a remote debugging port or a separate automation browser, so the tabs you already have open keep their existing sign-in state. A small hub listens on loopback only and pairs with the extension using a random key.

An agent first discovers browsers and tabs, then claims one tab exclusively and receives a handle for it. From there it reads the accessibility tree, clicks, fills and types through element refs or CSS, XPath, label, placeholder and role locators, and releases the tab when finished. Claiming and ordinary input never bring a tab to the foreground unless the agent asks for it.

The server also covers screenshots of a page or a single element, JavaScript evaluation in the main page, console, network and navigation logs captured after a claim, and a fetch tool that reads one HTTP(S) URL in a temporary background tab using the profile's sign-in. Local file:// tabs work once file URL access is enabled in the extension's settings.

## Features

- **Existing signed-in tabs:** Controls tabs you already have open, keeping their sign-in state, with no separate automation browser.
- **Exclusive tab claims:** An agent claims a discovered tab, gets a handle, and releases it when done.
- **Multiple browser profiles:** Discovers several Chrome or Edge profiles so you can pick the right one precisely.
- **Rich page input:** Click, hover, drag, type, fill, select options and upload files through refs or locators.
- **Page logs and evaluation:** Reads console, network and navigation logs and evaluates JavaScript in the main page.
- **Background URL fetch:** Reads one HTTP(S) URL in a temporary tab as text, DOM or JSON using the profile's sign-in.
- **Loopback-only hub:** The local hub listens on loopback and pairs with the extension through a random key.

## Good for

- Let an agent work in a web app you are already logged into
- Automate form filling and clicks in a specific browser profile
- Capture full-page or element screenshots for review
- Debug a page by reading its console and network logs
- Read a signed-in page's rendered text or JSON without opening it yourself

## Install

### Claude Code: Add with the CLI (Terminal)

```sh
claude mcp add browser-attach -- npx -y @evan_zhong/browser-attach
```

Add --scope user to use it in every project, or --scope project to share it in .mcp.json.

### Claude Code: Or share it with your project (.mcp.json)

```json
{
  "mcpServers": {
    "browser-attach": {
      "command": "npx",
      "args": [
        "-y",
        "@evan_zhong/browser-attach"
      ]
    }
  }
}
```

### Claude Desktop (claude_desktop_config.json)

```json
{
  "mcpServers": {
    "browser-attach": {
      "command": "npx",
      "args": [
        "-y",
        "@evan_zhong/browser-attach"
      ]
    }
  }
}
```

Settings → Developer → Edit Config, then quit and reopen Claude Desktop.

### Cursor (~/.cursor/mcp.json)

```json
{
  "mcpServers": {
    "browser-attach": {
      "command": "npx",
      "args": [
        "-y",
        "@evan_zhong/browser-attach"
      ]
    }
  }
}
```

Use .cursor/mcp.json in a project to share it with the project.

### VS Code (~/.copilot/mcp-config.json)

```json
{
  "mcpServers": {
    "browser-attach": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@evan_zhong/browser-attach"
      ]
    }
  }
}
```

Or put the same entry in .mcp.json at your workspace root to share it.

### Codex: Add with the CLI (Terminal)

```sh
codex mcp add browser-attach -- npx -y @evan_zhong/browser-attach
```

### Codex: Or add to config.toml (~/.codex/config.toml)

```toml
[mcp_servers.browser-attach]
command = "npx"
args = ["-y", "@evan_zhong/browser-attach"]
```

### Gemini CLI and Antigravity: Gemini CLI (~/.gemini/settings.json)

```json
{
  "mcpServers": {
    "browser-attach": {
      "command": "npx",
      "args": [
        "-y",
        "@evan_zhong/browser-attach"
      ]
    }
  }
}
```

Or run: gemini mcp add -s user browser-attach npx -- -y @evan_zhong/browser-attach

### Gemini CLI and Antigravity: Antigravity (~/.gemini/config/mcp_config.json)

```json
{
  "mcpServers": {
    "browser-attach": {
      "command": "npx",
      "args": [
        "-y",
        "@evan_zhong/browser-attach"
      ]
    }
  }
}
```

Use .agents/mcp_config.json to add it to one workspace only.

### Devin Desktop (~/.config/devin/mcp_config.json)

```json
{
  "mcpServers": {
    "browser-attach": {
      "command": "npx",
      "args": [
        "-y",
        "@evan_zhong/browser-attach"
      ]
    }
  }
}
```

On Windows the file is %APPDATA%\\devin\\mcp_config.json. Use .devin/mcp_config.json to share it with a project.

### Cline (cline_mcp_settings.json)

```json
{
  "mcpServers": {
    "browser-attach": {
      "command": "npx",
      "args": [
        "-y",
        "@evan_zhong/browser-attach"
      ]
    }
  }
}
```

Open it from the MCP Servers icon → Configure → Configure MCP Servers.

### Zed (Zed settings.json)

```json
{
  "context_servers": {
    "browser-attach": {
      "command": "npx",
      "args": [
        "-y",
        "@evan_zhong/browser-attach"
      ]
    }
  }
}
```

Open it with zed: open settings file. Merge context_servers into the settings you already have.

### JetBrains AI Assistant and Junie: AI Assistant (Settings → Tools → AI Assistant → Model Context Protocol (MCP) → Add)

```json
{
  "mcpServers": {
    "browser-attach": {
      "command": "npx",
      "args": [
        "-y",
        "@evan_zhong/browser-attach"
      ]
    }
  }
}
```

### JetBrains AI Assistant and Junie: Junie (~/.junie/mcp/mcp.json)

```json
{
  "mcpServers": {
    "browser-attach": {
      "command": "npx",
      "args": [
        "-y",
        "@evan_zhong/browser-attach"
      ]
    }
  }
}
```

Use .junie/mcp/mcp.json to share it with a project.

### Kiro (~/.kiro/settings/mcp.json)

```json
{
  "mcpServers": {
    "browser-attach": {
      "command": "npx",
      "args": [
        "-y",
        "@evan_zhong/browser-attach"
      ]
    }
  }
}
```

Use .kiro/settings/mcp.json to add it to one workspace only.

### Other clients (your client's MCP settings (most use this shape))

```json
{
  "mcpServers": {
    "browser-attach": {
      "command": "npx",
      "args": [
        "-y",
        "@evan_zhong/browser-attach"
      ]
    }
  }
}
```

## Tools

From the tool list in its README, going by the names, 1 of 24 tools changes data; 20 names don't say. From the server's own tool labels and tool names; not verified by us.

- `browser_discover`: Discover browser profiles and tabs with their identity and control status.
- `browser_claim_tab`: Exclusively claim a discovered tab.
- `browser_open_tab`: Create a tab, optionally claiming it.
- `browser_tab_control`: Release, activate or close a claimed tab.
- `browser_fetch` (name suggests: reads): Read one HTTP(S) URL in a temporary background tab as text, HTML or JSON.
- `browser_snapshot`: Take an accessibility snapshot with actionable element refs.
- `browser_read_text` (name suggests: reads): Read page text.
- `browser_read_control` (name suggests: reads): Read control state, related popups and selected options.
- `browser_wait`: Run read-only checks until a condition passes.
- `browser_click`: Click an element.
- `browser_hover`: Hover the pointer over an element.
- `browser_drag`: Perform a stepped drag.
- `browser_select_option`: Select an HTML option without opening a native popup.
- `browser_type`: Type characters into a field.
- `browser_fill`: Fill a field with a value.
- `browser_press_key`: Press a key.
- `browser_scroll`: Scroll the page.
- `browser_batch`: Run 1 to 30 input steps in one queue, stopping on the first failure.
- `browser_navigate`: Navigate to HTTP(S) or file URLs, or go back and forward.
- `browser_handle_dialog`: Handle alert, confirm and prompt dialogs.
- `browser_upload_file` (name suggests: changes): Upload a file to a file input or an intercepted file chooser.
- `browser_screenshot`: Capture the viewport or full page as PNG.
- `browser_evaluate`: Evaluate JavaScript in the main page.
- `browser_logs`: Read console, network or navigation logs.

## FAQ

### What do I need to run BrowserAttach?

Node.js 22 or newer with npm, Chrome or Edge 125 or newer that can load unpacked extensions, and an MCP client that speaks stdio.

### How do I install BrowserAttach?

Run browser-attach setup (via a global npm install or npx), load the printed extension directory as an unpacked extension in each browser profile you want to expose, then add the stdio entry to your MCP client.

### Does BrowserAttach need a remote debugging port?

No. It connects through a locally paired extension instead of a remote debugging port or a separate automation browser.

### Can BrowserAttach control local files opened in the browser?

Yes, ordinary file:// tabs, after you enable the Allow access to file URLs setting in the extension's details.

### How many tools does BrowserAttach expose?

24 tools over standard stdio MCP.

### Is BrowserAttach free?

Yes. BrowserAttach is open source, so you can use and self-host it for free.

### How do I add BrowserAttach to Claude Code?

Run this command in your terminal: claude mcp add browser-attach -- npx -y @evan_zhong/browser-attach

### What are the best alternatives to BrowserAttach?

The closest alternatives to BrowserAttach are Browser Use, Scrapling MCP Server, Chrome DevTools MCP, playwright_mcp and Oya Browser.

## Where this comes from

- Description: written from the project's README.
- Install steps: from the official MCP Registry entry.

## Alternatives

- [Browser Use](https://ai-powered.com/mcp/browser-use): Browser Use is a freemium MCP server for browser automation.
- [Scrapling MCP Server](https://ai-powered.com/mcp/scrapling-mcp-server): Scrapling MCP Server is an open-source MCP server for web search and scraping.
- [Chrome DevTools MCP](https://ai-powered.com/mcp/chrome-devtools-mcp-2): Chrome DevTools MCP is an open-source MCP server for browser automation.
- [playwright_mcp](https://ai-powered.com/mcp/playwright-mcp-3): playwright_mcp is an open-source MCP server for browser automation.
- [Oya Browser](https://ai-powered.com/mcp/oya-browser): Oya Browser is a freemium MCP server for browser automation.
- [browsentic](https://ai-powered.com/mcp/browsentic-2): browsentic is an open-source MCP server for browser automation.
- [Turbo-Browser-MCP](https://ai-powered.com/mcp/turbo-browser-mcp): Turbo-Browser-MCP is an open-source MCP server for browser automation.
- [acrawl](https://ai-powered.com/mcp/acrawl): acrawl is an open-source MCP server for browser automation.

---
Source: https://ai-powered.com/mcp/browserattach
