BrowserGenie MCP Server
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| WEBSOCKET_PORT | No | Port the WebSocket server listens on. The extension must use the same port. | 7890 |
Capabilities
Features and capabilities supported by this server
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| navigate_to_urlA | Load a web page in the browser. Use this whenever you need to go to a specific website or web address. Automatically waits for page to load. |
| navigate_backA | Go back to the previous page in browser history. Use this instead of navigating to the previous URL directly when possible. |
| navigate_forwardA | Go forward to the next page in browser history. Only works if you previously navigated back. |
| navigate_reloadA | Refresh the current page. Use this if the page seems stuck, outdated, or needs fresh data. |
| list_tabsA | Get a list of ALL open browser tabs. Use this to find tab IDs, see what pages are open, or locate a specific website you need to interact with. Returns tab ID, URL, title, and active status. |
| select_tabA | Switch to a specific tab. Use this when you need to interact with a different open tab. Makes the tab active and brings its window to front. |
| new_tabA | Open a brand new browser tab. You can optionally provide a URL to navigate to immediately. Returns the new tab ID so you can interact with it. |
| close_tabA | Close a specific browser tab. Use this to clean up tabs you no longer need. Be careful - closed tabs cannot be recovered through this tool! |
| get_tab_stateA | Capture URL, title, and a DOM hash for quick tab state comparison. Useful for verifying cross-tab state sync. |
| assert_tabs_matchA | Verify two tabs have the same state (URL, title, DOM hash). Useful for cross-tab state sync testing. |
| test_storage_syncA | Test cross-tab localStorage synchronization. Sets a value in tab A and checks if it appears in tab B. |
| press_keyA | Press a single keyboard key with optional modifiers. Use this for special keys: Enter, Tab, Escape, arrows, function keys, or keyboard shortcuts. Does NOT type text - use type_text for that. |
| type_textA | Type regular text into the currently focused input field. Use this for typing usernames, passwords, search queries, form data, etc. Each character is typed individually like a real user. |
| screenshot_viewportA | Take a screenshot of what's currently visible in the browser window. Use this to see the current state of the page, verify UI elements, or debug layout issues. Returns an image you can view. |
| screenshot_full_pageA | Take a screenshot of the ENTIRE page, including content you need to scroll down to see. Automatically scrolls and stitches images together. Use this when you need to see everything on the page. |
| screenshot_elementA | Take a screenshot of a specific element only. Provide a CSS selector or XPath to capture just that element. |
| click_elementA | Click on any element on the page. Use this for buttons, links, checkboxes, dropdowns, or any interactive element. Simulates real human mouse behavior with Bézier curve movement, randomized delays, and natural press/release timing. |
| input_and_typeA | One-stop tool for filling form fields. Automatically clicks the input, clears existing text, types your text, and optionally submits with Enter. Use this for search boxes, login forms, registration fields, etc. |
| drag_and_dropA | Drag an element from one location to another. Use this for sliders, sortable lists, file upload drop zones, or any drag-interactive elements. Simulates realistic human drag speed. |
| hover_elementA | Move mouse over an element without clicking. Use this to reveal dropdown menus, tooltips, hover-only buttons, or to trigger CSS :hover states. |
| read_page_htmlA | Read the full HTML source of the current page |
| read_stylesheetsA | Read CSS stylesheets loaded on the page. Returns all stylesheets or a specific one by URL. |
| read_scriptsB | Read JavaScript sources loaded on the page. Returns all scripts or a specific one by URL. |
| read_page_resourcesA | List all resources loaded on the page (images, fonts, scripts, stylesheets) with their URLs and sizes |
| find_in_sourceA | Search for a regex pattern in page HTML and loaded scripts. Returns matches with file URL, line number, and surrounding context. |
| modify_htmlB | Modify DOM elements on the page (set HTML, attributes, or remove elements) |
| modify_cssB | Modify CSS styles of elements on the page |
| get_network_logsA | Get network request/response logs collected since the debugger was attached. Optionally filter by URL pattern, method, status code, or resource type. |
| get_network_request_detailA | Get detailed information about a specific network request, including headers and optionally the response body |
| clear_network_logsA | Clear all collected network logs for a tab |
| get_cookiesB | Get cookies for the current page or a specific URL |
| set_cookieC | Set a cookie |
| delete_cookieB | Delete a specific cookie |
| get_local_storageC | Read localStorage entries for the current page |
| set_local_storageB | Set a localStorage entry on the current page |
| remove_local_storageB | Remove a localStorage entry from the current page |
| get_session_storageA | Read sessionStorage entries for the current page |
| set_session_storageB | Set a sessionStorage entry on the current page |
| remove_session_storageB | Remove a sessionStorage entry from the current page |
| get_console_logsA | Get all console messages from the page (console.log, console.error, warnings, etc.). Use this to debug JavaScript errors, see what the page is logging, or verify your code is running. |
| execute_javascriptA | Run ANY JavaScript code directly in the page. This is your escape hatch for anything the other tools can't do: extract data, modify the page, trigger events, check values, etc. Full access to window, document, and all page APIs. |
| browser_snapshotA | Get a text-based accessibility tree snapshot of the page. This shows the page structure with ARIA roles, names, and states — ideal for understanding page layout when you cannot see screenshots. |
| get_element_layoutA | Get layout information for a specific element or all visible elements on the page. Returns bounding rectangles, overflow, z-index, position, display, visibility, and opacity. |
| detect_layout_issuesB | Detect layout problems like overflow, element overlap, viewport clipping, and z-index stacking issues. |
| compare_snapshotsA | Compare two page state snapshots (from browser_snapshot or read_page_html) and return the differences. Use this to verify state changes after an action. |
| get_accessibility_treeB | Get the raw accessibility tree as structured JSON. Companion to browser_snapshot which returns formatted text. Optionally filter to a subtree with a selector. |
| diff_page_sourceA | Compare two HTML strings structurally and return the differences (added nodes, removed nodes, attribute changes, text changes). Use this to detect DOM changes after an action. |
| resize_viewportB | Resize the browser viewport to specific dimensions. Use this to test responsive layouts at different screen sizes. |
| emulate_deviceA | Emulate a specific device preset (iPhone 14, Pixel 7, iPad Pro, desktop). Automatically sets viewport, DPR, user agent, and touch emulation. |
| reset_viewportB | Reset viewport emulation to the browser's default size and user agent. |
| get_active_media_queriesB | Check which CSS media queries are currently active and which breakpoints match the current viewport. |
| get_viewport_infoB | Get current viewport dimensions, device pixel ratio, viewport meta tag, screen info, and user agent. |
| find_elementA | Find an element by visible text, ARIA role, ARIA label, CSS selector, or XPath. Returns a unique CSS selector and element details. Use this when you need to locate an element but don't know its exact selector. Role matching supports both explicit role="..." attributes AND semantic HTML (e.g., matches role "button", matches role "link"). When multiple filters are provided (e.g., role + text), they are combined with AND logic. |
| get_element_stateA | Get the state of an element: exists, visible, enabled, focused, checked, selected, readOnly, required, valid, and more. Essential for verifying element conditions during testing. |
| query_shadow_domC | Query an element inside a shadow DOM root. Provide the host element selector and the inner selector within the shadow root. |
| get_computed_stylesC | Get computed CSS styles for an element. Optionally filter to specific properties or query pseudo-elements like ::before and ::after. |
| deep_query_shadow_domC | Query an element inside a deep shadow DOM tree by providing a path of host selectors. |
| get_shadow_dom_treeB | Return the full shadow DOM tree structure as JSON for a given host element. |
| run_accessibility_auditA | Run an axe-core accessibility audit on the page. Returns violations, incomplete items (need manual review), and pass counts. Use this to find WCAG compliance issues. |
| check_color_contrastB | Check color contrast ratios for text elements against WCAG AA and AAA standards. Returns contrast ratios and pass/fail status. |
| get_tab_orderA | Get a static list of all focusable elements on the page in tab order, with unique CSS selectors and visibility flags. Use this for a one-time snapshot of the tab order. For interactive focus path recording (simulating Tab presses and tracking where focus lands), use record_focus_path instead. |
| get_performance_metricsA | Get page load performance metrics: navigation timing, paint metrics (FCP), LCP, CLS, FID, and memory usage. |
| check_font_loadingB | Verify that all web fonts have loaded correctly. Returns font family, status, weight, and style for each font. |
| audit_broken_resourcesB | Find broken images, failed stylesheets, font errors, and other resource loading problems on the page. |
| check_security_headersA | Inspect security-related HTTP response headers for the page: CSP, HSTS, X-Frame-Options, X-Content-Type-Options, Referrer-Policy, Permissions-Policy, and XSS-Protection. |
| detect_cookie_bannersA | Detect cookie consent banners and CMP (Consent Management Platform) UI patterns on the page. Returns detected banners with text and button labels. |
| record_performance_timelineB | Start, stop, or get a performance timeline recording. Records memory, LCP, CLS at intervals during a user sequence. |
| record_focus_pathA | Simulate Tab key presses N times and record where focus lands at each step, flagging invisible or hidden focus targets. This is an interactive alternative to get_tab_order — use record_focus_path when you want to verify the actual focus behavior during keyboard navigation, and get_tab_order when you just need a static list. |
| hover_and_inspectA | Hover over an element and capture any resulting DOM or style changes. Useful for testing dropdown menus, tooltips, and hover effects. |
| force_pseudo_stateA | Force a CSS pseudo-state (hover, focus, active, visited, focus-within, focus-visible) on an element and read the resulting computed styles. Useful for testing CSS state styles without actual interaction. |
| get_tooltip_textA | Hover over an element and extract any tooltip text. Checks title attribute, aria-describedby, aria-labelledby, CSS tooltips, and custom tooltip components. |
| monitor_storage_eventsA | Monitor localStorage and sessionStorage changes. IMPORTANT: Due to the Web Storage API spec, storage events only fire in OTHER tabs — same-tab changes are NOT captured. Start monitoring, get recorded events (from all tabs of same origin), or stop monitoring. |
| monitor_cookie_changesA | Monitor cookie changes across all tabs. Start monitoring, get recorded changes, or stop. Optionally filter by domain. |
| monitor_console_eventsB | Real-time console event monitoring. Start monitoring, get events since last read, or stop. Filter by log level. |
| assert_elementC | Assert a condition on an element. Returns whether the assertion passed, the actual value, and a message. Essential for automated testing workflows. |
| check_form_validityA | Check HTML5 form validation state for a form or all form elements within a selector. Returns validity details per element including valueMissing, typeMismatch, patternMismatch, etc. |
| tab_to_nextB | Simulate Tab key navigation and track focus movement. Returns previous and current focused element info, and whether focus wrapped around. |
| set_input_filesA | Set files on a file input element for testing file uploads. Uses CDP DOM.setFileInputFiles for virtual file creation. |
| emulate_network_conditionsB | Simulate slow or offline network conditions. Use this to test how pages behave on poor connections. Set reset=true to restore normal conditions. |
| intercept_requestsB | Intercept and modify or block network requests. Use block to abort requests, modify to return custom responses, or clear to remove all intercepts. |
| snapshot_page_stateA | Capture a complete snapshot of the page state: HTML, localStorage, sessionStorage, cookies, scroll position, and form values. Use with restore_page_state to return to this exact state. |
| restore_page_stateA | Restore a page from a previously captured snapshot. Navigates to the URL, restores storage, cookies, HTML, and scroll position. |
| wait_for_conditionA | Wait until a JavaScript condition evaluates to true. Polls the expression at the specified interval until the timeout. Returns whether the condition was met and how long it took. |
| assert_no_console_errorsA | Assert that there are no console errors (or specified level entries) for the tab. Returns error count, list of errors, and pass/fail. |
| assert_no_network_errorsA | Assert that there are no failed network requests (4xx, 5xx, or failed) for the tab. Returns failed count, list of failed requests, and pass/fail. |
| get_network_errorsA | Get only failed/errored network requests for the tab. Useful for debugging resource loading issues. |
| stress_test_refreshA | Refresh page N times with cache bypass, running an assertion after each refresh. Returns pass/fail per iteration. Useful for catching intermittent font bugs, race conditions, and cache-dependent issues. |
| assert_css_propertyB | Assert that a computed CSS property value matches expected for an element. |
| assert_network_request_madeB | Assert that a network request matching a pattern was made. Useful for verifying analytics, API calls, or resource loading. |
| assert_page_load_timeB | Assert that the page load time (navigation timing loadEventEnd) is within a threshold. |
| get_all_issuesA | Unified diagnostic tool that returns console errors, network errors, and broken resources in a single call. Use this for a quick health check. For deeper inspection of a specific category, use get_console_logs, get_network_errors, or audit_broken_resources individually. Note: resource inspection requires the CDP debugger to be attached. If Chrome DevTools is open on the tab, resource inspection may be skipped but console/network data will still be returned. |
| double_tapA | Simulate double-tap at coordinates or on an element. Useful for testing double-tap-to-zoom, double-tap-to-edit, or other mobile interactions. |
| swipeA | Simulate touch swipe from point A to point B with duration. Ensure viewport is set to mobile/touch enabled first via emulate_device or resize_viewport. |
| long_pressB | Simulate long-press at coordinates or on an element. Useful for context menus or selection. |
| pinchA | Simulate pinch zoom with two touch points converging or diverging. Positive startRadius > endRadius = pinch in (zoom out). Negative = pinch out (zoom in). |
| start_recording_macroB | Start recording user actions (clicks, typing, navigation) in a tab. Inject the macro recorder content script. |
| stop_recording_macroA | Stop recording and return the macro JSON with recorded events. |
| replay_macroB | Replay a recorded macro with optional speed multiplier. Events are replayed with original timing preserved. |
| compare_screenshotsB | Compare two screenshots pixel-by-pixel using pixelmatch. Returns match percentage, mismatched pixel count, and a diff image. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/BrowserGenie/mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server