Skip to main content
Glama
Antigravity Browser Operator

Antigravity Browser Operator

Browser Operator ⚡

Connects your live Google Chrome browser directly to AI Agents and MCP clients without restarting Chrome, bypassing the need for guest profiles or remote debugging flags.

Built with a Manifest V3 Chrome Extension (chrome.tabs, chrome.scripting, chrome.debugger) and a local Model Context Protocol (MCP) Server communicating over an authenticated local WebSocket bridge (ws://127.0.0.1:8765).


🌟 How it Works

graph LR
  A["AI Agent / MCP Client"] -->|MCP stdio| B["Local MCP Server (Node.js)"]
  B <-->|Authenticated WS ws://127.0.0.1:8765| C["Chrome Extension (Manifest V3)"]
  C <-->|chrome.tabs & scripting API| D["Your Live Chrome (Any Website / Web App)"]

Unlike traditional debugging flags (--remote-debugging-port), this architecture works seamlessly inside your existing Chrome instance with:

  • ✅ No Chrome restarts required

  • ✅ Works across ANY website & web application (Gmail, LinkedIn, GitHub, AWS, ChatGPT, etc.)

  • ✅ All active logins & sessions preserved

  • ✅ Full session cookies & 2FA intact

  • ✅ Instant tab switching, clicking, typing, scrolling, and DOM extraction


Related MCP server: agent-chrome

🔒 Security Architecture

To protect your browser against unauthorized local access and malicious websites, the bridge implements multi-layered security controls:

  1. Cryptographic Token Authentication (Shared Secret):

    • All connections to the local WebSocket bridge require a 256-bit entropy token.

    • Automatically generated and securely stored at ~/.browser-operator/token.

    • Unauthenticated or invalid connections are dropped immediately (4001 Unauthorized).

    • Run npm run token to view your security token.

  2. Cross-Site WebSocket Hijacking (CSWSH) Prevention:

    • Web browsers do not enforce Same-Origin Policy on WebSockets by default. To prevent malicious websites visited in your browser from attempting to connect to 127.0.0.1:8765, the bridge inspects the Origin header.

    • Any connection originating from a web page (http:// or https://) is immediately terminated (4003 Forbidden).

    • Only the trusted Chrome Extension origin (chrome-extension://) and local Node.js backend processes are permitted.


🚀 Quick Setup (1 Minute)

1. Load the Chrome Extension:

  1. Open Google Chrome and go to chrome://extensions.

  2. Toggle on Developer mode (top right corner).

  3. Click Load unpacked (top left).

  4. Select the extension folder from this project:

    C:\Users\r123t\Documents\www\browser-operator\extension
  5. You'll see the ⚡ Browser Operator icon appear in your Chrome toolbar.

2. Pair with Security Token:

  1. Get your security token by running:

    npm run token

    (or copy it from ~/.browser-operator/token)

  2. Click the Browser Operator icon in Chrome.

  3. Paste the token into the Security Token field and click Save Token.

  4. The status badge will turn green: Connected and Authenticated.


🛠️ MCP Tools Provided

Tool Name

Description

browser_list_profiles

Lists all Google Chrome user profiles detected on this computer, showing folder names, emails, extension status, and real-time connection state.

browser_launch_profile

Launches a specific Google Chrome user profile window directly by name, folder, or email.

browser_list_tabs

Returns all open tabs across your Chrome windows (ID, title, URL, active state).

browser_select_tab

Focuses / switches to a specific tab by ID.

browser_navigate

Navigates the current tab to any URL and waits for page load.

browser_get_dom

Extracts title, URL, visible text, links, and indexed interactive elements with numerical ref IDs ([1], [2], ...).

browser_click

Clicks elements using an indexed ref (recommended), CSS selector, or visible text (smart-matches buttons/links/inputs and skips scripts/styles).

browser_type

Types into input / text fields by ref or CSS selector with optional Enter keypress.

browser_select_option

Selects an option from a <select> dropdown or custom listbox by ref or selector with value or text.

browser_set_checked

Sets the checked state (true/false) of a checkbox, radio, or toggle switch by ref or selector.

browser_screenshot

Captures visible screenshot of any tab and saves as a PNG/JPEG image to disk (supports Set-of-Marks annotate: true).

browser_scroll

Scrolls tab up or down smoothly.

browser_evaluate

Executes arbitrary JavaScript inside the page context.

browser_upload_file

Uploads local files to file inputs autonomously via Chrome DevTools Protocol & DataTransfer without opening OS file picker.

browser_new_tab

Opens a new tab with a given URL.

browser_close_tab

Closes any specific tab.


📄 License

MIT © Hashan Walauwatta

Available Tools

25 tools
browser_batch_actionsA

Executes multiple sequential browser actions (click, type, wait, scroll, select_option, set_checked, navigate) in a single turn without round-trip LLM pauses. Drastically speeds up multi-step tasks, form filling, and searching.

Inputs: actions (required), tabId.

browser_clickC

Clicks an element on the active or specified tab using an indexed ref, CSS selector, or visible text.

Inputs: x, y, ref, text, +2 more.

browser_close_tabB

Closes a specific tab in the user’s Chrome browser by tab ID.

Inputs: tabId (required).

browser_evaluateB

Executes arbitrary JavaScript in the context of the active or specified tab and returns the result.

Inputs: script (required), tabId.

browser_find_recipeA

Searches the agent’s muscle memory for existing recipes on a domain or task. Returns stored action sequences ready to run via browser_batch_actions.

Inputs: query, domain.

browser_get_console_logsB

Retrieves recent console logs, warnings, runtime errors, and unhandled promise rejections from the page.

Inputs: clear, tabId, types.

browser_get_domB

Extracts the page title, URL, token-dense compact DOM representation, indexed interactive elements with refs, and clean text of the tab.

Inputs: tabId, includeLinks, maxTextLength.

browser_get_network_logsA

Retrieves recent network activity (Fetch, XHR, resource requests, status codes, failed requests, and response times).

Inputs: clear, limit, tabId, failedOnly.

browser_get_site_memoryA

Retrieves all learned knowledge, known quirks, and saved recipes for a specific domain or the active tab.

Inputs: tabId, domain.

browser_handle_dialogA

Handles, accepts, or dismisses browser native JavaScript modal dialogs (alerts, confirms, prompts, and "Leave site?" beforeunload dialogs) using Chrome DevTools Protocol.

Inputs: tabId, accept, promptText.

browser_launch_profileA

Launches a specific Google Chrome user profile window directly by name, folder directory (e.g. "Profile 13", "Default"), or email, optionally navigating to an initial URL. Bypasses the Chrome profile picker dialog entirely.

Inputs: profile (required), url.

browser_learn_site_quirkB

Records a site-specific quirk, pitfall, selector tip, or bypass rule into the long-term knowledge library.

Inputs: quirk (required), domain (required), advice, category, +1 more.

browser_list_profilesB

Lists all Google Chrome user profiles detected on this computer (e.g. Personal, Work, Clean, Hashan), showing profile folder names ("Default", "Profile 13"), profile display names, emails, whether the Browser Operator extension is installed, and real-time WebSocket connection status.

Inputs: no named parameters.

browser_list_tabsA

Lists all open tabs across all active Chrome windows and profiles, returning tab ID, title, URL, active status, and profile name.

Inputs: no named parameters.

browser_navigateA

Navigates the specified or active tab in the user’s Chrome browser to a URL and waits for page load.

Inputs: url (required), tabId, waitUntil.

browser_new_tabB

Opens a new tab in the user’s Chrome browser with a specified URL, optionally in a designated profile.

Inputs: url (required), profile.

browser_save_recipeA

Saves a successful multi-step workflow/macro into the agent’s muscle memory. Stored recipes can be recalled and executed in seconds for repetitive site tasks.

Inputs: name (required), domain (required), actions (required), notes, +1 more.

browser_screenshotB

Captures a visible screenshot of the active or specified tab in Chrome and saves it as an image on disk.

Inputs: tabId, format, quality, annotate, +1 more.

browser_scrollC

Scrolls the active or specified tab up or down.

Inputs: tabId, amount, direction.

browser_select_optionB

Selects an option from a dropdown or listbox on the active or specified tab.

Inputs: ref, text, tabId, value, +1 more.

browser_select_tabB

Switches to / focuses a specific tab in the user’s Chrome browser by tab ID.

Inputs: tabId (required).

browser_set_checkedB

Sets the checked state of a checkbox, radio button, or switch toggle.

Inputs: ref, tabId, checked, selector.

browser_typeC

Types text into an input or textarea element on the active or specified tab.

Inputs: text (required), ref, tabId, selector, +1 more.

browser_upload_fileB

Uploads a local file to a file input on the active or specified tab completely autonomously without opening OS file picker.

Inputs: filePath (required), ref, tabId, selector.

browser_wait_forB

Waits for an element to appear, become visible, clickable, hidden, or waits for network idle (pending API requests to finish).

Inputs: ref, text, state, tabId, +2 more.

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    B3.3/5.0

    Scored across 25 tools

    Disambiguation4/5

    Most tools map to a single distinct browser action (click, type, scroll, navigate, screenshot), so selection is usually unambiguous. The main fuzziness is in the memory group — save_recipe, learn_site_quirk, find_recipe, and get_site_memory overlap in that all store/retrieve per-domain knowledge — and batch_actions partially duplicates the granular action tools, though descriptions clarify the distinction.

    Naming Consistency4/5

    Every tool carries the `browser_` prefix and uses snake_case, giving a predictable namespace. Minor deviations exist where the second token is a noun rather than a verb (browser_new_tab, browser_batch_actions), but overall the verb_noun pattern holds well.

    Tool Count3/5

    At 25 tools this sits at the heavy end of the scale for a browser automation server. Core actions are justified, but the recipe/quirks/memory trio plus logs, profiles, and dialogs push the surface beyond a tight, well-earned set.

    Completeness4/5

    Coverage is broad: navigation, tab lifecycle, profiles, interaction, dialogs, uploads, screenshots, DOM extraction, JS eval, and diagnostics. Gaps remain for keyboard key presses (Enter/Tab/Escape), hover and drag-and-drop, history back/forward, and iframe traversal, which agents will hit on real sites.

    Maintenance

    ActivityNo data
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      C
      maintenance
      Lets local AI agents drive the Chrome browser a user already has open, including signed-in sessions, by listing tabs, reading page text and actionable elements, then clicking, filling, selecting, scrolling, navigating, and capturing viewport screenshots without exporting cookies. Runs as a dependency-free local stdio process over Native Messaging, with per-tab leases, automatic reconnection, and pause/write-action controls.
      MIT
    • A
      license
      Not graded
      quality
      A
      maintenance
      Enables AI assistants to drive the user's real, already-logged-in Chrome browser locally, so they can read and navigate pages, click, type, fill forms, take screenshots, and inspect cookies, tabs, console, and network traffic without headless browsers or remote-debugging ports.
      1 npm
      ISC
    • A
      license
      Not graded
      quality
      A
      maintenance
      Lets AI coding tools drive the real, already-logged-in Chrome browser over local stdio—snapshotting and reading pages, clicking, typing, managing tabs, capturing screenshots, and inspecting network, console, storage, and cookies—without opening a remote-debugging port. It installs as a Chrome extension plus native-messaging bridge, so agents work in the user's authenticated sessions while passing bot detection.
      1 npm
      ISC