Close Browser
close_browserCloses the browser window while preserving login sessions for future automated access to authenticated web content.
Instructions
Closes the browser window. Login sessions are saved and will be reused next time.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/browser.ts:100-105 (handler)The core logic function that actually closes the browser context.
export async function closeBrowser(): Promise<void> { if (context) { await context.close(); context = null; } } - src/tools.ts:197-209 (registration)Registration of the close_browser tool in the MCP server.
// ── close_browser ───────────────────────────────────────────────── server.registerTool( "close_browser", { title: "Close Browser", description: "Closes the browser window. Login sessions are saved and will be reused next time.", }, async () => { await closeBrowser(); return textResult({ message: "Browser closed. Sessions are saved for next time.", });