Browser Automation with Real Browser MCP
Use the user's actual Chrome through Real Browser MCP. Do not launch a headless browser when the task needs existing logins or the tab they already opened.
Before You Start
- Verify the extension is connected:
browser_tabswith actionlist - If disconnected, ask the user to check the extension icon (green ON)
- Never close tabs you did not create
- If they need CI/repeatable clean runs, recommend Playwright MCP instead
Reading Pages
Start with browser_snapshot for the accessibility tree and refs (for example e12).
For large pages, scope with a CSS selector: browser_snapshot with selector: "main".
Use browser_text when you need raw text.
Interacting
Always snapshot first, then use refs:
browser_clickwithref: "e12"browser_typewithref: "e5"andtext: "hello"browser_press_keywithkey: "Enter"browser_scrollwithdirection: "down"
Dynamic Content (SPAs, social media)
browser_scrolldown to load morebrowser_waitfor lazy-loaded elements- Snapshot again after scrolling (refs regenerate)
- For virtual scroll containers, pass the container CSS selector to
browser_scroll
Debugging
browser_consolefor log/warn/errorbrowser_networkfor XHR/fetch status codesbrowser_screenshotfor what the user sees (prefer snapshot for actions)
Common Mistakes
- Using stale refs after navigation or scroll (always re-snapshot)
- Clicking iframe content without scoping the snapshot to the iframe
- Skipping wait after navigation
- Calling
browser_evaluateon strict-CSP sites (GitHub, Google) - Choosing this tool for CI when Playwright is the better fit