# H/Ai Browser

> H/Ai Browser is a free MCP server for browser automation. Share VS Code's built-in browser with Claude Code, Copilot, Codex and other agents. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Free
- **Platforms:** vscode, CLI
- **Website:** https://marketplace.visualstudio.com/items?itemName=hai-browser.hai-browser
- **Repository:** https://github.com/snapblock/hai-browser/tree/HEAD/packages/mcp
- **MCP Registry name:** io.github.festuscharles-n/hai-browser
- **Categories:** browser automation, developer tools
- **Listing updated:** 2026-11-14

## About

H/Ai Browser is a VS Code extension with an MCP server bundled inside it, so an agent can drive the same integrated browser tab you are looking at. Its standout feature is click-to-source: pick an element on the page and jump to the JSX line that rendered it. That needs a small dev plugin, `hai-browser-vite` or `hai-browser-next`, added to your framework config.

It needs VS Code 1.119 or later, VSCodium or Windsurf; Cursor and Antigravity are not yet supported. The workspace must be trusted. Claude Code is connected from a prompt or the `H/Ai: Connect Claude Code` command, GitHub Copilot in VS Code picks it up with no setup, and other agents use a copy-setup command.

The agent API binds to 127.0.0.1 with a per-window token, and `browser_evaluate` stays off unless you turn on `haiBrowser.allowEvaluate`. The marketplace lists it as free and in preview.

## Features

- **Shared browser tab:** Agents use VS Code's integrated browser.
- **Click-to-source:** Jump from a page element to its JSX line.
- **Local-only API:** Binds to 127.0.0.1 with a per-window token.
- **Gated evaluate:** browser_evaluate is off by default.
- **Multiple agents:** Claude Code, Copilot, Codex, Gemini CLI and Cline.

## Good for

- Let an agent test a page you are building
- Find the component behind a UI element
- Debug front-end issues alongside an agent
- Share one browser tab between you and an agent

## Install

### Claude Code (Terminal)

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

### Claude Desktop (claude_desktop_config.json)

```json
{
  "mcpServers": {
    "hai-browser": {
      "command": "npx",
      "args": [
        "-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"
      ]
    }
  }
}
```

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

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

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

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

## Tools

- `browser_evaluate`: Runs JavaScript in the page; off unless haiBrowser.allowEvaluate is enabled.

## FAQ

### Which editors work?

VS Code 1.119+, VSCodium or Windsurf; Cursor and Antigravity are not yet supported.

### Is it free?

The marketplace page shows it as free.

### Does it run remotely?

No, everything runs locally.

### How do I enable click-to-source?

Install hai-browser-vite or hai-browser-next and add it to your config.

### Is H/Ai Browser free?

Yes. H/Ai Browser is free to use.

### How do I add H/Ai Browser to Claude Code?

Run this command in your terminal: claude mcp add hai-browser -- npx -y hai-browser-mcp

### What are the best alternatives to H/Ai Browser?

The closest alternatives to H/Ai Browser are REA, Browser Use, Scrapling MCP Server, Codebase Memory and GitHub.

## 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.
- [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.
- [XERJ](https://ai-powered.com/mcp/xerj): XERJ is an open-source MCP server for knowledge and memory.
- [Ouroboros](https://ai-powered.com/mcp/ouroboros): Ouroboros is an open-source MCP server for developer tools.

---
Source: https://ai-powered.com/mcp/h-ai-browser
