Skip to main content
Glama
wrave-mcp

wrave-mcp

Wrave

High-performance Model Context Protocol (MCP) gateway for Brave Browser.
Direct, low-latency browser automation for Claude Code, Antigravity, Codex, Cursor, and MCP clients.

npm version License: MIT


Overview

Wrave provides full programmatic control of your active Brave browser session through the Model Context Protocol (MCP). It gives coding assistants and developer workflows direct access to interact with, inspect, and navigate live web applications:

  • 1-Turn Compound Actions: High-speed primitives like click_and_read and type_and_submit that combine interaction and page inspection into a single round-trip.

  • Semantic Element Indexing: Surfaces interactive elements with numbered references (@1, @2, @3, etc.), bounding boxes, and accessibility roles—eliminating brittle CSS selectors on dynamic apps.

  • Full-Spectrum Inspection: Clean DOM trees, accessibility hierarchies, full-page or viewport screenshots, intercepted console logs, network cookies, and tab state.

  • Dual Transport Modes: Works out of the box on demand via stdio (zero background services to manage) or as a local HTTP/SSE service.

  • Zero Browser Modifications: Runs directly alongside your everyday browser session without requiring special startup flags or separate browser drivers.


Related MCP server: hronaut

Installation in Brave Browser

  1. Download the latest wrave-extension-v*.zip from GitHub Releases and extract it.

  2. Open Brave and navigate to:

    brave://extensions
  3. Enable the Developer mode toggle in the top-right corner.

  4. Click Load unpacked and select the extracted folder.

  5. (Optional) Pin the Wrave icon to your toolbar for quick status monitoring.


Connect Your Client

Wrave supports automatic stdio launching (recommended) and connecting to a persistent local server.

1. Google Antigravity

Add Wrave to ~/.gemini/config/mcp_config.json:

{
  "mcpServers": {
    "wrave": {
      "command": "npx",
      "args": ["-y", "wrave-mcp", "--stdio"]
    }
  }
}

Option B: Persistent Local Server

If running npx wrave-mcp --server:

{
  "mcpServers": {
    "wrave": {
      "serverUrl": "http://127.0.0.1:8282/mcp"
    }
  }
}

2. Claude Code (CLI)

Add to Claude Code with a single command:

# On-demand stdio (recommended)
claude mcp add wrave -- npx -y wrave-mcp --stdio

# Or connect to a running local server:
claude mcp add wrave -- http://127.0.0.1:8282/mcp/sse

3. Claude Desktop

Add to your claude_desktop_config.json:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json

  • Windows: %APPDATA%\Claude\claude_desktop_config.json

{
  "mcpServers": {
    "wrave": {
      "command": "npx",
      "args": ["-y", "wrave-mcp", "--stdio"]
    }
  }
}

4. OpenAI Codex & OpenCode

Add to your opencode.json configuration:

{
  "mcp": {
    "servers": {
      "wrave": {
        "command": "npx",
        "args": ["-y", "wrave-mcp", "--stdio"]
      }
    }
  }
}

Or connect via HTTP endpoint:

{
  "mcp": {
    "servers": {
      "wrave": {
        "url": "http://127.0.0.1:8282/mcp"
      }
    }
  }
}

5. Cursor & Windsurf

Add to ~/.cursor/mcp.json or ~/.codeium/windsurf/mcp_config.json:

{
  "mcpServers": {
    "wrave": {
      "command": "npx",
      "args": ["-y", "wrave-mcp", "--stdio"]
    }
  }
}

Available MCP Tools (21 Primitives)

Compound Actions (1-Turn)

Tool Name

Description

Parameters

wrave_get_snapshot

Instant page snapshot with indexed interactive elements (@1, @2, etc.), title, and URL.

tab_id

wrave_click_and_read

Click an element (by selector, @ref like @1, or x/y) and immediately return the updated page snapshot.

tab_id, selector, x, y

wrave_type_and_submit

Type text into an input or contenteditable field and submit with Enter in 1 turn.

tab_id, selector, text, clear_first, submit_key

Core Navigation & Inspection

Tool Name

Description

Parameters

wrave_list_tabs

List all open tabs with ID, title, URL, and active state.

None

wrave_open_tab

Open a new tab with specified URL (auto-returns page snapshot & indexed elements).

url, activate (bool)

wrave_close_tab

Close an open tab by its ID.

tab_id

wrave_focus_tab

Bring tab to foreground and activate it.

tab_id

wrave_reload_tab

Reload tab with optional cache bypass.

tab_id, ignore_cache

wrave_get_tab_state

Read title, URL, viewport dimensions, and scroll position.

tab_id

wrave_get_dom_tree

Extract clean, LLM-friendly DOM tree with bounding boxes [x, y, w, h] or raw HTML.

tab_id, max_depth, html

wrave_get_accessibility_tree

Extract full AX accessibility tree (roles, labels, values).

tab_id

wrave_take_screenshot

Capture viewport or full-page screenshot as base64 image.

tab_id, full_page, format

Direct Interaction Primitives

Tool Name

Description

Parameters

wrave_click

