ensure_browser
Reuse an existing browser or launch one when none is reachable, optionally opening a URL in a new tab. Prevents duplicate launches on the same profile.
Instructions
Reuse a reachable browser or launch one (with the MCP_BROWSER_USER_DATA_DIR profile when set), optionally opening url in a new tab. It never launches twice on one profile (except from WSL).
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"browserFamily": "<browserFamily>"
},
"name": "ensure_browser"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | No | Open this in a new tab. | |
| port | No | Debugging port (default: the configured endpoint's, usually 9222). | |
| waitMs | No | ms to wait for the endpoint after launch (default 5000). | |
| address | No | Chromium/Edge bind address; loopback unless MCP_BROWSER_ALLOW_REMOTE_ENDPOINTS=1. | |
| createTab | No | Default: true when url is given. | |
| skipDoctor | No | Return right after spawning, without waiting or a doctor report. | |
| userDataDir | No | Profile for a new launch (default MCP_BROWSER_USER_DATA_DIR). | |
| browserFamily | Yes | Required in auto mode. | |
| launchIfMissing | No | Launch when none is reachable (default true). |