# H/Ai Browser MCP server

> Allows AI agents to control the VS Code integrated browser through actions like clicking, typing, and inspecting network logs.

- Repository: https://github.com/SnapBlock/hai-browser
- Page: https://hostedmcp.org/servers/snapblock/hai-browser
- Transport: stdio
- Stars: 1
- License: MIT
- Latest version: 0.0.13

## Install

### Claude Code

```sh
claude mcp add hai-browser -- npx -y hai-browser-mcp
```

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

```json
{
  "mcpServers": {
    "hai-browser": {
      "command": "npx",
      "args": [
        "-y",
        "hai-browser-mcp"
      ]
    }
  }
}
```

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

```json
{
  "servers": {
    "hai-browser": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "hai-browser-mcp"
      ]
    }
  }
}
```

### VS Code CLI

```sh
code --add-mcp '{"name":"hai-browser","type":"stdio","command":"npx","args":["-y","hai-browser-mcp"]}'
```

### Claude Desktop (`claude_desktop_config.json`)

```json
{
  "mcpServers": {
    "hai-browser": {
      "command": "npx",
      "args": [
        "-y",
        "hai-browser-mcp"
      ]
    }
  }
}
```

### Codex

```sh
codex mcp add hai-browser -- npx -y hai-browser-mcp
```

### Codex config.toml (`~/.codex/config.toml`)

```toml
[mcp_servers.hai-browser]
command = "npx"
args = ["-y", "hai-browser-mcp"]
```

### Gemini CLI

```sh
gemini mcp add -s user hai-browser npx -- -y hai-browser-mcp
```

### Gemini settings.json (`~/.gemini/settings.json`)

```json
{
  "mcpServers": {
    "hai-browser": {
      "command": "npx",
      "args": [
        "-y",
        "hai-browser-mcp"
      ]
    }
  }
}
```

## FAQ

### What do I need to run H/Ai Browser?

You must have the H/Ai Browser extension running in VS Code.

### How can I set up the server automatically?

The VS Code extension bundles the server and provides options like 'H/Ai: Connect Claude Code' to set it up for you.

### What actions can an AI agent perform in the browser?

AI agents can take snapshots, perform clicks, type, fill forms, manage tabs, take screenshots, and access console and network logs.
