Tools
The MCP surface is scripting-focused: ten tools. run_script is the
primary action path — a sandboxed QuickJS runtime with live page,
context, request, and browser bindings over the ferridriver core.
The rest are cheap observation and session-bootstrap primitives.
All tools accept an optional session parameter (default: "default").
Sessions have isolated cookies, storage, and network state.
Recommended workflow
navigate(orconnect) to bring up a session.snapshotto see the accessibility tree and pick refs / selectors.- Act via
run_script— one call executes many browser operations without LLM round-trips between them. snapshotagain to verify.
Navigation (3)
connect— attach to a running Chrome (debugger URL orauto_discover). Parameters:url?,auto_discover?,channel?(default"stable"),user_data_dir?.navigate— go to a URL; returns a fresh accessibility snapshot. Parameters:url(required),wait_until?(commit/load/domcontentloaded/networkidle/none; defaultcommit).page— manage pages / tabs. Parameters:action(back/forward/reload/new/close/select/list/close_browser),url?,page_index?.
Observation (4)
snapshot— primary grounding tool. Returns the page as an accessibility tree with[ref=eN]handles, roles, and visible text. Always your first action before deciding on selectors. Parameters:depth?(unlimited if omitted),track?(incremental snapshot key — shows only what changed since the last snapshot with the same key).screenshot— PNG / JPEG / WebP base64 image. Use sparingly — much heavier thansnapshot. Reach for it when the a11y tree is ambiguous (icons, canvas, complex layout). Parameters:format?(defaultpng),quality?(0–100 for jpeg / webp),full_page?,selector?.evaluate— run a single JavaScript expression in the page and return its JSON-serialized value. Quick reads only; userun_scriptfor multi-step logic.search_page— grep-like text search across the page (literal or regex) with surrounding context. Fast, token-cheap. Parameters:pattern,regex?,case_sensitive?,context_chars?(default 150),selector?,max_results?(default 25).
Diagnostics (1)
diagnostics— session telemetry. Parameters:type(console/network/trace_start/trace_stop),level?,limit?(default 50).
Scripting (1)
run_script— the action path. Execute JavaScript in a sandboxed QuickJS runtime against the current session.
run_script globals
ES module import './foo.js' resolves inside script_root with the
same sandbox rules. Bare specifiers (import 'lodash') are rejected —
no node_modules resolution.
run_script parameters
Pass either source (inline JavaScript) or path (relative path to a
.js / .mjs file under script_root) — not both.
run_script return
Always a structured JSON payload:
Scripts that throw surface as status: "error" in the payload — not as
MCP-level errors — so callers can inspect the failure without catching
protocol exceptions.
Introspection (1)
ferridriver_extensions— list extensions loaded at server startup. Discover available plugin tools and audit declared capabilities. Parameters:include_schema?(default false; when true, returns each tool's full JSONinputSchema).
Accessibility snapshots
snapshot returns an LLM-optimized tree. Refs are tied to that specific
snapshot — any navigate, page(select), or DOM-mutating run_script
invalidates them. Re-snapshot before acting.
When scripting, prefer Playwright-style locators (page.getByRole,
page.getByText, page.locator) — they survive re-snapshots and DOM
churn, unlike raw refs.