Connect
vitro starts itself when an agent first calls it.
claude mcp add --scope user vitro -- vitro mcp bridge
The client launches the app over stdio, and the bridge relays to the
same /mcp as the URL form below. The app owns the browsers,
so they stay open when the agent closes.
Install the app first if you have not.
If your client cannot launch a command,
vitro mcp install --url prints the streamable-HTTP
registration. The app must already be running, and its port changes on
each launch. Do not register it with the SSE transport.
Sessions
- create_session
- Isolated context. Returns a lease, once.
- list_sessions
- Yours unless you ask for all. Never a lease.
- session_info
- Owner and page ids.
- reattach
- Recover sessions and leases after a restart.
- resume_session
- Bring a stalled session back: same id, new lease, pages and cookies restored.
- close_session
- Close it, free the slot.
- status
- Live sessions, quota, browser.
Pages
- new_page
- Open and wait.
- navigate
- Go somewhere, wait.
- list_pages
- Ids, URLs, titles.
- get_page_state
- URL, title, real HTTP status, viewport. Cheap.
- wait_for
- Until text appears, goes, a predicate holds, or a person hands back.
- close_page
- Close it, free the slot.
Acting on a page
- find
- Elements by role and name, with the ancestry that tells two "Erlang" links apart. Start here.
- snapshot
- Accessibility tree, one line per element by default.
root_uidscopes it to a subtree; as a JSON node list (format: "nodes") a whole page runs to 150k characters. - click · hover
- Refused, with a reason, if covered, disabled or still moving.
- fill · type_text
- Replace a value, or type it key by key.
- select_option
- By value, label or text.
- press_key
- No element involved.
- scroll
- A real wheel event: by delta, to top or bottom, or to a uid.
- drag
- One element onto another.
- upload_file
- Onto a file input.
- handle_dialog
- Alert, confirm, prompt, beforeunload.
- evaluate
- JavaScript in the page, value back.
- request_handoff
- Hand the page to a person for a login, a 2FA code, a captcha or a payment. Wait with
wait_for(handoff:).
What happened
- get_events
- Browser events and the agent's own calls, one timeline.
- get_errors
- Exceptions, failed requests, the browser's audit issues.
- get_console_logs
- Filterable by level.
- list_network_requests
- By status class, type or URL.
- get_network_request
- In full, body included.
- expect
- Several assertions in one call, with a verdict for each.
- compare
- Render light and dark, and name the elements that did not follow. Compares styles.
- get_html · screenshot
- Markup, or a picture: inline up to 2 MB, by reference past it.
Conditions and performance
- emulate · resize
- Device, viewport, UA, scheme, touch.
- set_network_conditions
- Throttle, add latency, go offline.
- get_storage_state
- Cookies and storage.
- set_storage_state
- Put them back. Logins are reusable.
- get_performance_metrics
- Timings and Web Vitals. No queue.
- run_audit · get_audit
- Real Lighthouse in its own browser, from a small pool. Returns a ticket.
More
- rename_session
- Name a session, or rename it: "checkout flow".
- export_session
- Export a session's record for a person to open or attach: an HTML replay that plays in any browser (screens, tool calls, console, network, notes, Web Vitals), or a Markdown report of the steps with screenshots, for a bug report or a pull request.
vitro-tunnel
Hosted browsers run on our hardware and localhost:3000 runs
on yours. One static binary connects them. It also bridges MCP for clients
that cannot reach the fleet directly.