Preview workflows for agents
Agents can use MCP to prepare a preview in a helper subshell.
Before you start
An agent can use MCP to start a helper on another enrolled node owned by the
same account. Complete Preview prerequisites and setup before
asking an agent to launch one. The example below assumes you've completed
Linux virtual displays. A Mac configured through
macOS virtual displays can use betterdisplay instead; MCP
can check its requirements but can't enable its helper or grant macOS permissions.
Subshell tokens can discover only enrolled nodes owned by the same account. Shared nodes and the server's built-in node aren't available through these tools, and the tools don't grant access to another user's shared subshell.
Launch and inspect a helper
-
Call
list_nodesto choose an online node withcanLaunch: true, virtual displays enabled, and an installed, working terminal harness. Callget_nodewith its ID to check the default display provider, or includeproviderto check another enabled choice. ConfirmvirtualDisplay.enabledis true and its status isready. -
Call
create_subshellwith the node ID and a display:{ "harness": "terminal", "node": "NODE_ID", "name": "Website check", "screen": { "width": 1280, "height": 800, "provider": "xvfb-x11vnc" } } -
Use
exec_in_terminalwith the returned subshell ID to start your development server and browser. Programs started there inheritDISPLAYandXAUTHORITY. Keep long-running programs in the background so the command can finish. For example, if Chromium is installed and your site is already serving port 3000 on that node:{ "subshell_id": "SUBSHELL_ID", "command": "chromium http://127.0.0.1:3000 > browser.log 2>&1 &" } -
Call
list_subshell_viewswithsubshell_idto discover its views. In the dashboard, select the helper's Web previews & screens action and open its app or virtual display.open_subshell_viewcan create a private connection path for a client, but it doesn't open a dashboard tab or return a screenshot. -
Collect the results, then call
delete_subshellto remove the temporary helper and its history. Stop anywatch_subshell_browserinterest withon: falsewhen you finish watching.
See the MCP tool reference for arguments and readiness fields, including harness health and SSH settings.
Edit on GitHubLast updated on
