Attach to a running profile
browser_connectAttach automation to a running browser profile by passing its port and WebSocket endpoint, or start the profile with automation enabled. Ideal for profiles launched externally.
Instructions
Attach the automation client to a profile that is already running with automation enabled. Usually unnecessary — start_profile records the endpoint and the browser_* tools attach on demand. Use this when the profile was started outside this server, passing the port and wsEndpoint from that start call. Set start: true to have this tool start the profile itself.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| port | No | DevTools port from the start response. | |
| start | No | Start the profile first (automation enabled) instead of attaching to a running one. | |
| headless | No | Only meaningful together with `start`. | |
| profileId | Yes | Browser profile id, as passed to start_profile. | |
| wsEndpoint | No | wsEndpoint from the start response. A bare path or a full ws:// URL both work. |