grok-browser-mcp
Attaches to a running Brave browser via Chrome DevTools Protocol, providing tools to list and focus tabs, snapshot clickable elements, click, type, press keys, navigate, scroll, wait, evaluate JavaScript, and take screenshots in the user's existing browser session.
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., "@grok-browser-mcp Take a screenshot of the current tab"
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.
grok-browser-mcp
MCP server that attaches to your already-running Brave over Chrome DevTools Protocol (CDP). Grok CLI can then snapshot, click, type, and screenshot whatever tab you have open — same window, same logins.
It does not launch a fresh empty browser.
Requirements
Related MCP server: Browser Navigator MCP
Install
git clone https://github.com/v76ADrR/grok-browser-mcp.git
cd grok-browser-mcp
npm installEnable CDP on Brave (once)
The Arch/CachyOS Brave wrapper reads ~/.config/brave-flags.conf. Put:
--remote-debugging-port=9222
--remote-debugging-address=127.0.0.1
--remote-allow-origins=*Restart Brave. Tabs usually restore. Confirm:
curl -s http://127.0.0.1:9222/json/versionOr call the MCP tool browser_prepare (this restarts Brave).
CDP is localhost only. Any process on this machine can control the browser while those flags are set. Remove them and restart Brave when you are done.
Grok CLI config
~/.grok/config.toml:
[mcp_servers.browser]
command = "/usr/bin/node"
args = ["/ABS/PATH/TO/grok-browser-mcp/src/server.mjs"]
enabled = true
startup_timeout_sec = 20
tool_timeout_sec = 180Reload: /mcps then r, or a new Grok session.
Tools
Tool | Purpose |
| Brave PIDs + CDP health |
| Write flags; restart Brave if CDP is down |
| List / focus tabs |
| Clickable elements + refs |
| Filter snapshot by text |
| Click by ref / selector / text |
| Keyboard |
| JS in the page |
| JPEG of the current tab |
| Navigation |
Never call Playwright browser.close() on this connection — it would quit the user's Brave.
License
MIT
Available Tools
14 toolsbrowser_clickB
Click an element. Prefer ref from the latest browser_snapshot / browser_find. Falls back to CSS selector or visible text.
Inputs: ref, text, exact, selector.
browser_desktop_screenshotA
Screenshot the GNOME desktop (Brave window as the user sees it), even if CDP is down. Uses org.gnome.Shell.Screenshot.
Inputs: no named parameters.
browser_evaluateC
Run JavaScript in the current tab (page.evaluate). Return value is JSON-stringified. Use for iCloud DOM inspection.
Inputs: expression (required).
browser_findA
Find visible clickable elements whose text contains query. Returns refs for browser_click.
Inputs: query (required).
browser_prepareA
Write Brave CDP flags and optionally restart Brave so Playwright can attach. Restarts the user's Brave (tabs usually restore). Use restart=true when CDP is down.
Inputs: restart.
browser_pressB
Press a key (Playwright key name), e.g. Enter, Tab, Escape, Control+a, ArrowDown.
Inputs: key (required).
browser_screenshotB
JPEG screenshot of the current tab. Returns an image plus a saved file path.
Inputs: fullPage.
browser_scrollC
Scroll the current tab with a mouse wheel delta.
Inputs: dx, dy.
browser_snapshotA
Accessibility / clickable-element snapshot of the current tab, with refs (e1, e2, …) for browser_click. Filter with query for large lists (e.g. iCloud contacts).
Inputs: limit, query, offset.
browser_statusA
Check whether Brave is running and whether Chrome DevTools Protocol is reachable on 127.0.0.1:9222.
Inputs: no named parameters.
browser_tabsB
List open Brave tabs (via CDP). Optionally focus one by index, URL substring, or title substring.
Inputs: index, urlIncludes, titleIncludes.
browser_typeC
Type into a field (ref/selector) or the focused element.
Inputs: text (required), ref, clear, selector.
browser_waitC
Wait for a number of milliseconds, or until text/selector appears.
Inputs: ms, text, selector.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 14 tools
Most tools have clearly distinct actions and targets, but browser_snapshot and browser_find overlap because both return clickable-element refs, and browser_status/browser_prepare both concern Brave/CDP availability. The descriptions help mitigate this, so boundaries are mostly clear.
All tools use the browser_ prefix followed by snake_case verbs or nouns, giving a highly predictable and readable pattern. browser_desktop_screenshot is slightly longer but still consistent with the schema.
With 14 tools, the set sits comfortably in the expected range for a browser automation server. Each tool maps to a recognizable action or control, and the count does not feel bloated or thin.
The surface covers navigation, input, scrolling, waiting, JavaScript evaluation, snapshots, screenshots, tab listing/focusing, and CDP setup. Minor gaps exist around explicit new/close tab, back/forward/reload, and file upload or select-option handling, but browser_evaluate and browser_navigate can often work around them.
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.
Browz hosted MCP (free public beta): let an AI app drive your own Browz browser profiles from anywhere. Connect https://mcp.gobrowz.com/mcp and sign in with your Browz account (OAuth) or an agent token. Each call is relayed to the Browz app on your computer, which must be online with Remote control on and have a hardware security chip (Mac Secure Enclave or TPM 2.0). 17 tools: profiles, tabs, navigate, snapshot, act, wait, screenshot. Cookies, downloads and stored sign-ins stay on your computer.
Cloud browser, web extraction, screenshots, and remote CDP tools for AI agents.
Related MCP Servers
- AlicenseAqualityDmaintenanceConnects to a running Chrome instance via CDP to expose browser control as MCP tools, preserving login state, cookies, and extensions for automation.1914 npmMIT
- FlicenseCqualityBmaintenanceControls the Brave browser via CDP for web automation, OSINT, and social media crawling, including navigation, CAPTCHA detection, session persistence, and video control.411-
- AlicenseNot gradedqualityBmaintenanceEnables MCP clients to drive a live Chrome or Brave browser over stdio, with tools for navigation, clicking, typing, screenshots, and executing automation goals.4MIT
- AlicenseAqualityCmaintenanceEnables Codex to control a local Brave or Chrome browser via CDP, observing pages and performing actions such as clicking, typing, selecting, scrolling, or waiting through validated action IDs without requiring a model API key.7MIT