# agent-in-browser

> agent-in-browser is an open-source MCP server for browser automation. Drive Chrome, Edge, Brave or Firefox from any agent over CDP and WebDriver BiDi. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Open source
- **Platforms:** CLI, macOS, Linux, Windows
- **Repository:** https://github.com/gwakko/agent-in-browser
- **MCP Registry name:** io.github.Gwakko/agent-in-browser
- **Categories:** [browser automation](https://ai-powered.com/categories/browser-automation), [developer tools](https://ai-powered.com/categories/developer-tools)
- **Listing updated:** 2026-11-18

## About

agent-in-browser is a dependency-free Go binary that gives agents a real browser without an extension or vendor runtime. Chromium-family browsers are driven through the DevTools Protocol and Firefox through WebDriver BiDi, with Safari detected but still on the roadmap. The agent reads a page as a snapshot of elements with refs, then types, clicks and fills forms by ref.

The same tool catalogue is offered three ways: an MCP server, a shell CLI that shares one persistent browser, and a scenario runner that replays YAML test steps across several browsers and writes JUnit or JSON reports. An agent skill is bundled in the binary, and setup commands write configuration for Claude Code, Cursor, Codex, Gemini CLI and VS Code.

The browser runs on its own dedicated profile, with the debugging endpoint bound to 127.0.0.1 only. The README warns that any local process can drive it, so avoid signing it into accounts you would not hand to the agent. MIT licensed.

## Features

- **Multi-browser support:** Chromium browsers via CDP, Firefox via WebDriver BiDi.
- **Snapshots with refs:** Pages are read as element refs the agent can act on.
- **Shell CLI:** Call any tool from scripts, sharing one persistent browser.
- **Scenario runner:** Run YAML tests across a browser matrix with JUnit output.
- **Console and network:** Read console messages and network requests.
- **Dedicated profile:** Uses its own browser profile that survives restarts.

## Good for

- Let an agent test a signup flow in a real browser
- Run the same YAML scenario on Chrome and Firefox
- Capture console errors while an agent browses
- Drive a browser from shell scripts without MCP

## Install

### Claude Code (Terminal)

```sh
claude mcp add agent-in-browser -- npx -y https://github.com/Gwakko/agent-in-browser/releases/download/v0.1.2/agent-in-browser-0.1.2.mcpb
```

### Claude Desktop (claude_desktop_config.json)

```json
{
  "mcpServers": {
    "agent-in-browser": {
      "command": "npx",
      "args": [
        "-y",
        "https://github.com/Gwakko/agent-in-browser/releases/download/v0.1.2/agent-in-browser-0.1.2.mcpb"
      ]
    }
  }
}
```

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

```json
{
  "mcpServers": {
    "agent-in-browser": {
      "command": "npx",
      "args": [
        "-y",
        "https://github.com/Gwakko/agent-in-browser/releases/download/v0.1.2/agent-in-browser-0.1.2.mcpb"
      ]
    }
  }
}
```

### VS Code (.vscode/mcp.json)

```json
{
  "servers": {
    "agent-in-browser": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "https://github.com/Gwakko/agent-in-browser/releases/download/v0.1.2/agent-in-browser-0.1.2.mcpb"
      ]
    }
  }
}
```

### Windsurf (~/.codeium/windsurf/mcp_config.json)

```json
{
  "mcpServers": {
    "agent-in-browser": {
      "command": "npx",
      "args": [
        "-y",
        "https://github.com/Gwakko/agent-in-browser/releases/download/v0.1.2/agent-in-browser-0.1.2.mcpb"
      ]
    }
  }
}
```

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

```json
{
  "mcpServers": {
    "agent-in-browser": {
      "command": "npx",
      "args": [
        "-y",
        "https://github.com/Gwakko/agent-in-browser/releases/download/v0.1.2/agent-in-browser-0.1.2.mcpb"
      ]
    }
  }
}
```

## Tools

- `browser_status`: Reports browser status.
- `browsers_installed`: Lists installed browsers.
- `tabs_list`: Lists tabs.
- `tab_new`: Opens a tab.
- `tab_select`: Selects a tab.
- `tab_close`: Closes a tab.
- `navigate`: Navigates to a URL.
- `snapshot`: Reads the page as element refs.
- `find`: Finds elements.
- `click`: Clicks an element.
- `hover`: Hovers an element.
- `type`: Types text.
- `press_key`: Presses a key.
- `fill_form`: Fills form fields.
- `scroll`: Scrolls the page.
- `wait_for`: Waits for text or a condition.
- `get_text`: Gets page text.
- `screenshot`: Takes a screenshot.
- `evaluate`: Evaluates JavaScript.
- `console_messages`: Reads console messages.
- `network_requests`: Reads network requests.
- `resize`: Resizes the viewport.
- `browser_close`: Closes the browser.

## FAQ

### Does it need a browser extension?

No, it uses native automation protocols.

### Which clients can use it?

Claude Code, Claude Desktop, Cursor, Codex, Gemini CLI, Windsurf, VS Code, Zed, opencode and other MCP clients.

### Can it reuse my logged-in Chrome profile?

Not the default profile; Chrome 136 refuses that, so sign in once inside the agent's own browser window.

### How do I install it?

Install script, Homebrew, go install, or a one-click .mcpb bundle for Claude Desktop.

### Is agent-in-browser free?

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

### How do I add agent-in-browser to Claude Code?

Run this command in your terminal: claude mcp add agent-in-browser -- npx -y https://github.com/Gwakko/agent-in-browser/releases/download/v0.1.2/agent-in-browser-0.1.2.mcpb

### What are the best alternatives to agent-in-browser?

The closest alternatives to agent-in-browser are REA, Browser Use, Scrapling MCP Server, Context7 and Chrome DevTools MCP.

## Where this comes from

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

## Alternatives

- [REA](https://ai-powered.com/mcp/rea): REA is an open-source MCP server for developer tools.
- [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.
- [Context7](https://ai-powered.com/mcp/context7): Context7 is a freemium MCP server for developer tools.
- [Chrome DevTools MCP](https://ai-powered.com/mcp/chrome-devtools-mcp-2): Chrome DevTools MCP is an open-source MCP server for browser automation.
- [Codebase Memory](https://ai-powered.com/mcp/codebase-memory): Codebase Memory is an open-source MCP server for knowledge and memory.
- [GitHub](https://ai-powered.com/mcp/github-2): GitHub is an open-source MCP server for developer tools.
- [Serena MCP: the IDE for your agent](https://ai-powered.com/mcp/serena-mcp-the-ide-for-your-agent): Serena MCP: the IDE for your agent is an open-source MCP server for developer tools.

---
Source: https://ai-powered.com/mcp/agent-in-browser
