Skip to main content
Runtime mode is the technical default for web mcp run. It is model-free and exposes low-level browser tools:
Use runtime mode when the parent agent or application should own each browser step. MCP tool schemas do not expose custom proxy creation options. Create proxied browsers through SDK, CLI browser creation, REST, or quick actions before MCP reuse when proxy routing is required.

Run

Generated configs should use CLI args for visible behavior. Runtime mode needs no --surface flag because it is the default:

Tool loop

Active-page contract

execute_playwright_code receives a top-level async browser-code body. The page variable is already in scope and points at the active page.
Follow these rules:
  • Use the provided page.
  • Do not redeclare page.
  • Do not create new pages for ordinary single-page tasks.
  • Omit pageId unless targeting a known non-active page.
  • Return JSON-compatible evidence.
  • Prefer getByRole, getByLabel, and getByText for interaction.

Browser lifecycle

manage_browsers handles create, list, get, status, stop, resume, close, Debug UI URL, CDP URL, and CAPTCHA status actions.
Debug UI and CDP URLs are signed bearer capabilities. Request them only for live review or external framework attachment.

Exact control example

For a complete direct MCP client example, see examples/mcp/runtime-direct-mcp-client.ts.