Dispatch click to element selector, @ref (e.g. @1), or pixel coordinates.

tab_id, selector, x, y

wrave_double_click

Dispatch double-click to element selector or @ref.

tab_id, selector

wrave_type_text

Type text into inputs, textareas, and rich contenteditable editors (@ref supported).

tab_id, selector, text, clear_first

wrave_press_key

Dispatch native keyboard key event (Enter, Tab, Escape, etc.).

tab_id, key

wrave_scroll_page

Scroll viewport or target scrollable container.

tab_id, delta_y, delta_x

wrave_execute_script

Evaluate arbitrary JavaScript expression in tab context.

tab_id, script

wrave_get_cookies

Retrieve cookies for the active domain.

tab_id

wrave_print_to_pdf

Export active page to PDF document.

tab_id

wrave_get_console_logs

Retrieve intercepted console logs from the page.

tab_id


Development & Building from Source

# 1. Clone repository
git clone https://github.com/AMARA-Khaled/wrave.git
cd wrave

# 2. Install dependencies
npm install

# 3. Build codebase
npm run build

# 4. Run automated test suite
npm test

# 5. Package extension bundle
npm run pack:extension

License

MIT © AMARA Khaled

Available Tools

21 tools
wrave_clickB

Dispatch mouse click to element selector or pixel coordinates.

Inputs: tab_id (required), x, y, selector.

wrave_click_and_readB

Click an element (by selector, @ref like @1, or x/y) and immediately return the updated page snapshot in 1 turn.

Inputs: tab_id (required), x, y, selector.

wrave_close_tabA

Close an open tab by its ID.

Inputs: tab_id (required).

wrave_double_clickC

Dispatch double-click event to element selector or coordinates.

Inputs: tab_id (required), selector.

wrave_execute_scriptB

Execute arbitrary JavaScript expression in the tab context.

Inputs: script (required), tab_id (required).

wrave_focus_tabB

Bring a tab to the foreground and activate it.

Inputs: tab_id (required).

wrave_get_accessibility_treeA

Extract the full accessibility tree (AXTree) for semantic screen-reader level inspection.

Inputs: tab_id (required).

wrave_get_console_logsA

Retrieve intercepted console logs for the tab.

Inputs: tab_id (required).

wrave_get_cookiesC

Retrieve cookies for the tab or domain.

Inputs: tab_id (required).

wrave_get_dom_treeB

Extract clean, LLM-friendly DOM tree with bounding boxes [x, y, w, h] and interactive element metadata.

Inputs: tab_id (required), html, max_depth.

wrave_get_snapshotA

Instant page snapshot with indexed interactive elements (@1, @2, etc.), title, and URL.

Inputs: tab_id (required).

wrave_get_tab_stateB

Read the active tab state including title, URL, viewport dimensions, and scroll offset.

Inputs: tab_id (required).

wrave_list_tabsA

List all open tabs in Brave, including tab ID, URL, title, and active state.

Inputs: no named parameters.

wrave_open_tabA

Open a new tab with the specified URL.

Inputs: url (required), activate.

wrave_press_keyB

Send a keyboard key press (e.g. Enter, Escape, Tab, Backspace).

Inputs: key (required), tab_id (required).

wrave_print_to_pdfB

Export the current page as a PDF document.

Inputs: tab_id (required).

wrave_reload_tabC

Reload the specified tab.

Inputs: tab_id (required), ignore_cache.

wrave_scroll_pageC

Scroll the active tab viewport by deltaX and deltaY.

Inputs: tab_id (required), delta_x, delta_y.

wrave_take_screenshotA

Capture a screenshot of the tab viewport or full page as base64 PNG/JPEG.

Inputs: tab_id (required), format, full_page.

wrave_type_and_submitB

Type text into an input or contenteditable field and submit with Enter key in 1 turn.

Inputs: text (required), tab_id (required), selector (required), submit_key, +1 more.

wrave_type_textC

Type text into an input or textarea.

Inputs: text (required), tab_id (required), selector, clear_first.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.5/5.0

    Scored across 21 tools

    Disambiguation4/5

    Most tools have clearly distinct purposes (tab management, content extraction, interaction, utilities). Some overlap exists between get_dom_tree, get_accessibility_tree, and get_snapshot, and compound tools like click_and_read combine actions but descriptions clarify their use.

    Naming Consistency5/5

    All tools follow the consistent pattern 'wrave_' + verb + noun (e.g., list_tabs, close_tab, take_screenshot, execute_script). The naming is uniform and predictable, with no style mixing.

    Tool Count4/5

    At 21 tools, the server is on the heavy side, but the scope (browser automation) justifies the breadth. It covers tab management, page inspection, interaction, and auxiliary functions without being excessive.

    Completeness4/5

    Core browser automation workflows are well covered: tabs (open, close, focus, reload), content extraction (DOM, AX, screenshot, snapshot), interaction (click, type, keys, scroll), and utilities (cookies, PDF, console). Minor gaps like hover, back/forward navigation, or wait-for-element are absent but not critical.

    Maintenance

    ActivityNo data
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers