Skip to content

end_browser

Kelly Ferrone edited this page Sep 16, 2026 · 6 revisions

end_browser

Quit the browser, keeping the session and its context.

MCP tool end_browser
HTTP DELETE /browser

Quit this session's browser and free its Grid slot.

Call it when finished, and on failure paths too: browsers are scarce, and an abandoned one holds its slot until the Grid reaps it. The session survives, so a later open_session() comes back to the same page. Files the browser had and you did not keep go with it.

Parameters

This action takes no parameters.

Every call names its session: an X-Session-Key header, or ?session=<name>. Sending both is refused. See Sessions.

Returns

Field Type Notes
success boolean
session string

Errors

Status Means
400 The request cannot succeed as sent — no session named, two names given, or a setting that was rejected.
401 Missing or wrong bearer token.
503 The Grid could not serve this — unreachable, or no free slot for a new browser. Worth retrying after a wait.

Over MCP the same failures arrive as a tool error.

Example

MCP

end_browser()

HTTP

curl -X DELETE $SELENIUM_FLOW/browser \
  -H "Authorization: Bearer $TOKEN" \
  -H "X-Session-Key: $SESSION"

← All actions · Installing · Deployment

Clone this wiki locally