Use Browser Tools with OpenClaw over MCP.
browser_open, browser_connect, browser_exec, browser_snapshot, browser_status, browser_close). Compact accessibility snapshots and a smaller tool surface usually use fewer tokens than a large native browser tool set.user profile path for driving signed-in tabs in your personal browser.npx (OpenClaw itself needs a newer Node; see OpenClaw install)1npx playwright install chromium
1npx playwright install --with-deps chromium
--headed needs a graphical display on that same host — it does not open a window on your laptop when the Gateway runs remotely.12openclaw mcp add libretto --command npx --arg -y --arg libretto-browser-tools openclaw mcp doctor libretto --probe
mcp.servers in ~/.openclaw/openclaw.json and proves it starts and exposes the six tools. You can also add the server in the Control UI under MCP settings (/settings/mcp).--arg flags for a visible browser or domain policy:1234567openclaw mcp add libretto \ --command npx \ --arg -y \ --arg libretto-browser-tools \ --arg --headed \ --arg --allowed-domain \ --arg example.com
openclaw mcp reload only affects the current CLI process).browser tool alongside Browser Tools:123456789{ plugins: { entries: { browser: { enabled: false, }, }, }, }
user / Chrome-extension attach paths.~/.libretto/browser-tools/profiles/ on the Gateway host.--headed, ask the agent to open a browser session for the site, complete login in the window yourself, then ask it to close the session. Later headless runs reuse the cookies. Profile changes save only on a clean close; do not share profile directories across untrusted users.123456789101112{ agents: { defaults: { model: "openai/gpt-5.4-mini", models: { "openai/gpt-5.4-mini": { agentRuntime: { id: "openclaw" }, }, }, }, }, }
browser_exec runs Playwright and JavaScript in the MCP process — not inside a browser sandbox. Treat the Gateway host as the trust boundary: domain allow/block flags limit http(s) requests in the managed browser context, but they do not confine browser_exec itself.--provider to use a cloud browser instead of local Chromium:1234567openclaw mcp add libretto \ --command npx \ --arg -y \ --arg libretto-browser-tools \ --arg --provider \ --arg kernel \ --env KERNEL_API_KEY=$KERNEL_API_KEY
--env on mcp add, or the Gateway process env). Supported names: local, kernel, browserbase, browser-use, steel, libretto-cloud.| Symptom | What to try |
| Server fails to start / Chromium missing | For --provider local, run npx playwright install chromium (add --with-deps on Linux). |
| Missing cloud API key | Pass --env PROVIDER_API_KEY=… on mcp add, or set it on the Gateway host. |
| Headed browser errors with no display | Drop --headed, or run the Gateway where a display is available. |
| Native browser tools still win | Set plugins.entries.browser.enabled to false, then restart the Gateway. |
| MCP tools missing on OpenAI models | Pin agentRuntime.id: "openclaw" on that model (see above). |
| Server saved but agent cannot see tools | Run openclaw mcp doctor libretto --probe, then restart the Gateway (not only mcp reload). |
| Browser sessions stop working after idle | One-shot agent runs tear down MCP children when the turn ends; open a fresh session next turn. |
| Login state missing after a crash | Profiles save on graceful close only; sign in again with --headed. |