# openbrowser-ai

Runs browser automation via direct Chrome DevTools Protocol commands and async Python execution. Useful for scraping dynamic pages, inspecting forms, and capturing screenshots.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed · ★ 279
- Author: billy-enrizky
- License: MIT · policy=link-only · description only; the file stays with the author
- Source: https://github.com/billy-enrizky/openbrowser-ai
- Updated: 2026-09-28
- HTML: https://affpapa.org/en/nevibecode/mcp/openbrowser-ai

## What it does

The server connects an assistant to the browser using the Chrome DevTools Protocol (CDP). Instead of predefined macros, the model writes async Python code inside a persistent namespace. It inspects DOM elements and extracts structured data directly from pages. Screenshots help inspect visual layouts.

Setup needs Python 3.12 or newer. The package discovers existing installations of Chrome or Chromium automatically. You do not need to configure external browser drivers. When no compatible browser is found, `uvx` downloads Chromium during the initial run.

Logins persist between executions via `OPENBROWSER_USER_DATA_DIR` and `OPENBROWSER_STORAGE_STATE`. Without explicit boundaries in `OPENBROWSER_ALLOWED_DOMAINS`, the agent has access to visit arbitrary web domains.

## Requirements
- Needs: Python and uv (commands run via uvx)
- Environment variables: `OPENBROWSER_HEADLESS`, `OPENBROWSER_ALLOWED_DOMAINS`, `OPENBROWSER_USER_DATA_DIR`, `OPENBROWSER_STORAGE_STATE`, `OPENBROWSER_COMPACT_DESCRIPTION`, `OPENBROWSER_MAX_OUTPUT`, `ANONYMIZED_TELEMETRY` — keys and tokens: ask the human for the values, never commit them or put them in shared files.
- Works with: Chrome

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add --env OPENBROWSER_HEADLESS=<OPENBROWSER_HEADLESS> --env OPENBROWSER_ALLOWED_DOMAINS=<OPENBROWSER_ALLOWED_DOMAINS> --env OPENBROWSER_USER_DATA_DIR=<OPENBROWSER_USER_DATA_DIR> --env OPENBROWSER_STORAGE_STATE=<OPENBROWSER_STORAGE_STATE> --env OPENBROWSER_COMPACT_DESCRIPTION=<OPENBROWSER_COMPACT_DESCRIPTION> --transport stdio openbrowser-ai -- uvx openbrowser-ai
```
Replace <…> with your own values. 2 more environment variables are in the server README. uvx runs the command named after the package; if the README names another one, use uvx --from openbrowser-ai <command>

### Codex

**Platform CLI**
```bash
codex mcp add openbrowser-ai --env OPENBROWSER_HEADLESS=<OPENBROWSER_HEADLESS> --env OPENBROWSER_ALLOWED_DOMAINS=<OPENBROWSER_ALLOWED_DOMAINS> --env OPENBROWSER_USER_DATA_DIR=<OPENBROWSER_USER_DATA_DIR> --env OPENBROWSER_STORAGE_STATE=<OPENBROWSER_STORAGE_STATE> --env OPENBROWSER_COMPACT_DESCRIPTION=<OPENBROWSER_COMPACT_DESCRIPTION> -- uvx openbrowser-ai
```
Replace <…> with your own values. 2 more environment variables are in the server README. uvx runs the command named after the package; if the README names another one, use uvx --from openbrowser-ai <command>

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "openbrowser-ai": {
            "command": "uvx",
            "args": [
                "openbrowser-ai"
            ],
            "env": {
                "OPENBROWSER_HEADLESS": "<OPENBROWSER_HEADLESS>",
                "OPENBROWSER_ALLOWED_DOMAINS": "<OPENBROWSER_ALLOWED_DOMAINS>",
                "OPENBROWSER_USER_DATA_DIR": "<OPENBROWSER_USER_DATA_DIR>",
                "OPENBROWSER_STORAGE_STATE": "<OPENBROWSER_STORAGE_STATE>",
                "OPENBROWSER_COMPACT_DESCRIPTION": "<OPENBROWSER_COMPACT_DESCRIPTION>"
            }
        }
    }
}
```
Replace <…> with your own values. 2 more environment variables are in the server README. uvx runs the command named after the package; if the README names another one, use uvx --from openbrowser-ai <command>

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "openbrowser-ai": {
            "type": "stdio",
            "command": "uvx",
            "args": [
                "openbrowser-ai"
            ],
            "env": {
                "OPENBROWSER_HEADLESS": "<OPENBROWSER_HEADLESS>",
                "OPENBROWSER_ALLOWED_DOMAINS": "<OPENBROWSER_ALLOWED_DOMAINS>",
                "OPENBROWSER_USER_DATA_DIR": "<OPENBROWSER_USER_DATA_DIR>",
                "OPENBROWSER_STORAGE_STATE": "<OPENBROWSER_STORAGE_STATE>",
                "OPENBROWSER_COMPACT_DESCRIPTION": "<OPENBROWSER_COMPACT_DESCRIPTION>"
            }
        }
    }
}
```
Replace <…> with your own values. 2 more environment variables are in the server README. uvx runs the command named after the package; if the README names another one, use uvx --from openbrowser-ai <command>

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add -e OPENBROWSER_HEADLESS=<OPENBROWSER_HEADLESS> -e OPENBROWSER_ALLOWED_DOMAINS=<OPENBROWSER_ALLOWED_DOMAINS> -e OPENBROWSER_USER_DATA_DIR=<OPENBROWSER_USER_DATA_DIR> -e OPENBROWSER_STORAGE_STATE=<OPENBROWSER_STORAGE_STATE> -e OPENBROWSER_COMPACT_DESCRIPTION=<OPENBROWSER_COMPACT_DESCRIPTION> openbrowser-ai uvx openbrowser-ai
```
Replace <…> with your own values. 2 more environment variables are in the server README. uvx runs the command named after the package; if the README names another one, use uvx --from openbrowser-ai <command>

## When to use it
- scrape dynamic web pages and complex online stores
- automate multi-step form submissions and registration flows
- inspect page layouts visually using screenshots
- persist authentication cookies between automation sessions

## Example prompts
- Navigate to `https://example.com`, complete the contact form, and submit it.
- Capture a screenshot of the main dashboard and extract all visible statistics.
- Sign in to the platform and check whether the account settings load properly.

## Similar
- [Scrapling MCP Server](https://affpapa.org/en/nevibecode/mcp/scrapling-mcp-server.md) — MCP server · ★ 89433
- [browser-use](https://affpapa.org/en/nevibecode/mcp/browser-use.md) — MCP server · ★ 119160
- [AIHawk](https://affpapa.org/en/nevibecode/mcp/aihawk.md) — MCP server · ★ 32221
- [Skyvern](https://affpapa.org/en/nevibecode/mcp/skyvern.md) — MCP server · ★ 23263
- [SeleniumBase MCP](https://affpapa.org/en/nevibecode/mcp/seleniumbase-mcp.md) — MCP server · ★ 13169
- [apify-mcp-server](https://affpapa.org/en/nevibecode/mcp/apify-mcp-server.md) — MCP server · ★ 12927

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
