zen
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| ZEN_DEBUG | No | Verbose logs on stderr | 0 |
| ZEN_BINARY | No | Path to the Zen (or Firefox) executable | auto-detected |
| ZEN_GIF_DIR | No | Where GIF exports go | ~/Downloads |
| ZEN_PROFILE | No | Claude's profile directory | ~/.claude-for-zen/profile |
| ZEN_BIDI_URL | No | Connect to this BiDi endpoint and never launch Zen | |
| ZEN_HEADLESS | No | Launch Zen without a window | 0 |
| ZEN_BIDI_PORT | No | Remote debugging port | 9333 |
| ZEN_CONNECT_ONLY | No | Never launch Zen; connect to ws://127.0.0.1:$ZEN_BIDI_PORT/session | 0 |
| ZEN_KILL_ON_EXIT | No | Quit the launched Zen when the server exits (by default it keeps running, like Chrome does) | 0 |
| ZEN_HIDE_WEBDRIVER | No | Report navigator.webdriver === false to pages, as in a normal session | 1 |
| ZEN_SCREENSHOT_DIR | No | Where save_to_disk screenshots go | OS temp dir |
| ZEN_NAVIGATION_TIMEOUT_MS | No | How long navigate waits for a page to load | 30000 |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
Tools for controlling the Zen web browser (Firefox-based) on the user's computer, equivalent to Claude in Chrome.
Workflow:
Call tabs_context first. Each conversation should open its own tab with tabs_create (or navigate without a tabId) instead of reusing tabs, unless the user asks to work in an existing tab.
Look before acting: take a screenshot (computer action "screenshot") or use read_page / find to get element refs. Prefer clicking by ref; refs survive scrolling and work inside iframes.
Screenshot coordinates: every screenshot reports its WxH frame; pass coordinates in that frame.
Close tabs you opened with tabs_close when you are finished, unless the user wants them kept.
If a tool reports an open JavaScript dialog (alert/confirm/prompt), resolve it with handle_dialog before anything else.
If a tool says Zen must be restarted to turn on remote control, ask the user first; only after they agree call tabs_context with restartBrowser: true.
Never enter passwords, payment details or other secrets on the user's behalf, and confirm with the user before irreversible actions (sending, purchasing, deleting, submitting).
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| tabs_contextA | Get the tabs Claude is working with in Zen. Returns tab IDs, titles and URLs. CRITICAL: call this at least once before other browser tools so you know which tabs exist. Each new conversation should create its own tab (tabs_create) rather than reuse tabs, unless the user explicitly asks to use an existing tab. Pass all=true to list every open tab in the browser. |
| tabs_createA | Open a new tab for this conversation and return its tab ID. Tabs you create are yours to clean up: close each one with tabs_close when you no longer need it, unless the user wants it kept open. |
| tabs_closeA | Close a tab Claude opened. Use it to clean up tabs you are done with. Closing a tab Claude did not open requires force=true and should only be done when the user asks. |
| navigateA | Navigate a tab to a URL, or go "back"/"forward" in its history. If tabId is omitted for a URL, Claude's first tab is used (one is created if needed) and the tab list is appended to the result. A tab opened for you this way is yours to clean up with tabs_close. |
| computerA | Use a mouse and keyboard to interact with the page in a Zen tab, and take screenshots. If you don't have a valid tab ID, use tabs_context first.
|
| read_pageA | Get an accessibility-tree style outline of the page with element refs (ref_N) usable by computer, form_input, scroll_to and file_upload. Includes the contents of iframes. By default returns all elements (non-visible ones are marked hidden); filter='interactive' returns only visible buttons/links/inputs. Output is limited to max_chars (default 50000). |
| findA | Find elements by what they are or what they say (e.g. "search bar", "login button", "add to cart", "price"). Matches roles, labels, placeholders, text and attributes, including inside iframes. Returns up to 20 matches with refs usable by other tools. |
| get_page_textB | Extract the readable text of the page (prioritising the main article content) as plain text. Ideal for reading articles and text-heavy pages. |
| form_inputA | Set the value of a form element by ref (from read_page/find): text inputs and textareas (string), selects (option value or visible text), checkboxes/radios/switches (boolean), contenteditable editors (string). Fires the input/change events frameworks like React and Vue listen to. |
| file_uploadB | Set the files of an element (by ref) to local file paths, as if the user picked them. Use computer screenshot save_to_disk to upload a screenshot. |
| javascript_toolA | Execute JavaScript in the page's context (DOM, window, page variables). REPL semantics: top-level await works and the value of the last expression is returned — write the expression you want (e.g. |
| read_console_messagesA | Read console messages (console.log/warn/error, uncaught exceptions) from a tab, captured while connected. Messages from a previous site are dropped when the tab navigates to another origin. Always provide a pattern to filter out noise. |
| read_network_requestsA | Read HTTP requests (documents, XHR/fetch, scripts, images, …) made by a tab, including cross-origin ones, captured while connected. Requests from a previous site are dropped when the tab navigates to another origin. Sensitive query values are shown as REDACTED. |
| handle_dialogA | Accept or dismiss an open alert/confirm/prompt/beforeunload dialog in a tab. For prompt dialogs, text is entered before accepting. |
| resize_windowA | Resize the Zen window containing a tab (outer size in pixels), e.g. to test responsive layouts. |
| gif_creatorA | Record browser actions in a tab as an animated GIF. start_recording captures a frame after every action (clicks are marked); stop_recording stops; export writes the GIF to disk and returns its path; clear discards the recording. Capture extra screenshots before and after important actions for smoother playback. |
| browser_batchB | Run a short sequence of browser tool calls in order (e.g. click, type, key, screenshot) and return all their results. Stops at the first error. Every action needs an explicit tabId. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 17 tools
Most tools have clear, distinct purposes: interaction (computer, form_input, file_upload), reading (read_page, find, get_page_text), diagnostics (read_console_messages, read_network_requests), and tab lifecycle (tabs_context/create/close). The main overlap is between computer and browser_batch (both click/type/screenshot) and among the three page-reading tools, though descriptions explain the intended split. A missing scroll_to tool that read_page references adds a little confusion about where scrolling lives.
Conventions are mixed: verb_noun (read_page, get_page_text, resize_window, handle_dialog), noun_verb (form_input, file_upload), bare nouns/verbs (computer, find, navigate, gif_creator, browser_batch), and namespace prefixes (tabs_*). The tabs_ and read_ groupings are predictable, and names remain readable, but there is no single pattern across the set.
Seventeen tools is on the upper side but each maps to a real browser-automation need: tabs, navigation, reading, input, JS, console/network inspection, dialogs, GIF capture, and batching. Nothing looks redundant enough to cut, though a couple of tools (browser_batch, gif_creator) are conveniences rather than core capabilities.
Coverage of the browser-automation domain is strong: navigation, page inspection, element location, form/file input, raw JS, console and network capture, dialogs, resize, tab lifecycle, and recording. Notable gaps are an explicit wait-for-condition/scroll tool (read_page mentions scroll_to, which is absent) and no first-class storage/cookie inspection, though javascript_tool can work around both.