DrissionPage MCP

v0.8.5
io.github.jumodada/drissionpage-mcp Checked 12 hours ago Published 3 months ago

Local 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_navigate Navigate to URL

Navigate to a specific URL in the browser

ParameterTypeDescription
url *stringThe URL to navigate to
new_tabbooleanOpen the URL in a new browser tab instead of the current tab.
observebooleanReturn a compact before/after page change summary.

page_navigate_with_http_auth Navigate With HTTP Authentication

Open an isolated Chromium context, answer a bounded HTTP auth challenge, clean Fetch handlers, and retain the isolated authenticated tab until it is closed.

ParameterTypeDescription
password *string
url *string
username *string
realmOptional exact HTTP authentication realm constraint.
timeoutnumber

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.

ParameterTypeDescription
tab_id *stringMCP 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.

ParameterTypeDescription
tab_id *stringMCP tab id from tab_list, or the underlying DrissionPage native tab id.

page_resize Resize Window

Resize the browser window to specified dimensions

ParameterTypeDescription
height *integerHeight of the browser window
width *integerWidth of the browser window

page_screenshot Take Screenshot

Take an inline screenshot of the current page

ParameterTypeDescription
full_pagebooleanTake a full page screenshot

page_screenshot_save Save Screenshot

Save a screenshot to a local path under DP_MCP_SCREENSHOT_ROOT

ParameterTypeDescription
path *stringLocal file path under DP_MCP_SCREENSHOT_ROOT to save screenshot
full_pagebooleanTake 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.

ParameterTypeDescription
format *string
filename
landscapeboolean
margin_bottomnumber
margin_leftnumber
margin_rightnumber
margin_topnumber
operation_key
page_rangesstring
paper_height
paper_width
prefer_css_page_sizeboolean
print_backgroundboolean
scalenumber

page_snapshot Page Snapshot

Return a bounded page outline with text excerpt, headings, links, buttons, inputs, forms, and recommended selectors.

ParameterTypeDescription
include_htmlbooleanInclude bounded outerHTML excerpts for summarized elements
max_elementsintegerMaximum total headings/links/buttons/inputs/forms to return
max_text_charsintegerMaximum 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.

ParameterTypeDescription
include_ignoredboolean
include_valuesbooleanReturn accessibility field values. Defaults to false to avoid leaking secrets.
max_nodesinteger
scopeOptional 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.

ParameterTypeDescription
max_text_charsintegerMaximum characters per visible text sample
max_textsintegerMaximum 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.

ParameterTypeDescription
script *stringJavaScript function body to run in the current page. Use return to provide a JSON-serializable result.
argsarrayJSON arguments passed to the JavaScript function body
max_charsintegerMaximum 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.

ParameterTypeDescription
x *numberViewport X coordinate in CSS pixels
y *numberViewport Y coordinate in CSS pixels
elementstringHuman-readable element or interaction description
profilestringMovement 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.

ParameterTypeDescription
end_x *numberViewport drag end X in CSS pixels
end_y *numberViewport drag end Y in CSS pixels
start_x *numberViewport drag start X in CSS pixels
start_y *numberViewport drag start Y in CSS pixels
buttonstringMouse button held during the drag
elementstringHuman-readable draggable element or interaction description
profilestringMovement profile for the approach and every held segment: direct or deterministic bounded natural motion
waypointsarrayOptional 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.

ParameterTypeDescription
destination *
source *
buttonstring
profilestring

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.

ParameterTypeDescription
x *numberViewport X coordinate in CSS pixels
y *numberViewport Y coordinate in CSS pixels
buttonstringMouse button to press and release
delay_before_press_msintegerOptional 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.
elementstringHuman-readable element or interaction description
profilestringMovement 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.

ParameterTypeDescription
headers *objectExtra 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.

ParameterTypeDescription
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.

ParameterTypeDescription
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.

ParameterTypeDescription
permission *string
setting *string
originExact 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.

ParameterTypeDescription
max_message_charsintegerMaximum dialog message characters returned to the MCP client.
timeoutnumberSeconds 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.

ParameterTypeDescription
action *string
prompt_textText for an accepted prompt. The value is never returned.
timeoutnumberMaximum 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.

ParameterTypeDescription
selector *Selector/accessibility target, viewport coordinate click, or keyboard input that starts one download.
expected_filenameOptional exact basename constraint for the downloaded artifact.
expected_mime_typeOptional MIME constraint inferred from the completed filename.
operation_keyOptional live-task key. Reusing the same key replays the frozen artifact result without clicking again.
timeoutnumberShared 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.

ParameterTypeDescription
levelstringConsole level filter: all, error, warning, warn, info, or log.
limitintegerMaximum number of console entries to return.
sinceintegerReturn 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.

ParameterTypeDescription
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.
timeoutnumberTimeout 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.

ParameterTypeDescription
selector *CSS selector, XPath, or explicit DrissionPage locator for repeated elements. Bare selectors are CSS.
include_htmlbooleanInclude bounded outerHTML excerpts for each returned element
limitintegerMaximum 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.

ParameterTypeDescription
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.
buttonstringNative pointer button to use.
click_countintegerNative click count; 2 requests double-click semantics.
observebooleanReturn a compact before/after page change summary.
timeoutnumberTimeout in seconds to wait for element

element_type Type Text

Type text into an input element

ParameterTypeDescription
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 *stringText to type into the element
clearbooleanClear existing input content before typing
observebooleanReturn a compact before/after page change summary.
timeoutnumberTimeout in seconds to wait for element

element_get_text Get Text

Get text from an element or the whole page

ParameterTypeDescription
selectorCSS 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

ParameterTypeDescription
attribute *stringAttribute 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

