browser-control
Controls the Firefox browser, providing tools to list and manage tabs, navigate, snapshot, screenshot, click, fill forms, scroll, run persistent scripts, and automate existing browser 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., "@browser-control Take a screenshot of the current tab and describe what's on the page."
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.
Local Browser Control MCP
Control Chrome, Helium and Firefox from an MCP client using your existing browser session. The server runs locally. No remote relay, account or debugging port is required.
Reuse existing windows and keep automation tabs in named groups.
Read page state, scroll containers and frames; fill forms and verify actions.
Show a smooth virtual cursor with click pulses. Human input hides it and cancels pending work.
Mask sensitive screenshot regions locally, by default and without a switch.
Close unused automation tabs after four hours. Preserve pinned and marked tabs.
Use an authenticated local WebSocket, or an optional native messaging pipe.
This is an independent project. It does not use or reproduce OpenAI's private extension protocol.
Install
Requires Node.js 22+, Chrome/Helium 120+ or Firefox 139+.
Release package
Download the server .tgz from Releases, then install it:
npm install -g ./browser-control-mcp-0.1.0.tgz
browser-control-mcp --setupThe setup command creates locally paired extension folders, starts the bridge and prints your MCP configuration. Add that configuration to your client, then reconnect it.
Load the extension folder printed by setup:
Chrome / Helium: open
chrome://extensions, enable Developer mode, select Load unpacked, then select thechromefolder.Firefox: open
about:debugging#/runtime/this-firefox, select Load Temporary Add-on, then selectfirefox/manifest.json.
The popup shows Connected when the bridge is available. It contains only the connection toggle and idle cleanup timeout.
Firefox releases are unsigned. Temporary installation ends when Firefox closes. Permanent installation in standard Firefox requires Mozilla signing. The Chrome ZIP is for unpacked installation, not a signed Web Store release.
Registry publication is pending. Use the release package above until an npm package name is confirmed.
Using a downloaded extension ZIP
Setup already creates extension folders. If you prefer the separate release ZIP, extract it to a permanent folder and pair it before loading:
browser-control-mcp --pair-extension /path/to/extracted-extensionPublic ZIPs contain no pairing secret. After pairing, the local folder contains your secret: do not upload or share that folder.
Build from source
git clone https://github.com/kierandrewett/browser-control-mcp.git
cd browser-control-mcp
yarn install
yarn build
yarn setupUse the extension paths and MCP configuration printed by setup. Development builds are also available in build/chrome and build/firefox.
After an update, repeat the build and setup commands, reload the extension and reconnect the MCP client.
Related MCP server: chrome-agent-browser
Start using it
Ask your client to call browser_list, then browser_tabs. If multiple profiles are connected, use the returned browser ID.
browser_list {}
browser_tabs {"browser":"chrome"}
browser_snapshot {"browser":"chrome","tabId":3}The server also provides a persistent JavaScript API:
let tab = await cua.createBrowserTab("chrome", "https://example.com", {
sessionName: "Research",
});
await tab.getAXStateAndScreenshot();Read browser behaviour and tools, JavaScript API compatibility, and privacy and recovery limits.
Behaviour and safety
There are no per-site approvals, task controls or manual resume buttons. When enabled, the connection can control your browser tabs. Browser-enforced permissions still apply.
Real mouse, keyboard, touch or wheel input cancels pending work and hides the virtual cursor. The agent must read a fresh snapshot before further actions. Disable the connection for private activity such as password-manager login.
Screenshots are always masked locally. Masking is not a guarantee that all sensitive page content is detected. Page text can still contain private information. Screenshots briefly select their target tab, then restore the previous selection.
New tabs normally open in an existing window without changing its selected tab. Named sessions use tab groups. Closing the last task tab removes the group and ends that named session.
Only recorded automation tabs are eligible for four-hour idle cleanup. Pinned tabs and marked handoffs or deliverables are protected. Ordinary tabs are not adopted for cleanup. Unmarked idle forms can close, so mark work you need to keep.
Chrome supports trusted text insertion when its target is active in the focused window. Pointer and key actions use DOM events in both browsers. Sites that require trusted pointer or key events may reject them. Chrome can show a debugger attachment banner.
Actions are not automatically replayed after failure. A lost reply can mean an action already happened. Read current page state and use browser_action_status before retrying a write.
The JavaScript runtime has your local OS permissions. It is not a security sandbox.
Local connection
The bridge listens on 127.0.0.1:18925. It uses a random pairing token, rejects web-page origins, reconnects after connection loss and expires journal metadata after 24 hours. The journal stores no page content, screenshots, action arguments or results.
npm installations store configuration, journal data and generated extensions in ~/.local/share/browser-control-mcp. Source checkouts keep their existing .local directory. Set BROWSER_CONTROL_HOME to use another directory; use the same value for setup and the MCP server.
To diagnose startup, run browser-control-mcp --bridge in a terminal. For a custom port, stop the existing bridge, change port in the data directory's config.json, repeat setup, then reload both the extension and MCP client.
Keep the bridge on loopback. The server and browser must run on the same computer. A remote agent must start the stdio server on that computer, for example through SSH.
Optional native messaging on Linux
From a source checkout, install the native host with your browser's extension ID:
node scripts/install-native.mjs helium YOUR_EXTENSION_IDUse chrome or chromium for those browsers. For Firefox, use node scripts/install-native.mjs firefox. Chromium-based browsers accept a custom user-data directory as the third argument.
Reload the extension. The popup reports native messaging or local WebSocket transport. The native host uses OS pipes to the browser and still connects to the authenticated local bridge.
Development
yarn check
yarn build
yarn testBrowser tests use temporary profiles and isolated bridge ports. They do not control your normal browsing session. Install Chromium with yarn playwright install chromium. To test Firefox:
GECKODRIVER=/path/to/geckodriver yarn testFirefox tests expect /usr/bin/firefox. The suite covers forms, shadow roots, frames, screenshots, cursor behaviour, human takeover, idle cleanup and connection recovery.
Create release files
yarn release:extensions
npm packThe extension command requires zip. It creates fresh, unpaired Chrome and Firefox ZIPs plus SHA256SUMS in releases/v<VERSION>. It refuses to overwrite existing release files. Never ZIP the paired build folders for distribution.
The npm package uses an explicit file allowlist. Local configuration, build folders, browser profiles and test captures are excluded.
After installing a tarball in a temporary directory, test the installed package with:
node scripts/test-installed.mjs /path/to/node_modules/browser-control-mcpThis checks setup, generated extensions, MCP requests and the script runtime using isolated configuration and a temporary bridge port.
Available Tools
36 toolsbrowser_accessibilityB
Read Chrome's native accessibility tree. Snapshot provides semantic DOM state on both browsers.
Inputs: tabId (required), browser.
browser_action_statusA
Recover metadata for an operation ID from a failed command without replaying it. A completed reply does not prove website persistence; inspect the page before any retry.
Inputs: operationId (required).
browser_apiC
Read the local cua compatibility API and its limitations.
Inputs: no named parameters.
browser_backC
Go back in a tab's history.
Inputs: tabId (required), browser.
browser_capabilitiesC
Report the input and observation capabilities of this browser.
Inputs: browser.
browser_clickC
Click an element or exact viewport coordinates with DOM events. Supports left/right/middle buttons and double-click.
Inputs: tabId (required), x, y, ref, +9 more.
browser_closeC
Close a tab.
Inputs: tabId (required), browser.
browser_collectA
Scroll a list/table and accumulate visible rows with text-based deduplication. Bounded and interruptible; never claims full server-side completeness. Leaves scroll position changed.
Inputs: tabId (required), ref, browser, frameId, +5 more.
browser_dragC
Drag between exact viewport coordinates. DOM mode dispatches pointer and drag events.
Inputs: to (required), from (required), tabId (required), expect, +3 more.
browser_eventsA
Read recent human-takeover events (last ten minutes, up to 100). No page contents are recorded.
Inputs: no named parameters.
browser_fillB
Replace a text field or contenteditable value and dispatch input/change events.
Inputs: text (required), tabId (required), ref, expect, +6 more.
browser_focusC
Activate a tab and focus its window.
Inputs: tabId (required), browser.
browser_forwardC
Go forward in a tab's history.
Inputs: tabId (required), browser.
browser_framesB
List frame ids and URLs for use in page tools.
Inputs: tabId (required), browser.
browser_hoverC
Dispatch pointer and mouse hover events on an element. Does not move the physical cursor.
Inputs: tabId (required), ref, browser, frameId, +4 more.
browser_listA
List connected Chrome and Firefox profiles. The local bridge starts automatically.
Inputs: no named parameters.
browser_markA
Mark a tab as a deliverable or handoff without changing focus or closing it.
Inputs: mark (required), tabId (required), browser.
browser_moveB
Move the visible virtual cursor to viewport CSS coordinates. Does not move your physical mouse.
Inputs: x (required), y (required), tabId (required), browser, +2 more.
browser_observeB
Capture semantic state, frame mapping and a locally masked screenshot with a DOM consistency flag. Not an atomic render guarantee; animated or changing pages may be inconsistent.
Inputs: tabId (required), browser, maxChars.
browser_openB
Open a URL in a named group in an existing window. Does not select the new tab by default.
Inputs: url (required), active, browser, sessionName.
browser_pasteB
Paste text, Markdown source or HTML into the target or focused editor. Does not use the system clipboard.
Inputs: text (required), tabId (required), ref, expect, +7 more.
browser_pressA
Press a key or chord such as ctrl+a, Return or shift+Left. Uses DOM editing in both browsers to preserve background operation. Trusted keyboard input is unsupported.
Inputs: key (required), tabId (required), alt, ref, +10 more.
browser_reloadB
Reload a tab and wait for document load.
Inputs: tabId (required), browser.
browser_resetA
Reset this MCP client's JavaScript runtime and variables. Does not close tabs. In-progress browser actions may still finish.
Inputs: no named parameters.
browser_runB
Run JavaScript in a persistent local Node runtime with cua browser methods and nodeRepl output helpers. Top-level await and variables persist. Full local OS permissions; not a security sandbox. Read browser_api first.
Inputs: code (required), timeoutMs.
browser_screenshotA
Capture the viewport as PNG. Temporarily selects the tab and restores the previous selection without focusing the window.
Inputs: tabId (required), browser.
browser_scrollC
Scroll the page or an element by CSS pixels.
Inputs: tabId (required), x, y, ref, +9 more.
browser_secondaryC
Invoke an action listed in the element's snapshot actions field.
Inputs: tabId (required), action (required), ref, expect, +5 more.
browser_selectB
Select options by their values and dispatch input/change events.
Inputs: tabId (required), values (required), ref, expect, +5 more.
browser_select_textC
Select one occurrence in an editable element. Use prefix/suffix to disambiguate.
Inputs: text (required), tabId (required), ref, prefix, +7 more.
browser_snapshotA
Read rendered document text (including off-screen content), viewport flags and scroll regions with target refs, positions and available directions. Includes open shadow roots. Refs expire on navigation.
Inputs: tabId (required), browser, frameId, maxChars, +1 more.
browser_tabsB
List tabs in the connected browser without per-site approval.
Inputs: browser.
browser_typeC
Insert text at the cursor in a text field or contenteditable.
Inputs: text (required), tabId (required), ref, expect, +6 more.
browser_waitB
Wait until an element is visible, or until page text contains a string.
Inputs: tabId (required), ref, text, browser, +5 more.
browser_windowsB
List browser windows, focus state and automation session names in each window.
Inputs: browser.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 36 tools
Many tools have clear distinct roles (click, hover, drag, back, forward), but several clusters overlap heavily: browser_open vs browser_navigate, browser_snapshot vs browser_observe vs browser_accessibility vs browser_screenshot, and browser_fill vs browser_type vs browser_paste vs browser_select_text. Descriptions do give hints (e.g. DOM vs trusted input, semantic vs raw a11y), so an agent can usually pick correctly, but the boundaries require careful reading rather than being self-evident.
Everything uses a uniform browser_ snake_case prefix, which is strong and predictable. Minor inconsistency: most names are verb-based (open, click, fill, scroll) but a subset are noun-only (browser_frames, browser_windows, browser_tabs, browser_capabilities, browser_api, browser_events, browser_snapshot).
36 tools is heavy for a browser-control surface and exceeds the 15-tool comfort band. While a few (snapshot, click, fill, navigate) clearly earn their place, the observation group, input group, and runtime group each contain several tools whose value could be folded together.
Coverage of navigation, tab lifecycle, observation, and element interaction is broad, but notable gaps remain: no dialog/alert handling (accept/dismiss), no file upload, no cookie/storage management, and no network interception. Agents will hit dead ends on common modal or upload flows despite the large surface.
Maintenance
Related MCP Connectors
Control a real browser from AI agents: navigate, click, type, screenshot, read the page.
Let AI agents use any website you're logged in to. Sessions stay encrypted on your machine.
Give AI agents a real cloud Chrome: open sessions, navigate, read pages, click, type and screenshot.
Let AI agents use your real, signed-in Chrome: tabs, clicks, forms, screenshots and video.
Related MCP Servers
- AlicenseAqualityDmaintenanceEnables AI agents to control the user's Chrome or Firefox browser, leveraging existing sessions for tasks requiring authentication and user handoff.1847 npm23MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to directly operate a user's local Chrome browser with full login state and cookies, supporting 23 tools such as tab management, clicking, typing, screenshots, file upload, and network inspection through natural language.MIT
- 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 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