MCPVault

browser_close_tab

MCP tool from MCPBrowser by cherchyk

Closes the browser tab for the given URL's hostname. Removes the page from the tab pool and forces a fresh session on the next visit to that hostname. Useful for clearing authentication state, managing memory, or starting fresh with a domain.

How to use it

browser_close_tab is exposed by the MCPBrowser MCP server. Add the server to your MCP client (Claude Desktop, Cursor, Windsurf and others), and the browser_close_tab tool becomes available to the model automatically. See the full listing for setup details and every tool this server provides.

Install MCPBrowser

$claude mcp add mcpbrowser --scope user -- npx -y mcpbrowser@latest
FULL MCPBROWSER LISTING

Other tools in MCPBrowser (24)

amount

(number, optional, default: 500) - Pixels to scroll in the specified direction (~half a viewport)

browser_click_element

Clicks on any clickable element (buttons, links, divs with onclick handlers, etc.). Can target by CSS selector or visible text content. Automatically scrolls element into view and waits for page stability after clicking.

browser_execute_javascript

Executes a JavaScript snippet in the active page context and returns the result with metadata (execution time, truncation flag, URL-change detection). Use for structured data extraction (e.g., inbox rows) or JS-driven UI actions that are unreliable via protocol clicks.

browser_fetch_webpage

Fetches web pages using your Chrome/Edge/Brave browser. Handles authentication, CAPTCHA, SSO, anti-bot protection, and JavaScript-heavy sites. Opens the URL in a browser tab (reuses existing tab for same domain) and waits for the page to fully load before returning content. Automatically detects SPA

browser_get_current_html

Gets the current HTML from an already-loaded page WITHOUT navigating or reloading. Much faster than browserfetchwebpage since it only extracts the current DOM state. Use this after interactions (click, type) to get the updated page content efficiently.

browser_scroll_page

Scrolls within an already-loaded page. Use before browsertakescreenshot to capture different parts of the page, or to bring elements into view before interaction. Supports multiple scroll modes:

browser_take_screenshot

Takes a screenshot of an already-loaded page for visual analysis. Useful when HTML parsing is insufficient — for example, pages with charts, images, complex layouts, popups, or visual content that's hard to understand from HTML alone. Returns a PNG image.

browser_type_text

Types text into one or more input fields in a single call. Supports filling entire forms at once for efficient automation. Automatically clears existing text by default.

clear

(boolean, optional, default: true) - Whether to clear existing text first

direction

(string, optional) - Direction to scroll: up, down, left, right. Use with amount.

fields

(array, required) - Array of fields to fill. Each field object contains:

fullPage

(boolean, optional, default: false) - Capture the full scrollable page instead of just the viewport

postClickWait

(number, optional, default: 1000) - Milliseconds to wait after click for SPAs to render dynamic content

postLoadWait

(number, optional, default: 0) - Additional milliseconds to wait after page load before extracting HTML. Use for pages that need extra time to render.

postTypeWait

(number, optional, default: 1000) - Milliseconds to wait after typing for SPAs to render dynamic content

removeUnnecessaryHTML

(boolean, optional, default: true) - Remove unnecessary HTML for size reduction by ~90%

returnHtml

(boolean, optional, default: true) - Whether to wait for stability and return HTML after clicking. Set to false for fast form interactions (checkboxes, radio buttons)

returnType

(string, optional, default: json) - json text void

script

(string, required) - JavaScript source to execute in page context

selector

(string, optional) - CSS selector for the element (e.g., #submit-btn, .login-button)

text

(string, optional) - Text content to search for if selector not provided (e.g., "Sign In", "Submit")

timeoutMs

(number, optional, default: 30000, max: 60000) - Execution timeout

url

(string, required) - The URL to fetch

waitForElementTimeout

(number, optional, default: 1000) - Maximum time to wait for element in milliseconds