pydoll-browser-mcp

v0.2.1
pydoll-browser-mcp Checked 4 days ago Published 2 months ago

MCP server for browser automation powered by pydoll (Chrome/Edge over CDP) with multi-context, multi-tab and per-context proxy support.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

browser_launch

Launch a new Chrome or Edge browser and return its browser_id. proxy: optional browser-wide proxy. Accepts host:port, host:port:user:password, or scheme://[user:pass@]host:port. For different proxies per identity prefer context_create(proxy_server=...).

ParameterTypeDescription
browserstring
connection_portinteger
executable_pathstring
extra_args
headless
make_defaultboolean
proxystring
proxy_bypassstring
user_data_dirstring
window_heightinteger
window_widthinteger

browser_connect

Attach to an already-running browser over its CDP WebSocket address.

ParameterTypeDescription
ws_address *string

browser_list

List running browsers with their contexts and tabs.

browser_status

Get browser version, contexts, open tabs and window id.

ParameterTypeDescription
browser_idstring

browser_close

Close a browser and all of its contexts/tabs.

ParameterTypeDescription
browser_idstring

browser_set_window

Control the browser window: action is maximize|minimize|bounds.

ParameterTypeDescription
actionstring
browser_idstring
heightinteger
leftinteger
topinteger
widthinteger

browser_grant_permissions

Grant browser permissions (geolocation, notifications, camera, ...).

ParameterTypeDescription
permissions *array
browser_idstring
context_idstring
originstring

browser_reset_permissions

Reset all browser permissions to default.

ParameterTypeDescription
browser_idstring
context_idstring

browser_set_download_path

Set the download directory for the browser or a specific context.

ParameterTypeDescription
path *string
browser_idstring
context_idstring

browser_set_extra_headers

Apply extra HTTP headers to every request at the browser level.

ParameterTypeDescription
headers *object
browser_idstring

browser_clear_cache

Clear the browser HTTP cache.

ParameterTypeDescription
browser_idstring

context_create

Create an isolated browser context (own cookies/storage and optional proxy). This is the recommended way to give one identity its own egress IP: pass proxy_server as host:port:user:password or scheme://user:pass@host:port.

ParameterTypeDescription
browser_idstring
namestring
proxy_bypass_liststring
proxy_serverstring

context_list

List contexts for a browser.

ParameterTypeDescription
browser_idstring

context_delete

Delete a context and close every tab inside it.

ParameterTypeDescription
context_id *string
browser_idstring

context_cookies_get

Read all cookies in a context (works without an open tab).

ParameterTypeDescription
browser_idstring
context_idstring

context_cookies_set

Set cookies in a context. Each cookie needs at least name/value and domain or url.

ParameterTypeDescription
cookies *array
browser_idstring
context_idstring

context_cookies_delete

Delete all cookies in a context.

ParameterTypeDescription
browser_idstring
context_idstring

context_storage_state_export

Export cookies and the current tab's localStorage as a reusable state JSON.

ParameterTypeDescription
browser_idstring
context_idstring
save_tostring

context_storage_state_import

Import cookies (and localStorage where the tab is on the right origin).

ParameterTypeDescription
state *object
browser_idstring
context_idstring

proxy_test

Verify a proxy by opening a throwaway context and checking the egress IP. Returns the observed IP, HTTP status and timing so you can validate credentials before launching a long run.

ParameterTypeDescription
proxy_server *string
browser_idstring
proxy_bypass_liststring
urlstring

tab_new

Open a new tab (optionally inside a given context) and return its tab_id.

ParameterTypeDescription
browser_idstring
context_idstring
make_defaultboolean
urlstring

tab_list

List open tabs. sync=True also discovers popups/new windows.

ParameterTypeDescription
browser_idstring
syncboolean

tab_select

Make a tab the default target for subsequent calls and focus it.

ParameterTypeDescription
tab_id *string
browser_idstring

tab_close

Close a tab (defaults to the active tab).

ParameterTypeDescription
browser_idstring
tab_idstring

tab_navigate

Navigate a tab to a URL and optionally wait for load.

ParameterTypeDescription
url *string
browser_idstring
tab_idstring
timeoutinteger
wait_for_loadboolean

tab_back

Go back in history.

ParameterTypeDescription
browser_idstring
tab_idstring

tab_forward

Go forward in history.

ParameterTypeDescription
browser_idstring
tab_idstring

tab_refresh

Reload the current page.

ParameterTypeDescription
browser_idstring
ignore_cacheboolean
tab_idstring

tab_info

Return URL, title, document readyState and a health probe for a tab.

ParameterTypeDescription
browser_idstring
tab_idstring

tab_get_html

Return the live HTML source of the page (truncated past the result limit).

ParameterTypeDescription
browser_idstring
tab_idstring

tab_execute_script

Execute JavaScript in the page and return its value (return_by_value). timeout is in seconds; 0 uses the server default (PYDOLL_MCP_SCRIPT_TIMEOUT).

ParameterTypeDescription
script *string
await_promiseboolean
browser_idstring
tab_idstring
timeoutnumber

tab_wait

Sleep for a number of seconds.

