DrissionPage MCP
v0.8.5Local browser automation for MCP clients powered by DrissionPage.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
page_go_back Go Back
Go back to the previous page in browser history
page_go_forward Go Forward
Go forward to the next page in browser history
page_refresh Refresh Page
Refresh the current page
tab_list List Tabs
List browser tabs tracked by the current DrissionPage MCP session.
tab_switch Switch Tab
Switch the active browser tab by id from tab_list.
| Parameter | Type | Description |
|---|---|---|
tab_id * | string | MCP tab id from tab_list, or the underlying DrissionPage native tab id. |
tab_close Close Tab
Close a browser tab by id from tab_list without closing the whole browser.
| Parameter | Type | Description |
|---|---|---|
tab_id * | string | MCP tab id from tab_list, or the underlying DrissionPage native tab id. |
page_resize Resize Window
Resize the browser window to specified dimensions
| Parameter | Type | Description |
|---|---|---|
height * | integer | Height of the browser window |
width * | integer | Width of the browser window |
page_screenshot Take Screenshot
Take an inline screenshot of the current page
| Parameter | Type | Description |
|---|---|---|
full_page | boolean | Take a full page screenshot |
page_screenshot_save Save Screenshot
Save a screenshot to a local path under DP_MCP_SCREENSHOT_ROOT
| Parameter | Type | Description |
|---|---|---|
path * | string | Local file path under DP_MCP_SCREENSHOT_ROOT to save screenshot |
full_page | boolean | Take a full page screenshot |
page_export_artifact Export Page Artifact
Generate one PDF or MHTML file under DP_MCP_ARTIFACT_ROOT and return checksum, safe relative path, and exact-once receipt evidence.
| Parameter | Type | Description |
|---|---|---|
format * | string | |
filename | ||
landscape | boolean | |
margin_bottom | number | |
margin_left | number | |
margin_right | number | |
margin_top | number | |
operation_key | ||
page_ranges | string | |
paper_height | ||
paper_width | ||
prefer_css_page_size | boolean | |
print_background | boolean | |
scale | number |
page_snapshot Page Snapshot
Return a bounded page outline with text excerpt, headings, links, buttons, inputs, forms, and recommended selectors.
| Parameter | Type | Description |
|---|---|---|
include_html | boolean | Include bounded outerHTML excerpts for summarized elements |
max_elements | integer | Maximum total headings/links/buttons/inputs/forms to return |
max_text_chars | integer | Maximum page text excerpt characters to return |
page_accessibility_snapshot Accessibility Snapshot
Return a bounded Chromium accessibility tree for the page or a scoped selector/frame/shadow target.
| Parameter | Type | Description |
|---|---|---|
include_ignored | boolean | |
include_values | boolean | Return accessibility field values. Defaults to false to avoid leaking secrets. |
max_nodes | integer | |
scope | Optional selector/accessibility element whose AX subtree is returned. |
page_observe Observe Page
Return a compact current-page fingerprint with URL, title, ready state, element counts, visible text samples, active element, and recent console summary.
| Parameter | Type | Description |
|---|---|---|
max_text_chars | integer | Maximum characters per visible text sample |
max_texts | integer | Maximum number of visible text samples to return |
page_evaluate Evaluate JavaScript
Run a bounded JavaScript function body in the current page and return a JSON-safe result. This can mutate the page.
| Parameter | Type | Description |
|---|---|---|
script * | string | JavaScript function body to run in the current page. Use return to provide a JSON-serializable result. |
args | array | JSON arguments passed to the JavaScript function body |
max_chars | integer | Maximum serialized JSON characters returned in result |
page_pointer_move Move Pointer to Coordinates
Move the viewport pointer to exact CSS pixel coordinates without pressing a button, using either one direct move or a bounded natural trajectory.
| Parameter | Type | Description |
|---|---|---|
x * | number | Viewport X coordinate in CSS pixels |
y * | number | Viewport Y coordinate in CSS pixels |
element | string | Human-readable element or interaction description |
profile | string | Movement profile: direct emits one exact move; natural emits a deterministic 24-step eased cubic Bezier path with bounded 8-14ms intervals and an exact endpoint |
page_pointer_drag Drag Pointer Between Coordinates
Perform one failure-safe viewport drag through optional ordered waypoints using direct or bounded natural movement while the button remains pressed. Always releases the button.
| Parameter | Type | Description |
|---|---|---|
end_x * | number | Viewport drag end X in CSS pixels |
end_y * | number | Viewport drag end Y in CSS pixels |
start_x * | number | Viewport drag start X in CSS pixels |
start_y * | number | Viewport drag start Y in CSS pixels |
button | string | Mouse button held during the drag |
element | string | Human-readable draggable element or interaction description |
profile | string | Movement profile for the approach and every held segment: direct or deterministic bounded natural motion |
waypoints | array | Optional ordered viewport points visited while the button remains pressed |
page_pointer_drag_element Drag Element to Structured Destination
Resolve a source element and element, offset, or track-ratio destination immediately before one failure-safe drag. Supports CSS/XPath in the top document or one same-origin iframe, plus CSS paths through nested open Shadow DOM hosts; use coordinate drag for visual-only targets.
| Parameter | Type | Description |
|---|---|---|
destination * | ||
source * | ||
button | string | |
profile | string |
page_click_xy Click Coordinates
Move the viewport pointer to exact CSS pixel coordinates using a direct or bounded natural trajectory, optionally wait for an explicit delay, then press and release one mouse button.
| Parameter | Type | Description |
|---|---|---|
x * | number | Viewport X coordinate in CSS pixels |
y * | number | Viewport Y coordinate in CSS pixels |
button | string | Mouse button to press and release |
delay_before_press_ms | integer | Optional delay after pointer arrival and before mousePressed. This is timing control, not target-stability detection; moving targets require a fresh screenshot or selector-first action. |
element | string | Human-readable element or interaction description |
profile | string | Movement profile: direct emits one exact move; natural emits a deterministic 24-step eased cubic Bezier path with bounded 8-14ms intervals and an exact endpoint |
page_close Close Browser
Close the current page/browser
page_get_url Get Current URL
Get the current URL of the page
browser_headers_set Set Browser Headers
Replace extra HTTP request headers for the current tab. Successful results echo header values for MCP callbacks; an empty object clears them.
| Parameter | Type | Description |
|---|---|---|
headers * | object | Extra request headers. An empty object clears all configured values. |
browser_user_agent_set Set Browser User Agent
Override the current tab user agent and optional platform, returning the previous user agent so callers can restore it.
| Parameter | Type | Description |
|---|---|---|
user_agent * | string | |
platform |
browser_cache_clear Clear Browser Cache
Clear HTTP cache without clearing cookies or Web Storage.
browser_permission_get Get Browser Permission
Query one browser permission state for the current document origin without opening an operating-system prompt.
| Parameter | Type | Description |
|---|---|---|
permission * | string |
browser_permission_set Set Browser Permission
Set one permission to granted, denied, or prompt for one bounded origin in the current Chromium context.
| Parameter | Type | Description |
|---|---|---|
permission * | string | |
setting * | string | |
origin | Exact HTTP(S) origin. Defaults to the current page origin. |
browser_permissions_reset Reset Browser Permissions
Reset all Chromium permission overrides in the current browser context.
page_dialog_observe Observe Page Dialog
Observe a pending native alert, confirm, or prompt and return its bounded message without handling it.
| Parameter | Type | Description |
|---|---|---|
max_message_chars | integer | Maximum dialog message characters returned to the MCP client. |
timeout | number | Seconds to wait for a pending alert, confirm, or prompt. |
page_dialog_respond Respond To Dialog
Accept or dismiss one pending alert, confirm, or prompt through a capability-probed native DrissionPage dialog path.
| Parameter | Type | Description |
|---|---|---|
action * | string | |
prompt_text | Text for an accepted prompt. The value is never returned. | |
timeout | number | Maximum seconds to wait for a pending dialog. Zero checks immediately; an already-pending dialog still receives a bounded native response budget. |
element_click_and_download Click And Download
Perform one selector, coordinate, or keyboard trigger, await one completed download, and return an integrity-checked safe artifact receipt.
| Parameter | Type | Description |
|---|---|---|
selector * | Selector/accessibility target, viewport coordinate click, or keyboard input that starts one download. | |
expected_filename | Optional exact basename constraint for the downloaded artifact. | |
expected_mime_type | Optional MIME constraint inferred from the completed filename. | |
operation_key | Optional live-task key. Reusing the same key replays the frozen artifact result without clicking again. | |
timeout | number | Shared maximum seconds for target resolution, click, and download completion. |
page_console_logs Console Logs
Read bounded browser console messages from the current tab. Supports level filtering, cursor pagination, and a maximum result limit.
| Parameter | Type | Description |
|---|---|---|
level | string | Console level filter: all, error, warning, warn, info, or log. |
limit | integer | Maximum number of console entries to return. |
since | integer | Return only log entries with index greater than this cursor. |
element_find Find Element
Find an element on the page using CSS selector or XPath. Bare selectors are treated as CSS; use text:... for text matching.
| Parameter | Type | Description |
|---|---|---|
selector * | CSS selector or XPath to find the element. Bare selectors are CSS; use text:... for text matching or explicit tag:/css:/xpath:/@attr locators. | |
timeout | number | Timeout in seconds to wait for element |
element_find_all Find All Elements
Find multiple matching elements with bounded text/attribute summaries and recommended selectors for repeated lists, cards, and tables.
| Parameter | Type | Description |
|---|---|---|
selector * | CSS selector, XPath, or explicit DrissionPage locator for repeated elements. Bare selectors are CSS. | |
include_html | boolean | Include bounded outerHTML excerpts for each returned element |
limit | integer | Maximum number of matched elements to return |
element_click Click Element
Click an element found by CSS selector or XPath. Bare selectors are treated as CSS; use text:... for text matching.
| Parameter | Type | Description |
|---|---|---|
selector * | CSS selector or XPath to find the element. Bare selectors are CSS; use text:... for text matching or explicit tag:/css:/xpath:/@attr locators. | |
button | string | Native pointer button to use. |
click_count | integer | Native click count; 2 requests double-click semantics. |
observe | boolean | Return a compact before/after page change summary. |
timeout | number | Timeout in seconds to wait for element |
element_type Type Text
Type text into an input element
| Parameter | Type | Description |
|---|---|---|
selector * | CSS selector or XPath to find the input element. Bare selectors are CSS; use text:... for text matching or explicit tag:/css:/xpath:/@attr locators. | |
text * | string | Text to type into the element |
clear | boolean | Clear existing input content before typing |
observe | boolean | Return a compact before/after page change summary. |
timeout | number | Timeout in seconds to wait for element |
element_get_text Get Text
Get text from an element or the whole page
| Parameter | Type | Description |
|---|---|---|
selector | CSS selector or XPath; empty means whole page. Bare selectors are CSS; use text:... for text matching. |
element_get_attribute Get Attribute
Get an attribute value from an element
| Parameter | Type | Description |
|---|---|---|
attribute * | string | Attribute name to retrieve |
selector * | CSS selector or XPath to find the element. Bare selectors are CSS; use text:... for text matching or explicit tag:/css:/xpath:/@attr locators. |
element_get_property Get Property
Get a live DOM property value from an element, such as an input's current value
| Parameter | Type | Description |
|---|---|---|
property * | string | DOM property to retrieve, e.g. value |
selector * | CSS selector or XPath to find the element. Bare selectors are CSS; use text:... for text matching or explicit tag:/css:/xpath:/@attr locators. |
element_get_html Get HTML
Get HTML from an element or the whole page
| Parameter | Type | Description |
|---|---|---|
selector | CSS selector or XPath; empty means whole page. Bare selectors are CSS; use text:... for text matching. |
element_state_get Get Element State
Return DrissionPage element state and page/viewport geometry for a selector or accessibility target.
| Parameter | Type | Description |
|---|---|---|
selector * | String locator or structured selector/accessibility target with frame and shadow scope. | |
timeout | number |
element_upload_file Upload File
Set files on an input[type=file]. Paths must exist under DP_MCP_UPLOAD_ROOT and response data only returns safe file names.
| Parameter | Type | Description |
|---|---|---|
paths * | array | One or more local file paths under DP_MCP_UPLOAD_ROOT. Absolute paths are accepted but never echoed back in tool results. |
selector * | CSS/XPath/DrissionPage locator for an input[type=file]. | |
timeout | number | Timeout in seconds to wait for the file input. |
element_click_and_upload Click And Upload
Arm Chromium's file chooser, click one trigger, inject approved files, and always remove interception without opening a native operating-system picker.
| Parameter | Type | Description |
|---|---|---|
paths * | array | |
selector * | Selector/accessibility target that opens a file chooser. | |
timeout | number |
page_scroll Scroll Page
Scroll the current page by direction or to a position.
| Parameter | Type | Description |
|---|---|---|
direction | string | Scroll direction or target: down, up, left, right, top, bottom, half, position. |
pixels | integer | Pixel distance for directional scrolling. |
x | integer | X coordinate for direction=position. |
y | integer | Y coordinate for direction=position. |
element_scroll_into_view Scroll Element Into View
Scroll an element into the viewport before a later action.
| Parameter | Type | Description |
|---|---|---|
selector * | String locator or structured element target. | |
center | boolean | Center the element in the viewport. |
timeout | number |
element_hover Hover Element
Move the mouse over an element.
| Parameter | Type | Description |
|---|---|---|
selector * | String locator or structured element target. | |
offset_x | Optional hover X offset. | |
offset_y | Optional hover Y offset. | |
timeout | number |
keyboard_press Keyboard Press
Send keyboard text/keys to the active page element without echoing the input in the result.
| Parameter | Type | Description |
|---|---|---|
keys * | string | Text or DrissionPage key string to send. |
interval | number | Optional interval between key events in seconds. |
element_select Select Element Option
Select an option from a select element by value, text, or index.
| Parameter | Type | Description |
|---|---|---|
selector * | String locator or structured select target. | |
value * | string | Option value, text, or index string. |
by | string | Select by value, text, or index. |
timeout | number |
element_check Check Element
Set a checkbox or radio element to checked/unchecked.
| Parameter | Type | Description |
|---|---|---|
selector * | String locator or structured checkbox target. | |
by_js | boolean | Use JavaScript-backed checking. |
checked | boolean | Desired checked state. |
timeout | number |
frame_list List Frames
List iframe/frame contexts on the current page without changing global state.
| Parameter | Type | Description |
|---|---|---|
limit | integer |
frame_snapshot Frame Snapshot
Return a bounded page outline from a selected iframe/frame.
| Parameter | Type | Description |
|---|---|---|
frame_index | integer | Zero-based frame index. |
frame_selector | string | Optional iframe/frame selector. When empty, frame_index is used. |
include_html | boolean | |
max_elements | integer | |
max_text_chars | integer | |
timeout | number |
frame_find Find Element In Frame
Find an element inside a selected iframe/frame without global frame state.
| Parameter | Type | Description |
|---|---|---|
selector * | string | Selector inside the target frame. |
frame_index | integer | |
frame_selector | string | |
timeout | number |
shadow_find Find Shadow Element
Find one element inside a shadow root exposed by the supported DrissionPage runtime.
| Parameter | Type | Description |
|---|---|---|
host_selector * | string | Selector for the shadow host element. |
selector * | string | Selector inside the shadow root. |
timeout | number |
shadow_find_all Find Shadow Elements
Find repeated elements inside a shadow root exposed by the supported DrissionPage runtime.
| Parameter | Type | Description |
|---|---|---|
host_selector * | string | Selector for the shadow host element. |
selector * | string | Selector inside the shadow root. |
include_html | boolean | |
limit | integer |
browser_cookies_get Get Browser Cookies
Read normalized cookies with values redacted by default.
| Parameter | Type | Description |
|---|---|---|
all_domains | boolean | |
all_info | boolean | |
include_values | boolean | Return cookie values. Defaults to false to avoid leaking secrets. |
browser_cookies_set Set Browser Cookies
Set a bounded batch of browser cookies. The successful result echoes cookie values by default for MCP callbacks and verification.
| Parameter | Type | Description |
|---|---|---|
cookies * | array |
browser_cookies_delete Delete Browser Cookie
Delete one named browser cookie with optional URL/domain/path scope.
| Parameter | Type | Description |
|---|---|---|
name * | string | |
domain | ||
path | ||
url |
browser_cookies_clear Clear Browser Cookies
Clear all cookies from the active browser context.
storage_get Get Web Storage
Read localStorage or sessionStorage by key or as a bounded map, with values redacted unless explicitly requested.
| Parameter | Type | Description |
|---|---|---|
area | string | |
include_values | boolean | Return storage values instead of redacting non-empty values. |
key | string | Optional key. Empty returns all keys. |
storage_set Set Web Storage
Set one localStorage/sessionStorage item. The value is not echoed.
| Parameter | Type | Description |
|---|---|---|
key * | string | |
value * | string | String value to store. Not echoed in result. |
area | string |
storage_clear Clear Web Storage
Clear one key or all items from localStorage/sessionStorage.
| Parameter | Type | Description |
|---|---|---|
area | string | |
key | string | Optional key. Empty clears the area. |
wait_for_element Wait for Element
Wait for an element to appear on the page. Bare selectors are treated as CSS; use text:... for text matching.
| Parameter | Type | Description |
|---|---|---|
selector * | CSS selector or XPath to wait for. Bare selectors are CSS; use text:... for text matching or explicit tag:/css:/xpath:/@attr locators. | |
timeout | number | Timeout in seconds |
wait_for_url Wait for URL
Wait for the current URL to contain a substring
| Parameter | Type | Description |
|---|---|---|
url_pattern * | string | Substring or pattern expected in the current URL |
timeout | number | Timeout in seconds |
wait_time Wait Time
Wait for a specific amount of time
| Parameter | Type | Description |
|---|---|---|
seconds * | number | Number of seconds to wait |
wait_until Wait Until
Wait for observable page state: element present/visible/hidden/detached/clickable/stable, text contains/matches, or URL contains/matches.
| Parameter | Type | Description |
|---|---|---|
condition * | string | Condition to wait for |
interval | number | Polling interval in seconds |
name | string | Attribute or property name for attribute/property conditions |
selector | CSS/XPath/DrissionPage locator for element or text conditions | |
stable_ms | integer | Element stability window for the stable condition |
timeout | number | Timeout in seconds |
value | string | Expected value or substring/regular expression, depending on condition |
network_listen_start Start Network Listener
Start beta HTTP/XHR/Fetch network observation for the active tab. This observes packets only; it does not intercept or modify requests.
| Parameter | Type | Description |
|---|---|---|
clear | boolean | Clear any existing listener queue before starting. |
is_regex | boolean | Treat targets as regular expressions when targets are provided. |
method | string | Optional HTTP method filter such as GET or POST. |
resource_type | string | Optional resource type filter such as Fetch, XHR, or Document. |
targets | array | Optional URL substrings or regex patterns passed to DrissionPage. |
network_listen_wait Wait Network Listener
Wait for observed HTTP/XHR/Fetch packets and return bounded metadata. Bodies and headers are opt-in and sensitive headers are redacted.
| Parameter | Type | Description |
|---|---|---|
include_body | boolean | Include bounded request/response body excerpts. |
include_headers | boolean | Include request/response headers with sensitive names redacted. |
limit | integer | Maximum packets to return. |
max_body_chars | integer | Maximum characters for each body excerpt when include_body is true. |
timeout | number | Maximum seconds to wait for packets. |
network_listen_stop Stop Network Listener
Stop beta network observation for the active tab and optionally clear it.
| Parameter | Type | Description |
|---|---|---|
clear | boolean | Clear the listener queue while stopping. |
network_blocked_urls_set Set Blocked URLs
Replace URL patterns blocked for the current tab. Successful results echo patterns; an empty list clears them.
| Parameter | Type | Description |
|---|---|---|
urls * | array | URL patterns with optional wildcards. An empty list clears them. |