browserctl-mcp
v1.0.3Browser control for AI agents in the user's real Chrome, through an MV3 extension and a local daemon.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
status
Show connected browsers, setup problems, your tabs, and where Chrome's debugging bar comes from. Call it first when a tool reports NO_BROWSER, USER_SCRIPTS_OFF or DEBUGGER_CANCELED.
| Parameter | Type | Description |
|---|---|---|
allowDebugger | boolean | Clear DEBUGGER_CANCELED after asking the user. |
tabs
Manage tabs. action: list | new | select | close | adopt | release. New tabs open in the background and become your current tab. adopt takes an existing tab (e.g. one the user opened) so you can act on it. select with focus: true shows the tab to the user.
| Parameter | Type | Description |
|---|---|---|
action * | string | |
all | boolean | For list: every tab, not only yours. |
browser | string | Browser alias from status, when several are connected. |
focus | boolean | For select: bring the tab and its window to the front. |
force | boolean | For adopt: take a tab another session holds. |
tab | integer | Tab id from tabs list. Default: your current tab. |
url | string | For new: the page to open. |
snapshot
Read the page as an accessibility tree (YAML); each element you can act on has a ref ([ref=e5]) to pass as target to click, type, fill_form, evaluate. A ref stays valid until its element is removed or the page navigates. Extra brackets tell state: [empty], [type=email], [value=42], [near="label"] for unnamed fields, [ctx="..."] to tell identical buttons apart, [modal], [hidden] (no ref: open its menu first). Long lists and long text are folded; each fold line says how to see the rest (read target=eX). target: a ref to read only that part. If the first line says the page is not ready, snapshot…
| Parameter | Type | Description |
|---|---|---|
depth | integer | Cut the tree below this depth. Default: no limit. |
full | boolean | Skip compaction and text folding. |
maxChars | integer | Size budget; long text is folded harder before anything is cut. |
maxText | integer | Characters of running text kept before it is folded. |
tab | integer | Tab id from tabs list. Default: your current tab. |
target | string | Snapshot only this element's subtree. |
read
Read the page (or target) as text: headings, paragraphs, lists, full tables, links, and form fields with their values and refs. main: true skips navigation and footers. Long pages come in slices: pass nextOffset as offset to continue.
| Parameter | Type | Description |
|---|---|---|
links | boolean | Write links as [text](url). |
main | boolean | Only the main content (main, [role=main], or the largest article). |
maxChars | integer | |
offset | integer | |
tab | integer | Tab id from tabs list. Default: your current tab. |
target | string | Read only this element. |
get
Read one thing about an element: what: text (default) | value | attribute | property | html | state | box; name: the attribute or property (href, dataset.id). target: a ref or a locator. all: true returns every match of a selector. Use it instead of evaluate to read a value.
| Parameter | Type | Description |
|---|---|---|
target * | string | A ref (e5) or a locator (#id, label=Email, role=button[name="Save"], ...). |
all | boolean | Every element the selector matches (at most 100) instead of AMBIGUOUS_TARGET. |
maxChars | integer | Cut text and html values. |
name | string | Attribute name, or property path (dataset.id), for what: attribute | property. |
tab | integer | Tab id from tabs list. Default: your current tab. |
timeout | number | Seconds to wait for the target to exist (it need not be visible). |
what | string |
click
Click an element (target: ref or locator). Works in background tabs. trusted: true sends real mouse input for sites that ignore synthetic clicks (shows Chrome's debugging bar). Returns the element hit and what changed (url, new tabs, dialogs, DOM).
| Parameter | Type | Description |
|---|---|---|
target * | string | A ref (e5) or a locator (#id, label=Email, role=button[name="Save"], ...). |
button | string | |
doubleClick | boolean | |
modifiers | array | |
scroll | string | |
tab | integer | Tab id from tabs list. Default: your current tab. |
timeout | number | Seconds to wait for the target. |
trusted | boolean | Real input through Chrome's debugger (shows its debugging bar). |
wait | object | Then wait for one wait_for condition. |
hover
Hover over an element to open its menu or tooltip. Menus that open only through CSS :hover need trusted: true (real pointer; shows Chrome's debugging bar).
| Parameter | Type | Description |
|---|---|---|
target * | string | A ref (e5) or a locator (#id, label=Email, role=button[name="Save"], ...). |
scroll | string | |
tab | integer | Tab id from tabs list. Default: your current tab. |
timeout | number | Seconds to wait for the target. |
trusted | boolean | Real input through Chrome's debugger (shows its debugging bar). |
wait | object | Then wait for one wait_for condition. |
type
Replace the text of an input, textarea or rich-text field. target: a ref or selector. submit: true presses Enter after. slowly: true types key by key for autocomplete fields. Returns the field's value afterwards.
| Parameter | Type | Description |
|---|---|---|
target * | string | A ref (e5) or a locator (#id, label=Email, role=button[name="Save"], ...). |
text * | string | |
scroll | string | |
slowly | boolean | |
submit | boolean | |
tab | integer | Tab id from tabs list. Default: your current tab. |
timeout | number | Seconds to wait for the target. |
trusted | boolean | Real input through Chrome's debugger (shows its debugging bar). |
wait | object | Then wait for one wait_for condition. |
fill_form
Set several form controls at once: fields: [{target, value}]. value is a string for text fields and selects (option value or label), true/false for checkboxes, radios and switches, a list for multi-selects. Stops at the first field that fails and says which.
| Parameter | Type | Description |
|---|---|---|
fields * | array | |
scroll | string | |
tab | integer | Tab id from tabs list. Default: your current tab. |
timeout | number | Seconds to wait for the target. |
trusted | boolean | Real input through Chrome's debugger (shows its debugging bar). |
wait | object | Then wait for one wait_for condition. |
press_key
Press a key or chord (Enter, Escape, Tab, ArrowDown, Control+A) on target or on the focused element. Enter submits forms, Tab moves focus. trusted: true for keys a site handles only from real keyboards.
| Parameter | Type | Description |
|---|---|---|
key * | string | |
tab | integer | Tab id from tabs list. Default: your current tab. |
target | string | Optional: element to press on; default the focused one. |
timeout | number | Seconds to wait for the target. |
trusted | boolean | Real input through Chrome's debugger (shows its debugging bar). |
wait | object | Then wait for one wait_for condition. |
scroll
Scroll the page or a container (target), by direction and amount, or to: top | bottom; or bring target into view. Reports whether the end was reached and whether more content loaded. trusted: true uses real wheel input, needed for lazy loading in background tabs.
| Parameter | Type | Description |
|---|---|---|
amount | number | |
direction | string | |
tab | integer | Tab id from tabs list. Default: your current tab. |
target | string | A scrollable container, or an element to bring into view. |
timeout | number | Seconds to wait for the target. |
to | string | |
trusted | boolean | Real input through Chrome's debugger (shows its debugging bar). |
wait | object | Then wait for one wait_for condition. |
wait_for
Wait for text to appear (text) or disappear (textGone), for target to become visible / hidden / attached / detached, for the URL to match (url), or for time seconds. timeout defaults to 10 s.
| Parameter | Type | Description |
|---|---|---|
state | string | |
tab | integer | Tab id from tabs list. Default: your current tab. |
target | string | A ref (e5) or a locator (#id, label=Email, role=button[name="Save"], ...). |
text | string | |
textGone | string | |
time | number | |
timeout | number | |
url | string | Substring of the URL, or /regex/. |
take_screenshot
Screenshot the viewport, the full page (fullPage: true) or one element (target). Saved to a file; the path is returned. Background tabs and full pages use Chrome's debugging bar briefly.
| Parameter | Type | Description |
|---|---|---|
format | string | Default: from path's extension, else jpeg. |
fullPage | boolean | |
path | string | Absolute path to save to. |
tab | integer | Tab id from tabs list. Default: your current tab. |
target | string | A ref (e5) or a locator (#id, label=Email, role=button[name="Save"], ...). |
file_upload
Attach local files (absolute paths) to a file input or to the upload button that opens a file chooser. paths: [] clears it. Returns the files as the page sees them.
| Parameter | Type | Description |
|---|---|---|
paths * | array | |
target * | string | A ref (e5) or a locator (#id, label=Email, role=button[name="Save"], ...). |
tab | integer | Tab id from tabs list. Default: your current tab. |
timeout | number | Seconds to wait for the target. |
wait | object | Then wait for one wait_for condition. |
handle_dialog
Set how dialogs in your tab are answered: accept: true/false, promptText, scope: next | always. By default alert is accepted and confirm/prompt are dismissed; actions report each dialog and the answer given. To accept a dismissed confirm, call this and repeat the action.
| Parameter | Type | Description |
|---|---|---|
accept * | boolean | |
promptText | string | |
scope | string | |
tab | integer | Tab id from tabs list. Default: your current tab. |
evaluate
Run JavaScript in the page (page globals available). function: "() => document.title", or "(el) => el.value" with target: a ref. Promises are awaited (timeout). action: true when the code changes the page: outcome after it reacts, like click. Use it whenever no other tool fits.
| Parameter | Type | Description |
|---|---|---|
function * | string | |
action | boolean | |
tab | integer | Tab id from tabs list. Default: your current tab. |
target | string | A ref (e5) or a locator (#id, label=Email, role=button[name="Save"], ...). |
timeout | number | |
trusted | boolean | Real input through Chrome's debugger (shows its debugging bar). |
run
Run Playwright code for anything the other tools do not cover (drag, coordinates, routes, cookies, emulation, loops). page, context and a persistent state object are in scope; return a value. Shows Chrome's debugging bar while running.
| Parameter | Type | Description |
|---|---|---|
code * | string | |
tab | integer | Tab id from tabs list. Default: your current tab. |
timeout | number |
network_requests
List the tab's network requests (filter, types, since, limit) or one request's details (id). Response bodies need captureBodies: true first (shows Chrome's debugging bar until turned off). To call an API with the page's cookies, use evaluate with fetch.
| Parameter | Type | Description |
|---|---|---|
body | boolean | |
captureBodies | boolean | |
filter | string | Substring of the URL, or /regex/. |
id | integer | |
limit | integer | |
since | integer | |
tab | integer | Tab id from tabs list. Default: your current tab. |
types | array | xhr covers fetch too. |