ParameterTypeDescription
property *stringDOM 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

ParameterTypeDescription
selectorCSS 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.

ParameterTypeDescription
selector *String locator or structured selector/accessibility target with frame and shadow scope.
timeoutnumber

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.

ParameterTypeDescription
paths *arrayOne 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].
timeoutnumberTimeout 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.

ParameterTypeDescription
paths *array
selector *Selector/accessibility target that opens a file chooser.
timeoutnumber

page_scroll Scroll Page

Scroll the current page by direction or to a position.

ParameterTypeDescription
directionstringScroll direction or target: down, up, left, right, top, bottom, half, position.
pixelsintegerPixel distance for directional scrolling.
xintegerX coordinate for direction=position.
yintegerY coordinate for direction=position.

element_scroll_into_view Scroll Element Into View

Scroll an element into the viewport before a later action.

ParameterTypeDescription
selector *String locator or structured element target.
centerbooleanCenter the element in the viewport.
timeoutnumber

element_hover Hover Element

Move the mouse over an element.

ParameterTypeDescription
selector *String locator or structured element target.
offset_xOptional hover X offset.
offset_yOptional hover Y offset.
timeoutnumber

keyboard_press Keyboard Press

Send keyboard text/keys to the active page element without echoing the input in the result.

ParameterTypeDescription
keys *stringText or DrissionPage key string to send.
intervalnumberOptional interval between key events in seconds.

element_select Select Element Option

Select an option from a select element by value, text, or index.

ParameterTypeDescription
selector *String locator or structured select target.
value *stringOption value, text, or index string.
bystringSelect by value, text, or index.
timeoutnumber

element_check Check Element

Set a checkbox or radio element to checked/unchecked.

ParameterTypeDescription
selector *String locator or structured checkbox target.
by_jsbooleanUse JavaScript-backed checking.
checkedbooleanDesired checked state.
timeoutnumber

frame_list List Frames

List iframe/frame contexts on the current page without changing global state.

ParameterTypeDescription
limitinteger

frame_snapshot Frame Snapshot

Return a bounded page outline from a selected iframe/frame.

ParameterTypeDescription
frame_indexintegerZero-based frame index.
frame_selectorstringOptional iframe/frame selector. When empty, frame_index is used.
include_htmlboolean
max_elementsinteger
max_text_charsinteger
timeoutnumber

frame_find Find Element In Frame

Find an element inside a selected iframe/frame without global frame state.

ParameterTypeDescription
selector *stringSelector inside the target frame.
frame_indexinteger
frame_selectorstring
timeoutnumber

shadow_find Find Shadow Element

Find one element inside a shadow root exposed by the supported DrissionPage runtime.

ParameterTypeDescription
host_selector *stringSelector for the shadow host element.
selector *stringSelector inside the shadow root.
timeoutnumber

shadow_find_all Find Shadow Elements

Find repeated elements inside a shadow root exposed by the supported DrissionPage runtime.

ParameterTypeDescription
host_selector *stringSelector for the shadow host element.
selector *stringSelector inside the shadow root.
include_htmlboolean
limitinteger

browser_cookies_get Get Browser Cookies

Read normalized cookies with values redacted by default.

ParameterTypeDescription
all_domainsboolean
all_infoboolean
include_valuesbooleanReturn 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.

ParameterTypeDescription
cookies *array

browser_cookies_delete Delete Browser Cookie

Delete one named browser cookie with optional URL/domain/path scope.

ParameterTypeDescription
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.

ParameterTypeDescription
areastring
include_valuesbooleanReturn storage values instead of redacting non-empty values.
keystringOptional key. Empty returns all keys.

storage_set Set Web Storage

Set one localStorage/sessionStorage item. The value is not echoed.

ParameterTypeDescription
key *string
value *stringString value to store. Not echoed in result.
areastring

storage_clear Clear Web Storage

Clear one key or all items from localStorage/sessionStorage.

ParameterTypeDescription
areastring
keystringOptional 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.

ParameterTypeDescription
selector *CSS selector or XPath to wait for. Bare selectors are CSS; use text:... for text matching or explicit tag:/css:/xpath:/@attr locators.
timeoutnumberTimeout in seconds

wait_for_url Wait for URL

Wait for the current URL to contain a substring

ParameterTypeDescription
url_pattern *stringSubstring or pattern expected in the current URL
timeoutnumberTimeout in seconds

wait_time Wait Time

Wait for a specific amount of time

ParameterTypeDescription
seconds *numberNumber 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.

ParameterTypeDescription
condition *stringCondition to wait for
intervalnumberPolling interval in seconds
namestringAttribute or property name for attribute/property conditions
selectorCSS/XPath/DrissionPage locator for element or text conditions
stable_msintegerElement stability window for the stable condition
timeoutnumberTimeout in seconds
valuestringExpected 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.

ParameterTypeDescription
clearbooleanClear any existing listener queue before starting.
is_regexbooleanTreat targets as regular expressions when targets are provided.
methodstringOptional HTTP method filter such as GET or POST.
resource_typestringOptional resource type filter such as Fetch, XHR, or Document.
targetsarrayOptional 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.

ParameterTypeDescription
include_bodybooleanInclude bounded request/response body excerpts.
include_headersbooleanInclude request/response headers with sensitive names redacted.
limitintegerMaximum packets to return.
max_body_charsintegerMaximum characters for each body excerpt when include_body is true.
timeoutnumberMaximum seconds to wait for packets.

network_listen_stop Stop Network Listener

Stop beta network observation for the active tab and optionally clear it.

ParameterTypeDescription
clearbooleanClear 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.

ParameterTypeDescription
urls *arrayURL patterns with optional wildcards. An empty list clears them.