ParameterTypeDescription
secondsnumber

tab_wait_for_text

Wait until text appears (appear=True) or disappears from the page body.

ParameterTypeDescription
text *string
appearboolean
browser_idstring
tab_idstring
timeoutinteger

tab_wait_for_url

Wait until the tab URL matches a glob pattern (e.g. ``**/dashboard*``).

ParameterTypeDescription
pattern *string
browser_idstring
tab_idstring
timeoutinteger

tab_wait_for_element

Wait for a CSS/XPath selector to exist (and optionally be visible).

ParameterTypeDescription
selector *string
browser_idstring
tab_idstring
timeoutinteger
visibleboolean

tab_screenshot

Screenshot the page or an element. Returns an image unless path is given. Cropping and zooming run on the captured bitmap in Python; the page is never scrolled, restyled or modified. - region: [x1, y1, x2, y2] in viewport CSS pixels (the same space as mouse_click; read values off a grid shot). The image is cropped to that rectangle, clipped to the viewport when it extends past it. With full_page=True the region is in page coordinates instead. - scale: zoom applied to the crop (1.0 = native, 2.0 = 2x). Integer zooms are p…

ParameterTypeDescription
browser_idstring
formatstring
full_pageboolean
grid
pathstring
qualityinteger
refstring
region
scalenumber
selectorstring
tab_idstring

tab_pdf

Print the page to PDF and save it to a file.

ParameterTypeDescription
backgroundboolean
browser_idstring
header_footerboolean
landscapeboolean
pathstring
scalenumber
tab_idstring

tab_scroll

Scroll the page. to=bottom|top, or direction=down|up|left|right with distance, or scroll a specific element into view via selector/ref.

ParameterTypeDescription
browser_idstring
directionstring
distanceinteger
refstring
selectorstring
tab_idstring
tostring

tab_handle_dialog

Accept or dismiss a JavaScript alert/confirm/prompt dialog.

ParameterTypeDescription
acceptboolean
browser_idstring
prompt_textstring
tab_idstring

tab_bring_to_front

Focus a tab/window.

ParameterTypeDescription
browser_idstring
tab_idstring

find_element

Find the first element by CSS/XPath selector or a snapshot ref. Returns a ref.

ParameterTypeDescription
browser_idstring
refstring
selectorstring
tab_idstring
timeoutinteger

find_elements

Find all elements matching a CSS/XPath selector.

ParameterTypeDescription
selector *string
browser_idstring
limitinteger
tab_idstring

query_selector

Check whether a selector exists and return a stable ref for the first match.

ParameterTypeDescription
selector *string
browser_idstring
find_allboolean
tab_idstring
timeoutinteger

element_info

Return detailed information about an element.

ParameterTypeDescription
browser_idstring
refstring
selectorstring
tab_idstring

element_click

Click an element. js=True uses JavaScript click; humanize=True simulates motion.

ParameterTypeDescription
browser_idstring
doubleboolean
humanizeboolean
jsboolean
refstring
rightboolean
selectorstring
tab_idstring
x_offsetinteger
y_offsetinteger

element_type_text

Type text into an element (character by character when humanize=True).

ParameterTypeDescription
text *string
browser_idstring
clear_firstboolean
humanizeboolean
press_enterboolean
refstring
selectorstring
tab_idstring

element_insert_text

Insert text instantly via JavaScript (fast, works with rich editors).

ParameterTypeDescription
text *string
browser_idstring
refstring
selectorstring
tab_idstring

element_clear

Clear an input/textarea/contenteditable element.

ParameterTypeDescription
browser_idstring
refstring
selectorstring
tab_idstring

element_press_key

Press a keyboard key while an element is focused (e.g. Enter, Tab, Escape).

ParameterTypeDescription
key *string
browser_idstring
refstring
selectorstring
tab_idstring

element_select_option

Select an option in a <select> by value, visible label, or index.

ParameterTypeDescription
browser_idstring
indexinteger
labelstring
refstring
selectorstring
tab_idstring
valuestring

element_check

Check or uncheck a checkbox/radio.

ParameterTypeDescription
browser_idstring
checkedboolean
refstring
selectorstring
tab_idstring

element_set_input_files

Attach files to a file input element.

ParameterTypeDescription
files *array
browser_idstring
refstring
selectorstring
tab_idstring

element_get_attribute

Read an attribute value from an element.

ParameterTypeDescription
name *string
browser_idstring
refstring
selectorstring
tab_idstring

element_scroll_into_view

Scroll an element into the viewport.

ParameterTypeDescription
browser_idstring
refstring
selectorstring
tab_idstring

element_hover

Hover over an element with the real mouse.

ParameterTypeDescription
browser_idstring
refstring
selectorstring
tab_idstring

element_screenshot

Screenshot a single element and return it as an image. The element is cropped from a plain capture in Python; the page is never scrolled or modified. If the element is only partially visible, the visible part is captured; if it is outside the viewport an error suggests using tab_screenshot(full_page=True). - scale: zoom on the crop (1.0 = native, 2.0 = pixel-crisp 2x). - grid: [cols, rows] grid drawn on the returned image with absolute viewport coordinates (the same space as mouse_click).

