mcp-browser-dev-tools
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| CDP_BASE_URL | No | A fixed Chromium debugging endpoint. | |
| MCP_BROWSER_TOOLS | No | Lists additional tool groups, or "all", beyond the default core tool set (e.g. "all" or "network,state"). | |
| MCP_BROWSER_FAMILY | No | The browser family: auto (default), chromium, edge, or firefox. | auto |
| MCP_BROWSER_FFMPEG | No | The ffmpeg executable used by record_video to encode frames (found on PATH by default). | |
| FIREFOX_BIDI_WS_URL | No | A fixed Firefox WebDriver BiDi WebSocket endpoint. | |
| MCP_BROWSER_ENABLE_EVAL | No | Set to 0 to turn off page JavaScript from the agent (evaluate_js and expression conditions). | |
| MCP_BROWSER_USER_DATA_DIR | No | The browser profile directory to launch browsers with. | |
| MCP_BROWSER_ALLOW_REMOTE_ENDPOINTS | No | Set to 1 to allow connecting to non-loopback browser endpoints (by default only loopback is allowed). |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
Start with attach_tab. To act, prefer run_steps: send the actions you already know, such as every field of a form, in one call.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| list_tabsB | List the browser's tabs. |
| ensure_browserA | 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). |
| new_tabB | Open a tab; returns its target id. |
| close_tabB | Close a tab and its session. |
| attach_tabA | 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. |
| wait_forA | 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. |
| navigateC | Load a URL. |
| reloadC | Reload the tab. |
| clickA | 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. |
| hoverB | Move the real mouse pointer to an element's center or x, y. Returns changes. |
| typeB | Type with real text input into an input, textarea, or contenteditable, replacing its content unless clear is false. Returns changes. |
| upload_fileA | 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. |
| selectA | Pick a native option by value or label and fire change events; use click for custom dropdowns. Returns changes. |
| press_keyC | Press a key or combination with real keyboard input on selector (focused first) or the focused element. Returns changes. |
| scrollC | 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). |
| get_console_messagesC | Buffered console messages and exceptions. |
| get_network_requestsD | Buffered network requests. |
| get_snapshotA | 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. |
| read_textB | Visible text of the main content, or of selector, as lines up to maxChars; with links, also its links. |
| take_screenshotB | 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. |
| evaluate_jsC | Run JavaScript in the page; top-level await works, and the last expression's value is returned. |
| run_stepsA | 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 found: false (not inspect_element); the batch stops there unless continueOnError and reports the page's controls. A batch with actions returns one changes for the whole batch. A step that reads the page after an action or navigation first waits for the page to settle, so it needs no sleep. |
| run_tabsA | 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. |
| more_toolsA | 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. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 24 tools
Most tools map to a single distinct action or resource (click, type, hover, select, scroll, press_key vs. get_snapshot, read_text, get_console_messages, get_network_requests), and the descriptions explicitly steer between near-neighbors (get_snapshot is 'far cheaper than get_document or a screenshot'; use click for custom dropdowns instead of select). The main soft spots are the reading tools (get_snapshot / read_text / take_screenshot) which all return page state in different shapes, and the tab trio new_tab / list_tabs / attach_tab plus the meta-tools run_steps / run_tabs / more_tools, which require reading descriptions to pick correctly.
All names are snake_case with a predictable verb_noun or bare-verb style (get_snapshot, list_tabs, run_steps, take_screenshot vs. click, type, hover, navigate). Minor deviations exist: new_tab breaks the get_/list_/close_ pattern it pairs with (would be open_tab/create_tab), and read_text sits awkwardly beside get_snapshot/get_console_messages.
24 tools is on the heavy side, but browser automation genuinely spans tabs, navigation, input, reading, waiting, JS evaluation, and batching, so most tools earn their place. The presence of more_tools to defer drag/cookies/HAR/performance shows deliberate scoping rather than surface bloat.
The core lifecycle is well covered: browser bootstrap (ensure_browser), tab management (new/list/attach/close), navigation, full input surface incl. file upload, state reading (snapshot, text, console, network, screenshot), waiting, JS eval, and batch execution across steps and tabs. Gaps like cookies/storage, request mocking, HAR, and drag are real but reachable through more_tools, so agents are not blocked.