mcp-browser-dev-tools
v0.5.9MCP server for browser use: batch clicks, typing, waits, checks in one call on Chrome, Edge, Firefox
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
list_tabs
List the browser's tabs.
ensure_browser
Reuse a reachable browser or launch one (with the MCP_BROWSER_USER_DATA_DIR profile when set), optionally opening url in a new tab. It never launches twice on one profile (except from WSL).
| Parameter | Type | Description |
|---|---|---|
browserFamily * | string | Required in auto mode. |
address | string | Chromium/Edge bind address; loopback unless MCP_BROWSER_ALLOW_REMOTE_ENDPOINTS=1. |
createTab | boolean | Default: true when url is given. |
launchIfMissing | boolean | Launch when none is reachable (default true). |
port | integer | Debugging port (default: the configured endpoint's, usually 9222). |
skipDoctor | boolean | Return right after spawning, without waiting or a doctor report. |
url | string | Open this in a new tab. |
userDataDir | string | Profile for a new launch (default MCP_BROWSER_USER_DATA_DIR). |
waitMs | integer | ms to wait for the endpoint after launch (default 5000). |
new_tab
Open a tab; returns its target id.
| Parameter | Type | Description |
|---|---|---|
browserFamily * | string | Required in auto mode. |
url | string | Default about:blank. |
close_tab
Close a tab and its session.
| Parameter | Type | Description |
|---|---|---|
targetId * | string | From list_tabs or new_tab. |
attach_tab
Start here: attach to a tab by its url, or a targetId from list_tabs or new_tab. Returns the page's snapshot, one line per visible heading and control with a ref such as e12 (f1e3 inside an iframe), and buffers the tab's console and network events from now on. Later calls without sessionId act on the tab attached last.
| Parameter | Type | Description |
|---|---|---|
targetId | string | From list_tabs or new_tab. |
url | string | Instead of targetId: the tab whose URL is this, else the one whose URL contains it. |
wait_for
Wait until every given condition holds, or the first of anyOf; at timeoutMs it fails with the last observed state. Selector checks scroll the element into view. Actions already return what changed once the page settles, so wait only for something that comes later.
| Parameter | Type | Description |
|---|---|---|
anyOf | array | Conditions with the fields above, instead of them; holds when any holds (result: matchedIndex). |
expression | string | Page JavaScript; holds when its (awaited) result is truthy. Throwing fails. |
pollIntervalMs | integer | ms between checks (default 100). |
readyState | string | document.readyState is at least this. |
selector | string | Locator: ref=e3, CSS, text=…, role=button[name="…"], name=…, or a >> b |
sessionId | string | |
state | string | With selector (default visible); hidden means absent or not visible. |
textEquals | string | The selector's visible text equals this (whitespace collapsed). |
textExcludes | string | The selector's visible text no longer contains this; false for a missing element. |
textIncludes | string | The selector's visible text contains this. |
timeoutMs | integer | ms before failing (default 10000). |
url | string | Page URL equals this. |
urlIncludes | string | Page URL contains this. |
reload
Reload the tab.
| Parameter | Type | Description |
|---|---|---|
ignoreCache | boolean | Bypass the cache. |
sessionId | string | |
waitUntil | string | Return at none (navigation started), interactive (DOMContentLoaded), or complete (load; default). |
click
Click with real mouse input at an element's center (fails if something covers it) or at x, y. Accepts alert and confirm dialogs, dismisses prompts. Returns changes: what changed on the page. Locators in every tool are case-sensitive: ref=e12 until the page navigates; CSS; text=Foo and name=Foo, the first visible element whose text or accessible name equals, else contains, Foo (a label finds its control); role=button[name="Save"]; a >> b for b inside a, and has-text=Foo to filter: tr >> has-text=Ada >> text=Delete. Only refs reach into iframes.
| Parameter | Type | Description |
|---|---|---|
button | string | Default left. |
clickCount | integer | 2 for a double click. |
selector | string | Locator: ref=e3, CSS, text=…, role=button[name="…"], name=…, or a >> b |
sessionId | string | |
timeoutMs | integer | ms to retry while the element is missing, covered, outside the viewport, or disabled (default 2000). |
x | number | Viewport CSS px, with y, instead of selector. |
y | number |
hover
Move the real mouse pointer to an element's center or x, y. Returns changes.
| Parameter | Type | Description |
|---|---|---|
selector | string | Locator: ref=e3, CSS, text=…, role=button[name="…"], name=…, or a >> b |
sessionId | string | |
timeoutMs | integer | ms to retry while the element is missing, covered, or outside the viewport (default 2000). |
x | number | Viewport CSS px, with y, instead of selector. |
y | number |
type
Type with real text input into an input, textarea, or contenteditable, replacing its content unless clear is false. Returns changes.
| Parameter | Type | Description |
|---|---|---|
selector * | string | Locator: ref=e3, CSS, text=…, role=button[name="…"], name=…, or a >> b |
text * | string | Each newline presses Enter. Picker inputs (date, time, datetime-local, month, week, color, range) take their value format, e.g. 2026-09-27. |
clear | boolean | false appends (default true); picker inputs are always replaced. |
sessionId | string | |
timeoutMs | integer | ms to retry while the element is missing (default 2000). |
upload_file
Set files on a file input (or its label, or an element holding one; on Chromium also a button that opens a file chooser) and fire change events. Files must be in the working or temp directory or MCP_BROWSER_UPLOAD_DIRS. Returns changes.
| Parameter | Type | Description |
|---|---|---|
paths * | array | Absolute file paths; [] clears the input. |
selector * | string | Locator: ref=e3, CSS, text=…, role=button[name="…"], name=…, or a >> b |
sessionId | string | |
timeoutMs | integer | ms to retry while the element is missing (default 2000). |
select
Pick a native <select> option by value or label and fire change events; use click for custom dropdowns. Returns changes.
| Parameter | Type | Description |
|---|---|---|
selector * | string | Locator: ref=e3, CSS, text=…, role=button[name="…"], name=…, or a >> b |
label | string | Text the option contains. |
sessionId | string | |
timeoutMs | integer | ms to retry while the element is missing (default 2000). |
value | string | Option value or full text. |
press_key
Press a key or combination with real keyboard input on selector (focused first) or the focused element. Returns changes.
| Parameter | Type | Description |
|---|---|---|
key * | string | A character or key name (Enter, Tab, Escape, ArrowDown, PageUp, F5, ...); join modifiers with +, e.g. Shift+Tab, Meta+a. |
selector | string | Locator: ref=e3, CSS, text=…, role=button[name="…"], name=…, or a >> b |
sessionId | string | |
timeoutMs | integer | ms to retry while the element is missing (default 2000). |
scroll
Scroll the page by deltas, an element into view, or with a real wheel at x, y or over selector with deltas (scrolls what is under the pointer).
| Parameter | Type | Description |
|---|---|---|
block | string | Default center. |
deltaX | integer | CSS px; negative is left. |
deltaY | integer | CSS px; negative is up. |
selector | string | Locator: ref=e3, CSS, text=…, role=button[name="…"], name=…, or a >> b |
sessionId | string | |
x | number | Viewport CSS px, with y, instead of selector. |
y | number |
get_console_messages
Buffered console messages and exceptions.
| Parameter | Type | Description |
|---|---|---|
limit | integer | Most recent N (default 50). |
sessionId | string |
get_network_requests
Buffered network requests.
| Parameter | Type | Description |
|---|---|---|
limit | integer | Most recent N (default 50). |
sessionId | string |
get_snapshot
List visible headings and controls, one line each with a ref, role, name, and state, e.g. e3 textbox "Email" value="ada@example.com". ref=e3 works as any tool's selector until the page navigates; controls inside iframes get refs like f1e3. Far cheaper than get_document or a screenshot.
| Parameter | Type | Description |
|---|---|---|
headings | boolean | Default true. |
limit | integer | Default 100. |
selector | string | Only inside this element. |
sessionId | string |
read_text
Visible text of the main content, or of selector, as lines up to maxChars; with links, also its links.
| Parameter | Type | Description |
|---|---|---|
links | boolean | Also list http(s) links (default false). |
maxChars | integer | Default 8000. |
maxLinks | integer | Default 50. |
selector | string | Locator: ref=e3, CSS, text=…, role=button[name="…"], name=…, or a >> b |
sessionId | string |
take_screenshot
Screenshot the page or selector: base64 in the JSON (output data, default), image content (image), or a file (file, or path). cssRect and scale convert image pixels to x, y.
| Parameter | Type | Description |
|---|---|---|
format | string | Default png; must match path's extension. |
output | string | Default data; file when path is given. |
overwrite | boolean | Replace an existing file. |
path | string | Absolute, ending in .png, .jpg, .jpeg, .webp; default a temp file. |
selector | string | Locator: ref=e3, CSS, text=…, role=button[name="…"], name=…, or a >> b |
sessionId | string |
evaluate_js
Run JavaScript in the page; top-level await works, and the last expression's value is returned.
| Parameter | Type | Description |
|---|---|---|
expression * | string | JavaScript. |
awaitPromise | boolean | Default true. |
returnByValue | boolean | JSON value (default true); false gives a short description (Chromium only). |
sessionId | string |
run_steps
Run session tools in order in one call; prefer it to separate calls for the actions you already know, such as every field of a form: [{"tool":"type","arguments":{"selector":"ref=e3","text":"Ada"}},{"tool":"click","arguments":{"selector":"text=Save"}}]. Arguments omit sessionId. Also: sleep {ms}; if {condition, then, elseIf: [{condition, then}], else, timeoutMs}, which branches on wait_for fields, checked once or until one holds within timeoutMs; repeat {steps, until, max (default 5)}, which reruns steps until until holds. All steps are validated first. A step fails when it throws or reports fo…
| Parameter | Type | Description |
|---|---|---|
steps * | array | At most 50, counting nested steps. |
continueOnError | boolean | Default false. |
sessionId | string |
run_tabs
Run steps in several tabs at once and get every tab's results in one reply: {"tabs":[{"url":"https://a.example","steps":[{"tool":"read_text"}]},{"url":"https://b.example","steps":[{"tool":"read_text"}]}]}. A url tab opens, runs its steps, and closes unless keepTabs; a sessionId tab uses that session. Steps are as in run_steps. A tab that fails or passes timeoutMs does not stop the others.
| Parameter | Type | Description |
|---|---|---|
tabs * | array | At most 8, each with url or sessionId, and steps. |
browserFamily | string | Required for url tabs in auto mode. |
concurrency | integer | Tabs at once (default all). |
continueOnError | boolean | Within each tab (default false). |
keepTabs | boolean | Keep url tabs open and attached (default false). |
timeoutMs | integer | ms per tab (default 60000). |
more_tools
Tools not listed here to keep each turn small: drag, cookies and storage, request mocking, HAR, performance, and more. No arguments lists them; name describes one; name with arguments calls it. They also work as run_steps steps.
| Parameter | Type | Description |
|---|---|---|
arguments | object | Call the tool with these arguments. |
name | string |