Install
openclaw skills install browsermcpClawHub Security found sensitive or high-impact capabilities. Review the scan results before using.
Automate browser tasks using the BrowserMCP MCP server and Chrome extension. Use for navigating websites, filling forms, clicking elements, taking screenshots, and retrieving console logs using the user's existing browser profile with authenticated sessions and stealth capabilities.
openclaw skills install browsermcpThis skill enables MCP Clients to automate browser interactions through the BrowserMCP protocol. It leverages a local MCP server and a Chrome extension to control the user's actual browser session, allowing for authenticated actions and bypassing common bot detection.
Before using BrowserMCP automation:
[!IMPORTANT] The AI can only control tabs that are actively "Connected" via the Browser MCP extension. If you switch tabs, you must reconnect the new tab.
The standard browser automation process follows an iterative approach:
flowchart TD
A[Navigate to URL] --> B[Take Snapshot]
B --> C[Identify Elements]
C --> D[Interact: Click/Type/etc]
D --> E[Wait for Changes]
E --> B
E --> F[Verify: Screenshot/Logs]
| Step | Tool | Purpose | Key Consideration |
|---|---|---|---|
| 1 | navigate | Open the target URL | Ensure extension is connected first |
| 2 | snapshot | Capture ARIA tree to identify interactive elements | Refresh after any page changes |
| 3 | click / type | Interact with page elements | Use exact ref from snapshot |
| 4 | wait | Pause for dynamic content to load | Essential after navigation/clicks |
| 5 | screenshot | Visually verify results | Use when uncertain about state |
| 6 | get_console_logs | Debug JavaScript errors | Check when interactions fail |
| Tool | Use When | Parameters |
|---|---|---|
navigate | Opening a new page | url - full URL including protocol |
snapshot | Understanding page structure | None - returns ARIA accessibility tree |
click | Activating buttons/links | element (description), ref (exact ID from snapshot) |
type | Filling input fields | element, ref, text, submit (optional) |
hover | Triggering hover menus | element, ref |
select_option | Choosing from dropdowns | element, ref, values (array) |
press_key | Keyboard shortcuts | key - e.g., "Enter", "Escape", "ArrowDown" |
wait | Allowing page to load | time - seconds to wait |
screenshot | Visual verification | None - returns PNG image |
get_console_logs | Debugging errors | None - returns recent console output |
go_back / go_forward | Navigation history | None |
Navigation: Enter, Escape, Tab
Editing: Backspace, Delete
Arrows: ArrowUp, ArrowDown, ArrowLeft, ArrowRight
Modifiers: Control, Alt, Shift, Meta (combine via modifiers array)
Function: F1-F12
Other: Home, End, PageUp, PageDown, Space
// Step 1: Navigate to search engine
navigate(url="https://google.com")
// Step 2: Type search query (use snapshot to find the ref)
type(element="Google search box", ref="e12", text="BrowserMCP automation", submit=true)
// Alternative: Type then press Enter separately
type(element="Search box", ref="e12", text="BrowserMCP automation")
press_key(key="Enter")
// Step 1: Navigate to login page
navigate(url="https://example.com/login")
// Step 2: Get snapshot to identify form fields
snapshot()
// Step 3: Fill username field
type(element="Username or email field", ref="e5", text="user@example.com")
// Step 4: Fill password field
type(element="Password field", ref="e7", text="password123")
// Step 5: Click login button
click(element="Sign in button", ref="e9")
// Step 6: Wait for redirect
wait(time=2)
// Step 7: Verify successful login with screenshot
screenshot()
// Navigate to documentation
navigate(url="https://docs.browsermcp.io")
// Wait for page load
wait(time=1)
// Capture accessibility tree to understand structure
snapshot()
// Click on a documentation link
click(element="API Reference link", ref="e15")
// Wait for content to load
wait(time=1)
// Take screenshot for verification
screenshot()
// Check for any JavaScript errors
get_console_logs()
// Navigate to page with dynamic content
navigate(url="https://example.com/dashboard")
// Wait for initial load
wait(time=2)
// Take snapshot to see available elements
snapshot()
// Click element that triggers dynamic content
click(element="Load more button", ref="e22")
// Wait for new content to appear
wait(time=2)
// Refresh snapshot to see new elements
snapshot()
// Interact with newly loaded element
click(element="New item", ref="e45")
Good:
// Take snapshot first, then use exact refs
snapshot()
click(element="Submit button", ref="e12")
Bad:
// Guessing selectors without snapshot
click(element="button.submit") // May not work with dynamic DOM
Dynamic web applications often load content asynchronously. Always wait after:
click(element="Load data button", ref="e8")
wait(time=2) // Wait for data to load
snapshot() // Then get fresh page structure
Before any automation:
When interactions fail:
// Take screenshot to see current page state
screenshot()
// Check console for JavaScript errors
get_console_logs()
// Re-snapshot to see updated element refs
snapshot()
| File | Contents |
|---|---|
references/setup.md | Detailed installation and configuration for MCP server and Chrome extension |
references/tools.md | Complete tool reference with parameters and detailed examples |
references/best-practices.md | Advanced patterns, error handling, and troubleshooting techniques |
references/workflows.md | Common workflow patterns (forms, authentication, scraping, etc.) |
Error: "No connection to browser extension"
Solution:
Error: Element reference invalid or element not found
Solution:
snapshot() - the DOM may have changedref values from the updated snapshotwait() before snapshotError: Click/type action didn't work as expected
Solution:
screenshot() to see current page stateget_console_logs() for JavaScript errorsNote: BrowserMCP helps avoid basic bot detection by using the real browser profile. However:
| Feature | BrowserMCP | Playwright MCP |
|---|---|---|
| Browser | User's existing browser | New browser instance |
| Profile | Uses existing profile with cookies | Isolated profile |
| Authentication | Already logged in | Must log in each session |
| Bot Detection | Lower (real fingerprint) | Higher |
| Multi-tab | One tab at a time | Multiple tabs supported |
| Best For | Personal automation, testing logged-in flows | Testing, CI/CD, isolated sessions |