ParameterTypeDescription
browser_idstring
formatstring
grid
pathstring
qualityinteger
refstring
scalenumber
selectorstring
tab_idstring

form_fill

Fill many fields in one call. Each field: {"selector"|"ref": ..., "value": ..., "type": "text|select|checkbox"}. Prefer this over repeated element_* calls for forms.

ParameterTypeDescription
fields *array
browser_idstring
submitboolean
tab_idstring

page_snapshot

Return a compact list of interactive elements with stable refs. Use the returned refs with element_click / element_type_text / form_fill. This is cheaper than a screenshot and gives deterministic targeting.

ParameterTypeDescription
browser_idstring
max_itemsinteger
tab_idstring

page_get_text

Return the visible text of the page (or of a selector).

ParameterTypeDescription
browser_idstring
selectorstring
tab_idstring

page_get_tables

Extract HTML tables as structured rows.

ParameterTypeDescription
browser_idstring
limitinteger
tab_idstring

page_get_metadata

Return title, canonical, description and Open Graph / meta tags.

ParameterTypeDescription
browser_idstring
tab_idstring

network_enable

Start recording network requests for a tab.

ParameterTypeDescription
browser_idstring
tab_idstring

network_disable

Stop recording network requests for a tab.

ParameterTypeDescription
browser_idstring
tab_idstring

network_get_requests

List recorded requests (optionally filtered by URL substring/regex).

ParameterTypeDescription
browser_idstring
filterstring
include_staticboolean
limitinteger
tab_idstring

network_get_request_detail

Return the full recorded payload for a request id.

ParameterTypeDescription
request_id *string
browser_idstring
tab_idstring

network_get_response_body

Fetch the response body for a request id (network events must be enabled).

ParameterTypeDescription
request_id *string
browser_idstring
tab_idstring

network_intercept_enable

Enable request interception. hold=True pauses requests until you continue/fail/fulfill them.

ParameterTypeDescription
browser_idstring
holdboolean
tab_idstring

network_intercept_disable

Disable request interception and release paused requests.

ParameterTypeDescription
browser_idstring
tab_idstring

route_add

Add a network rule. action=fulfill|block|redirect|continue. pattern is a glob (``**/api/users``) or regex. Fulfill returns `status`/`body`.

ParameterTypeDescription
pattern *string
actionstring
bodystring
browser_idstring
content_typestring
headers
redirect_urlstring
statusinteger
tab_idstring

route_list

List active network rules for a tab.

ParameterTypeDescription
browser_idstring
tab_idstring

route_remove

Remove network rules matching a pattern (or all when pattern is empty).

ParameterTypeDescription
browser_idstring
patternstring
tab_idstring

request_continue

Continue a paused request, optionally rewriting URL/method/headers/body.

ParameterTypeDescription
request_id *string
browser_idstring
headers
methodstring
post_datastring
tab_idstring
urlstring

request_fail

Fail a paused request with an error reason.

ParameterTypeDescription
request_id *string
browser_idstring
reasonstring
tab_idstring

request_fulfill

Fulfill a paused request with a synthetic response.

ParameterTypeDescription
request_id *string
bodystring
browser_idstring
content_typestring
statusinteger
tab_idstring

network_pending_list

List requests currently paused by interception (hold mode).

ParameterTypeDescription
browser_idstring
tab_idstring

network_emulate

Emulate network conditions: offline, added latency and throughput throttling. Use -1 for throughput to leave it unthrottled.

ParameterTypeDescription
browser_idstring
download_kbpsinteger
latency_msinteger
offlineboolean
tab_idstring
upload_kbpsinteger

localstorage_get

Get one localStorage value, or all values when key is empty.

ParameterTypeDescription
browser_idstring
keystring
tab_idstring

localstorage_list

List all localStorage key/value pairs.

ParameterTypeDescription
browser_idstring
tab_idstring

localstorage_set

Set a localStorage item.

ParameterTypeDescription
key *string
value *string
browser_idstring
tab_idstring

localstorage_delete

Delete a localStorage item.

ParameterTypeDescription
key *string
browser_idstring
tab_idstring

localstorage_clear

Clear all localStorage for the current origin.

ParameterTypeDescription
browser_idstring
tab_idstring

sessionstorage_get

Get one sessionStorage value, or all values when key is empty.

ParameterTypeDescription
browser_idstring
keystring
tab_idstring

sessionstorage_list

List all sessionStorage key/value pairs.

ParameterTypeDescription
browser_idstring
tab_idstring

sessionstorage_set

Set a sessionStorage item.

ParameterTypeDescription
key *string
value *string
browser_idstring
tab_idstring

sessionstorage_clear

Clear all sessionStorage for the current origin.

ParameterTypeDescription
browser_idstring
tab_idstring

pydoll_modules

Report the active tool profile and enabled modules.

server_info

Return server version, settings summary and running browsers.

batch

Run several tool calls in one round-trip. Each item: {"tool": "find_element", "arguments": {...}}. Calls run in order; a failure is reported per item without aborting the batch.

ParameterTypeDescription
calls *array