Browser state & emulation
Browser state & emulation — MCP tools exposed to agents.
16 tools in this group.
browser_delete_cookies
Delete cookies. If name is given, deletes that cookie. Otherwise deletes all cookies.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
name | string | no | Cookie name to delete (optional, omit to delete all) |
browser_dialog_accept
Accept a dialog (alert, confirm, prompt). Optionally provide text for prompt dialogs.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
text | string | no | Text to enter in the prompt dialog (optional) |
browser_dialog_dismiss
Dismiss a dialog (cancel/close)
No parameters.
browser_diff_map
Compare current page state vs last map. Shows additions (+) and removals (-) since the last browser_map call.
No parameters.
browser_download_set_dir
Set the download directory for the browser
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
path | string | yes | Directory path for downloads |
browser_emulate_media
Override CSS media features (color scheme, reduced motion, etc.)
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
colorScheme | string | no | Color scheme: "light", "dark", or "no-preference" (one of: light, dark, no-preference) | |
contrast | string | no | Contrast preference: "more", "less", or "no-preference" (one of: more, less, no-preference) | |
forcedColors | string | no | Forced colors: "active" or "none" (one of: active, none) | |
media | string | no | Media type: "screen" or "print" (one of: screen, print) | |
reducedMotion | string | no | Reduced motion: "reduce" or "no-preference" (one of: reduce, no-preference) |
browser_get_cookies
List all cookies for the current page
No parameters.
browser_get_viewport
Get the current viewport dimensions
No parameters.
browser_get_window
Get the OS browser window dimensions and state
No parameters.
browser_restore_storage
Restore cookies and storage from a JSON state file
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
path | string | yes | Path to the JSON state file |
browser_set_content
Replace the page HTML content
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
html | string | yes | HTML content to set |
browser_set_cookie
Set a cookie
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
domain | string | no | Cookie domain (optional, defaults to current page domain) | |
name | string | yes | Cookie name | |
path | string | no | Cookie path (optional, defaults to /) | |
value | string | yes | Cookie value |
browser_set_geolocation
Override the browser geolocation
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
accuracy | number | no | 1 | Accuracy in meters (default: 1) |
latitude | number | yes | Latitude (-90 to 90) | |
longitude | number | yes | Longitude (-180 to 180) |
browser_set_viewport
Set the browser viewport size
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
devicePixelRatio | number | no | Device pixel ratio (optional, e.g., 2 for Retina) | |
height | number | yes | Viewport height in pixels | |
width | number | yes | Viewport width in pixels |
browser_set_window
Set the OS browser window size, position, or state
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
height | number | no | Window height in pixels | |
state | string | no | Window state: normal, maximized, minimized, or fullscreen (one of: normal, maximized, minimized, fullscreen) | |
width | number | no | Window width in pixels | |
x | number | no | Window x position in pixels | |
y | number | no | Window y position in pixels |
browser_storage_state
Export cookies, localStorage, and sessionStorage as JSON
No parameters.