Files
python-sdk/pkg/hanzo-tools-browser
zeekay 32ce9a8595 Answer with the connected browser's error, never a Playwright stand-in
In auto mode any extension error fell through to headless Playwright, so
a slow page in the user's own browser came back as Playwright's missing
executable. A connected browser's failure is now the answer; Playwright
stands in only when no browser is on the router. hanzo-tools-browser
0.5.16.
2026-09-30 21:49:37 -07:00
..

hanzo-tools-browser

Browser tools for Hanzo MCP: browser drives the user's own browser through the Hanzo extension (headless Playwright when none is connected), playwright is the same tool pinned to Playwright, and cdp sends a raw DevTools method.

Installation

pip install hanzo-tools-browser
pip install 'hanzo-tools-browser[playwright]' && playwright install chromium   # headless fallback

The loop

browser(action="navigate", url="https://example.com")
browser(action="snapshot", interactive=True)       # - button "Sign in" [ref=e2]
browser(action="click", selector="@e2")
browser(action="fill", selector="@e3", text="[email protected]")
browser(action="press", key="Enter")
browser(action="read", outline=True)               # the page as markdown
browser(action="screenshot", annotate=True)        # labels [N] = @eN, with a legend

selector takes a ref from the last snapshot or a CSS selector. A stale ref, or a click on an element covered by a banner or modal, is refused with what to do next.

Progressive surface

The schema carries the core actions: navigate, snapshot, click, fill, type, press, read, screenshot, evaluate, wait, tabs, help. browser(action="help") lists the rest by topic, and their parameters go in args:

browser(action="select", selector="@e4", args={"value": "Weekly"})

License

MIT