Antigravity Browser Operator
Automate and inspect your live Google Chrome browser through MCP, preserving existing tabs, logins, and sessions without restarting Chrome.
List tabs with IDs, titles, URLs, and active status; focus, open, close, and navigate tabs.
Extract page titles, URLs, visible text, and HTML/DOM content.
Click elements by CSS selector or visible text, type into inputs or textareas, optionally press Enter, and scroll up or down.
Capture visible-tab screenshots as data URLs.
Execute arbitrary JavaScript in the active or a specified tab and return the result.
Connect securely through a token-authenticated local WebSocket bridge to the Chrome extension.
Connects to a live Google Chrome browser via a Chrome extension and local WebSocket bridge, enabling browser automation: listing, selecting, navigating, clicking, typing, scrolling, extracting DOM, taking screenshots, evaluating JavaScript, and opening/closing tabs across any website while preserving logins and sessions.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Antigravity Browser Operator list all my open Chrome tabs and switch to the GitHub one"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
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:
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 tokento view your security token.
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 theOriginheader.Any connection originating from a web page (
http://orhttps://) 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:
Open Google Chrome and go to
chrome://extensions.Toggle on Developer mode (top right corner).
Click Load unpacked (top left).
Select the
extensionfolder from this project:C:\Users\r123t\Documents\www\browser-operator\extensionYou'll see the ⚡ Browser Operator icon appear in your Chrome toolbar.
2. Pair with Security Token:
Get your security token by running:
npm run token(or copy it from
~/.browser-operator/token)Click the Browser Operator icon in Chrome.
Paste the token into the Security Token field and click Save Token.
The status badge will turn green: Connected and Authenticated.
🛠️ MCP Tools Provided
Tool Name | Description |
| Lists all Google Chrome user profiles detected on this computer, showing folder names, emails, extension status, and real-time connection state. |
| Launches a specific Google Chrome user profile window directly by name, folder, or email. |
| Returns all open tabs across your Chrome windows (ID, title, URL, active state). |
| Focuses / switches to a specific tab by ID. |
| Navigates the current tab to any URL and waits for page load. |
| Extracts title, URL, visible text, links, and indexed interactive |
| Clicks elements using an indexed |
| Types into input / text fields by |
| Selects an option from a |
| Sets the checked state ( |
| Captures visible screenshot of any tab and saves as a PNG/JPEG image to disk (supports Set-of-Marks |
| Scrolls tab up or down smoothly. |
| Executes arbitrary JavaScript inside the page context. |
| Uploads local files to file inputs autonomously via Chrome DevTools Protocol & DataTransfer without opening OS file picker. |
| Opens a new tab with a given URL. |
| Closes any specific tab. |
📄 License
MIT © Hashan Walauwatta
Available Tools
25 toolsbrowser_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_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
Scored across 25 tools
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.
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.
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.
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
Related MCP Connectors
Give AI agents a real cloud Chrome: open sessions, navigate, read pages, click, type and screenshot.
Control a real browser from AI agents: navigate, click, type, screenshot, read the page.
Let AI agents use your real, signed-in Chrome: tabs, clicks, forms, screenshots and video.
Control your Chrome from chat: open websites, read what's on the page, click buttons, and fill in f…
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to control a user's existing Chrome browser with preserved logins, performing tab management, element interaction, script execution, and screenshots, all locally via a Chrome extension and Python bridge.2MIT
- AlicenseNot gradedqualityCmaintenanceLets 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
- AlicenseNot gradedqualityAmaintenanceEnables 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 npmISC
- AlicenseNot gradedqualityAmaintenanceLets 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 npmISC