Browser Navigator MCP
Browser Navigator MCP
A Model Context Protocol server that gives AI assistants full control over the Brave browser (and other Chromium browsers) through the Chrome DevTools Protocol (CDP).
It attaches to your existing Brave instance ā or launches a fresh one ā and drives the real browser: tabs, windows, clicks, typing, screenshots, PDFs, sessions, and even HTML5 video playback.
Built so that an LLM can operate complex, dynamic UIs (dialogs, modals, dropdowns, token chips, custom widgets) without needing to reverse-engineer the DOM by hand.
Highlights
š§ Full browser control ā navigate, back/forward, click, type, scroll, hover, keyboard input
š Adaptive DOM tools ā
list_elements,inspect_dom,focus_element,press_keydiscover how a UI is built and interact with it (see Working with complex UIs)šŖ Window & tab management ā list, open, switch, and close windows and tabs
š CAPTCHA detection ā detects reCAPTCHA, hCaptcha, Cloudflare Turnstile & challenges, pauses automation, and waits for a human to solve it
šŖ Session persistence ā save/load cookies to keep logins alive between runs
š„ Video control ā play/pause/seek/volume/fullscreen on any HTML5 player
š Social search ā one-tool searches across Google, X, Instagram, Facebook, LinkedIn, TikTok, YouTube
š Export ā full-page screenshots and PDF archiving
š§ Arbitrary JS ā
execute_jsfor anything else (requires an explicitconfirm=true)š„ Health check ā server + browser connection state, open window/tab counts
Requirements
Node.js 20+
Brave browser (or any Chromium browser; the server auto-launches Brave from standard install paths)
No Playwright browser download needed ā the server drives the real browser over CDP
Installation
git clone https://github.com/ahmadhass0un/brave-browser-mcp.git
cd brave-browser-mcp
npm installQuick Start
1. Launch Brave with the debug port
./launch-brave.shThis starts Brave with --remote-debugging-port=9222. It never kills an existing Brave instance ā if the port is already in use it leaves it alone.
Alternatively, start Brave manually:
brave --remote-debugging-port=9222. If Brave is already running without a debug port, the MCP asks you to close it and retry ā it will not kill your running browser for you.
2. Run the server
node index.jsThe server speaks MCP over stdio. connect_brave attaches to the running Brave instance automatically.
3. Register it as an MCP server
For opencode, add to opencode.json:
{
"mcp": {
"browser-navigator": {
"type": "local",
"command": ["node", "/absolute/path/to/brave-browser-mcp/index.js"],
"enabled": true
}
}
}For Claude Desktop, add to claude_desktop_config.json:
{
"mcpServers": {
"browser-navigator": {
"command": "node",
"args": ["/absolute/path/to/brave-browser-mcp/index.js"]
}
}
}4. Start automating
connect_brave
navigate to https://example.com
list_elements on the page
click "Learn more"Tools
All 27 tools:
Tool | Description |
| Connect to Brave; auto-launches only if nothing is running |
| Disconnect from the browser (windows/tabs stay open) |
| Go to a URL; auto-detects CAPTCHAs and waits up to 120s for solving |
| Back / forward; fast on bfcache pages |
| Click by CSS selector or visible text; double-click & mouse button options |
| Type text; optional per-keystroke delay and Enter |
| Focus an element (needed for custom widgets like tag/chip inputs) |
| Send keys: Escape, Tab, Backspace, Arrow keys, combos, sequences |
| Scroll up/down/left/right (pixel amount) |
| Hover to reveal menus and tooltips |
| URL, title, load status, CAPTCHA presence |
| Extract visible text or raw HTML (10k char cap) |
| List interactive elements with reusable CSS selectors |
| Inspect an element's structure, attributes, and children |
| PNG of the page or an element (saved under |
| Save the page as a PDF (saved under |
| Run arbitrary JS in the page (requires |
| Wait until an element appears in the DOM |
| Wait for full page load |
| List / open / switch / close tabs |
| List / switch / close windows |
| Check CAPTCHA presence & solved status |
| Poll until the user solves a CAPTCHA |
| Play/pause/seek/volume/fullscreen on HTML5 video |
| Search Google, X, Instagram, Facebook, LinkedIn, TikTok, YouTube |
| Save/load session cookies (stored under |
| Server + connection status, open window/tab counts |
Working with complex UIs
Dynamic pages ā dialogs, modals, dropdowns, token chips, custom widgets ā are hard to automate when you don't know the DOM. Instead of guessing selectors, use the discovery tools:
list_elementsā see what is actually clickable or typeable, with a reusable CSS selector for each element. Filter by kind (button,link,input, ā¦), by text (contains), or scope to an open container.inspect_domā understand how a widget is built: tag, attributes, classes, a CSS path, and child elements. Match by selector or exact visible text.focus_elementā many widgets (e.g. GitHub tag/chip inputs) only accept keyboard input once focused. Focus the element, then:press_keyā send keyboard input:Backspace/Deleteto remove a token chip,ArrowDown+Enterto pick a menu item,Escapeto dismiss a dialog,Tabto move between fields.
The scope parameter on click, type, focus_element, list_elements, and inspect_dom limits the search to a container ā e.g. "[role=dialog]" for the currently open dialog ā so you interact with the right element even when the page has many matches.
For example, removing a tag from GitHub's "Edit repository metadata" dialog:
inspect_dom(selector="automation", by_text=true, scope="[role=dialog]")
focus_element(selector="automation", by_text=true, scope="[role=dialog]")
press_key(key="Backspace")CAPTCHA Handling
CAPTCHAs are detected automatically after navigate / navigate_history and reported in get_page_info. When an unsolved CAPTCHA is found, automation pauses and asks the user to solve it in the browser ā this tool cannot (and will not) bypass them.
Types detected: reCAPTCHA, hCaptcha, Cloudflare Turnstile, Cloudflare Challenge.
Security Notes
execute_jsrequiresconfirm=trueand is capped at 5000 chars / 50KB output.Screenshot & cookie paths are sanitized against path traversal.
Cookies are stored with
0o600permissions, directories with0o700.The server never kills a browser it did not launch.
Signal handlers clean up CDP sessions on exit.
See AUDIT.md for the full security & code-quality audit.
Testing
The suite drives the server over the real MCP stdio protocol (requires Brave running on port 9222):
node test.cjs63 assertions covering navigation, CAPTCHA detection, tabs, windows, screenshots, PDF export, cookies, video, security hardening, and the adaptive DOM tools.
License
PolyForm Noncommercial 1.0.0 ā see LICENSE.
Free to use for any noncommercial purpose. For commercial use, contact the author first.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Automate cloud browsers to navigate websites, interact with elements, and extract structured data.ā¦
AI-powered browser automation ā navigate, click, fill forms, and extract data from any website.
Provides cloud browser automation capabilities using Stagehand and Browserbase, enabling LLMs to iā¦
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/ahmadhass0un/brave-browser-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server