selector
(string, optional) - CSS selector for the element (e.g., #submit-btn, .login-button)
How to use it
selector is exposed by the MCPBrowser MCP server. Add the server to your MCP client (Claude Desktop, Cursor, Windsurf and others), and the selector 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@latestOther tools in MCPBrowser (24)
(number, optional, default: 500) - Pixels to scroll in the specified direction (~half a viewport)
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.
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.
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.
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
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.
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:
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.
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.
(boolean, optional, default: true) - Whether to clear existing text first
(string, optional) - Direction to scroll: up, down, left, right. Use with amount.
(array, required) - Array of fields to fill. Each field object contains:
(boolean, optional, default: false) - Capture the full scrollable page instead of just the viewport
(number, optional, default: 1000) - Milliseconds to wait after click for SPAs to render dynamic content
(number, optional, default: 0) - Additional milliseconds to wait after page load before extracting HTML. Use for pages that need extra time to render.
(number, optional, default: 1000) - Milliseconds to wait after typing for SPAs to render dynamic content
(boolean, optional, default: true) - Remove unnecessary HTML for size reduction by ~90%
(boolean, optional, default: true) - Whether to wait for stability and return HTML after clicking. Set to false for fast form interactions (checkboxes, radio buttons)
(string, optional, default: json) - json text void
(string, required) - JavaScript source to execute in page context
(string, optional) - Text content to search for if selector not provided (e.g., "Sign In", "Submit")
(number, optional, default: 30000, max: 60000) - Execution timeout
(string, required) - The URL to fetch
(number, optional, default: 1000) - Maximum time to wait for element in milliseconds