@raultov/browser-control-mcp 0.8.0-beta.12 → 0.10.0-beta.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -10,6 +10,116 @@ from a copy of its code: entries describe the differences from that release.
10
10
 
11
11
  ## [Unreleased]
12
12
 
13
+ ## [0.10.0-beta.14] - 2026-11-01
14
+
15
+ Public **BETA**. `emulate` gains `user_agent`, `locale`, `timezone` and
16
+ `geolocation` on both browsers, and each call now adds to the earlier ones;
17
+ input actions say when they opened a tab; `evaluate_js` takes top-level
18
+ `await`; Chrome's snapshot reads closed shadow roots. Behaviour changes:
19
+ `navigate` and `reload` fail at once when the page pauses at a breakpoint or
20
+ opens a dialog while loading (Chrome waited 30 s); with a modal `<dialog>`
21
+ open, `snapshot` lists only the dialog; on Firefox a navigation that becomes
22
+ a download fails, as on Chrome; `emulate`'s reply has `user_agent`, `locale`
23
+ and `timezone`.
24
+
25
+ ### Fixed
26
+
27
+ - Chrome: `snapshot` and `find_in_snapshot` read closed shadow roots (some
28
+ design systems and third-party widgets), whose elements were invisible:
29
+ Chrome finds them (`DOM.describeNode` with `pierce`) and hands them to
30
+ the outline for that call only, so the page's own scripts never get them;
31
+ their elements are then reached by ref like any other. Pages up to 20 000
32
+ elements; `host >>> inner` selectors still stop at a closed root. Firefox
33
+ has no equivalent: there they stay out of reach. (#42)
34
+ - Firefox: `navigate` to a URL Firefox saves rather than opens (a type such
35
+ as CSV, without `Content-Disposition: attachment`) answered "Navigated
36
+ to" the previous page; it now fails as a download, as on Chrome, from
37
+ Firefox's `browsingContext.downloadWillBegin`. (#39)
38
+ - `evaluate_js` takes `await` at the top level (`const r = await
39
+ fetch(u); r.json()`), answering the last statement's value as a console
40
+ does: it failed with a SyntaxError on both browsers. A symbol is described
41
+ as `Symbol(x)` on both (Firefox answered an empty object), and a function
42
+ on Chrome by its code (it answered `{}`). (#43)
43
+ - `emulate`: each call adds to the earlier ones, for every option (Chrome
44
+ kept an earlier viewport but dropped the earlier media settings), and it
45
+ emulates `user_agent`, `locale`, `timezone` and `geolocation` on both
46
+ browsers (the page is granted the geolocation permission, and the reply
47
+ says the position it reads). An unknown time zone or locale fails without
48
+ changing anything (Chrome kept the old zone silently). (#43)
49
+ - `click_element`, `press_key` and the other input tools say when the
50
+ action opened tabs (a `target=_blank` link, `window.open`), naming each
51
+ with its URL: the new tab was registered, but nothing told the agent to
52
+ look at it. (#41)
53
+ - `snapshot` and `find_in_snapshot` show `<progress>` and `<meter>`
54
+ (`progressbar`, `meter`, with their value as `40/100`), say whether a
55
+ `<details>` summary is expanded, mark an open modal `<dialog>` `[modal]`,
56
+ and leave out what the page made inert: `inert` subtrees and, while a
57
+ modal dialog is open, everything outside it (it was listed, and clicking
58
+ it failed as covered). (#40)
59
+ - Chrome: `navigate` and `reload` to a page that pauses at a breakpoint
60
+ while it loads (in the page or in a frame of another origin) waited the
61
+ whole 30 s, then answered as if the page were slow. They now fail at once
62
+ naming where it paused, as on Firefox; `resume` lets the page finish
63
+ loading. A page opening a dialog while it loads (`alert()` in an inline
64
+ script) fails at once too, pointing to `handle_dialog`. (#45)
65
+
66
+ ## [0.9.0-beta.13] - 2026-11-01
67
+
68
+ Public **BETA**. Frames of another origin are now observed and debugged, not
69
+ only read and acted in: on Chrome their console messages and requests (bodies
70
+ included) join the tab's logs, and on both browsers the debugger searches their
71
+ scripts, binds breakpoints in them and pauses, steps and resumes there.
72
+ Behaviour changes: a click on a disabled control now fails instead of reporting
73
+ success, a pointer action waits up to 2 s for its element to appear or be
74
+ enabled, date, time, range and colour inputs get their value set rather than
75
+ typed, and on Chrome the scripts of such frames have ids naming the frame
76
+ (`2.17`).
77
+
78
+ ### Fixed
79
+
80
+ - Chrome: `get_console_logs` and `get_network_logs` now include the
81
+ console messages and requests of frames of another origin (payment forms,
82
+ widgets, ads), which run in a process of their own and were missing:
83
+ each tab attaches to its frames as they appear, before their scripts run,
84
+ and feeds their messages and requests to the tab's logs (at most 50
85
+ frames per tab). Their response bodies are read from the frame. Firefox
86
+ already reported them. (#36)
87
+ - Chrome: the debugger now reaches the scripts of frames of another
88
+ origin. `search_scripts` finds them (their ids name the frame, `2.17`,
89
+ as each frame numbers its scripts like the page), `set_breakpoint` by URL
90
+ or hash binds in every frame (also frames that load later, before their
91
+ scripts run) and by script id in its frame, and a pause in a frame is
92
+ reported to the call that caused it, inspected, stepped and resumed
93
+ there. A frame's own `debugger;` statements are skipped without
94
+ breakpoints, as the page's. (#36)
95
+ - Firefox: the debugger reaches the scripts of frames of another origin too
96
+ (Firefox runs them in their own process, with their own thread):
97
+ `search_scripts` finds them, `set_breakpoint` by URL binds in them, and a
98
+ pause in a frame is inspected, stepped and resumed in its thread. Needs
99
+ `bidi-lite` 0.1.5 through `bidi-browser-lite` 0.1.6. (#36)
100
+ - Chrome: a click (or any mouse action) into a frame of another origin
101
+ right after the page loaded was sometimes lost while reported as done:
102
+ Chrome routes input to such an out-of-process frame only once it has
103
+ registered it, and until then the parent page got the event on the
104
+ `<iframe>`. Before the first mouse event into such a frame, the mouse now
105
+ moves to the point until the frame sees it (at most about 1 s). (#44)
106
+ - `fill_input` and `fill_form` set `date`, `time`, `datetime-local`,
107
+ `month`, `week`, `range` and `color` inputs: the text was typed into the
108
+ date's segments (Chrome held `61031-02-02` for `2026-10-31`; Firefox left
109
+ it empty), and range and colour inputs were refused. The value is now set
110
+ through the input's native setter, with `input` and `change` events, in
111
+ the format each type expects (`YYYY-MM-DD`, `HH:MM`, a number,
112
+ `#rrggbb`); a range that snaps the value to its step or bounds is noted,
113
+ and a malformed value fails naming the format, leaving the old one. (#38)
114
+ - `click_element`, `drag` and the checkboxes of `fill_form` no longer
115
+ report success on a disabled control: its click handler never runs, so
116
+ they now fail with "is disabled; nothing was clicked" and send no input.
117
+ They also wait up to 2 s for an element a CSS selector does not find yet,
118
+ or a control that is disabled, as pages add elements and enable buttons a
119
+ moment after the previous action; the error says how long it waited. A
120
+ ref that names nothing, a hidden or a covered element still fail at once,
121
+ and `hover` on a disabled control works as before. (#37)
122
+
13
123
  ## [0.8.0-beta.12] - 2026-10-31
14
124
 
15
125
  Public **BETA**. Reaches into frames of another origin (payment forms,
package/README.md CHANGED
@@ -13,7 +13,7 @@ It is the successor of
13
13
  from a copy of its code) and complements Playwright MCP or
14
14
  chrome-devtools-mcp with runtime JavaScript debugging on both browsers.
15
15
 
16
- > **Status: BETA (0.8.0-beta.12).** This version contains known bugs and differences
16
+ > **Status: BETA (0.10.0-beta.14).** This version contains known bugs and differences
17
17
  > between Chrome and Firefox (see [Limitations and TODO](#limitations-and-todo))
18
18
  > and parts that have not been verified (see [Untested](#untested)). Tool
19
19
  > replies may change in incompatible ways before 1.0. Please report problems
@@ -37,7 +37,7 @@ Tokens are estimated as characters / 4 for every server.
37
37
  | Firefox | **✓ next to Chrome, same tools** | ✓ one browser per server | ✗ |
38
38
  | Several browsers and instances at once | **✓** | ✗ | ✗ |
39
39
  | Selectors | CSS, snapshot refs, `host >>> inner` into shadow roots and iframes | CSS, snapshot refs | snapshot refs only |
40
- | Frames of another origin (payment forms, embedded editors) | ✓ in the snapshot, refs `f2e5` for every input tool | ✓ refs `f1e5` | ✗ |
40
+ | Frames of another origin (payment forms, embedded editors) | ✓ in the snapshot, refs `f2e5` for every input tool, their console and network in the tab's logs | ✓ refs `f1e5` | ✗ |
41
41
  | Snapshot of a long page | **bounded at 50 000 characters**, `find_in_snapshot` searches the rest | unbounded | unbounded |
42
42
  | Waits for the page to react after an action | ✓ ~50 ms when nothing reacts | ✓ ~500 ms | ✓ ~200 ms |
43
43
  | Clicking a covered or hidden element | **fails at once, naming the overlay** | fails after a 5 s timeout | reports success (the overlay gets the click) |
@@ -119,25 +119,25 @@ see the note.
119
119
  | `close_tab` | ✓ | ✓ | |
120
120
  | `list_tabs` | ✓ | ✓ | |
121
121
  | `switch_tab` | ✓ | ✓ | |
122
- | `navigate` | ✓ | ✓ | `history: "back"` or `"forward"` instead of `url` moves one entry in the tab's history and waits for the page to load (also when it comes from the back-forward cache, which fires no `load`); at either end it fails without moving |
123
- | `reload` | ✓ | ✓ | |
122
+ | `navigate` | ✓ | ✓ | `history: "back"` or `"forward"` instead of `url` moves one entry in the tab's history and waits for the page to load (also when it comes from the back-forward cache, which fires no `load`); at either end it fails without moving; a URL the browser saves instead of opening (a download: `Content-Disposition: attachment`, or a type such as CSV) fails saying so, and the tab stays where it was; a page that pauses at a breakpoint or opens a dialog while loading fails at once naming it (see `resume`, `handle_dialog`) |
123
+ | `reload` | ✓ | ✓ | a pause or a dialog while loading fails at once, as with `navigate` |
124
124
  | `scroll` | ✓ | ✓ | reports the window positions before and after |
125
- | `emulate` | ✓ | partial | `emulation` group; `width`/`height`, `device_scale_factor`, `mobile` (touch), `color_scheme`, `reduced_motion`, `forced_colors`, `media` (`print`), `reset`; answers what the page now sees; Firefox: viewport and device pixel ratio only (BiDi has no media or touch emulation yet; those options fail naming them) |
125
+ | `emulate` | ✓ | partial | `emulation` group; `width`/`height`, `device_scale_factor`, `mobile` (touch), `color_scheme`, `reduced_motion`, `forced_colors`, `media` (`print`), `user_agent`, `locale`, `timezone` (checked by the page's `Intl` first), `geolocation` (the page is granted the permission to read it), `reset`; each call adds to the earlier ones; answers what the page now sees (with the position it reads); Firefox: no `mobile` or media options (BiDi has no media or touch emulation yet; they fail naming them) |
126
126
  | `wait_for` | ✓ | ✓ | waits (checking every 100 ms, at most 30 s) until a visible text appears or is gone, a selector is `visible` / `hidden` / `attached` / `detached`, or the URL contains a text; a dialog or debugger pause ends the wait at once |
127
127
  | `inspect_dom` | ✓ | ✓ | includes open shadow roots and same-origin iframes (cross-origin ones are noted); at most 100 000 characters without `query` (cut in the page) |
128
- | `snapshot` | ✓ | ✓ | outline of the page: role, name, states, value and a ref (`e12`) per element, through open shadow roots and same-origin iframes; frames of another origin are read too (at most 20, 5 deep), their iframe marked `[frame=f2]` and their refs prefixed (`f2e5`), and `selector: "f2"` outlines one; tables without headers (`th`, `thead`, `caption`) are layout and leave only their content, and a cell is named by its text only when it holds nothing else; comboboxes, spinbuttons and sliders built with ARIA show their value (the field's text, `aria-valuetext` or `aria-valuenow`, the option a button-like combobox shows); an element that is only clickable (a handler or a pointer cursor) is one named line, unless it holds links, buttons or fields, which are listed under it; at most 50 000 characters (`selector` and `depth` narrow it); the same JavaScript on both browsers |
128
+ | `snapshot` | ✓ | ✓ | outline of the page: role, name, states, value and a ref (`e12`) per element, through open shadow roots and same-origin iframes, and on Chrome closed shadow roots too (pages up to 20 000 elements; their elements are reached by ref, not by `>>>`); frames of another origin are read too (at most 20, 5 deep), their iframe marked `[frame=f2]` and their refs prefixed (`f2e5`), and `selector: "f2"` outlines one; tables without headers (`th`, `thead`, `caption`) are layout and leave only their content, and a cell is named by its text only when it holds nothing else; comboboxes, spinbuttons and sliders built with ARIA show their value (the field's text, `aria-valuetext` or `aria-valuenow`, the option a button-like combobox shows), progress bars and meters theirs (`40/100`), and a `<details>` summary `[expanded=true|false]`; what the page made inert is left out: `inert` subtrees and, while a modal `<dialog>` is open (marked `[modal]`), everything outside it; an element that is only clickable (a handler or a pointer cursor) is one named line, unless it holds links, buttons or fields, which are listed under it; at most 50 000 characters (`selector` and `depth` narrow it); the same JavaScript on both browsers |
129
129
  | `find_in_snapshot` | ✓ | ✓ | `text` (case-insensitive) or `regex` over the whole outline; matching lines under their ancestors, at most 20 |
130
130
  | `save_pdf` | ✓ | ✓ | `files` group; prints the tab as the browser's print does (`landscape`, `print_background`, `scale` 0.1–2, `page_ranges` like `1-3, 5`); with `path` (an absolute `.pdf` under the upload roots) writes the file and answers `{path, bytes, pages}`, else returns the PDF as an embedded `application/pdf` resource (at most 5 MB); Chrome `Page.printToPDF`, Firefox `browsingContext.print` |
131
131
  | `capture_screenshot` | ✓ | ✓ | `format` `png`, `jpeg` (or `jpg`) or `webp`; `full_page` at most 16 384 px per side (a text note says when cut); `selector` captures one element (CSS, `host >>> inner` or a snapshot ref), scrolled into view, whole even when taller than the viewport |
132
- | `click_element` | ✓ | ✓ | scrolls the element into view; `button` (left/right/middle), `click_count` (2 = double click) and `modifiers`; fails without clicking when it is hidden or covered (its own label on top does not count: styled checkboxes and switches are clicked through it; a covered element first gets the mouse, so controls shown only on hover are revealed and clicked); `host >>> inner` selectors reach open shadow roots and same-origin iframes (also in `fill_input`, `scroll`, `wait_for`); a dialog or debugger pause the click causes is noted in a successful reply (`{dialog}` or `{paused, location}`) |
133
- | `fill_input` | ✓ | ✓ | picks `<select>` options; fails without typing on elements that cannot take the text; `append: true` types after the content instead of replacing it (a number, email or date field, which has no caret, is retyped whole); an editor of its own (an element with an `EditContext` or a focusable `textbox` role, or the hidden input of a code editor such as Monaco or Ace) gets the keys a user presses: a click on the editor when its input has no visible box, Control+A (Command+A on macOS) or Control+End, then the text, and the reply says its content could not be checked; in a contenteditable element (including rich text editors such as Slate, Lexical, ProseMirror or CodeMirror 6) it selects the content (a range, then Control+A as a user would) and types over it, so the editor records the edit; types key by key on both (key handlers run; newlines and tabs inserted as text), about 1 ms per character; `change` on leaving the field, or at the end when the window has no focus |
132
+ | `click_element` | ✓ | ✓ | scrolls the element into view; `button` (left/right/middle), `click_count` (2 = double click) and `modifiers`; fails without clicking when it is hidden, covered (its own label on top does not count: styled checkboxes and switches are clicked through it; a covered element first gets the mouse, so controls shown only on hover are revealed and clicked) or a disabled control, whose handler would never run; an element a CSS selector does not find yet, or a disabled control, is checked again for up to 2 s, as pages add elements and enable buttons a moment after the previous action (a ref that names nothing, a hidden or a covered element fail at once); `host >>> inner` selectors reach open shadow roots and same-origin iframes (also in `fill_input`, `scroll`, `wait_for`); a dialog or debugger pause the click causes is noted in a successful reply (`{dialog}` or `{paused, location}`) |
133
+ | `fill_input` | ✓ | ✓ | picks `<select>` options; sets `date`, `time`, `datetime-local`, `month`, `week`, `range` and `color` inputs to the text in their own format (`2026-10-31`, `13:45`, `72`, `#ff0000`), firing `input` and `change`, noting a value the input adjusted (a range snaps to its step) and failing, without changing it, on a malformed one; fails without typing on elements that cannot take the text; `append: true` types after the content instead of replacing it (a number or email field, which has no caret, is retyped whole); an editor of its own (an element with an `EditContext` or a focusable `textbox` role, or the hidden input of a code editor such as Monaco or Ace) gets the keys a user presses: a click on the editor when its input has no visible box, Control+A (Command+A on macOS) or Control+End, then the text, and the reply says its content could not be checked; in a contenteditable element (including rich text editors such as Slate, Lexical, ProseMirror or CodeMirror 6) it selects the content (a range, then Control+A as a user would) and types over it, so the editor records the edit; types key by key on both (key handlers run; newlines and tabs inserted as text), about 1 ms per character; `change` on leaving the field, or at the end when the window has no focus |
134
134
  | `press_key` | ✓ | ✓ | one key (a character, Enter, Tab, Escape, arrows, F1–F12...) with Control / Shift / Alt / Meta held, in `selector` (focused first) or the focused element; a shortcut types nothing |
135
135
  | `hover` | ✓ | ✓ | moves the mouse over the element (scrolled into view; fails when hidden or covered) |
136
136
  | `drag` | ✓ | ✓ | presses on `from` (checked like `click_element`), moves in steps to the centre of `to` (which must then be in the viewport) and releases: sortable lists, boards, sliders; HTML5 drag and drop is real on Chrome and simulated with script events on Firefox (its WebDriver input starts a native drag but never drops it), and the reply says so |
137
137
  | `fill_form` | ✓ | ✓ | several fields in one call: text and `<select>` as `fill_input`, a checkbox or radio takes `true`/`false` and is clicked only when its state differs; stops at the first failing field naming what was done; never echoes values |
138
138
  | `upload_file` | ✓ | ✓ | `files` group; sets the files of an `<input type=file>` (Chrome `DOM.setFileInputFiles`, Firefox `input.setFiles`); files must be under the upload roots (`--upload-root`, default the working and temp directories) |
139
139
  | `handle_dialog` | ✓ | ✓ | accepts or dismisses the open `alert` / `confirm` / `prompt` / `beforeunload` dialog |
140
- | `evaluate_js` | ✓ | ✓ | `value` at most 100 000 characters (`truncated: true`); Chrome stops a script after 8 s, Firefox cannot (a looping tab is closed with `close_tab`) |
140
+ | `evaluate_js` | ✓ | ✓ | `await` at the top level (`const r = await fetch(u); r.json()`), as in a console; `value` at most 100 000 characters (`truncated: true`); symbols and functions are described; Chrome stops a script after 8 s, Firefox cannot (a looping tab is closed with `close_tab`) |
141
141
  | `cookies` | ✓ | ✓ | `storage` group; `get` / `set` / `delete`: the cookies sent to the page (or `url`) or of a `domain`; values hidden unless `show_values: true` (Chrome `Network.*Cookie*`, Firefox BiDi `storage.*` in the tab's partition) |
142
142
  | `web_storage` | ✓ | ✓ | `storage` group; `get` / `set` / `delete` / `clear` on the page's `localStorage` or `sessionStorage`; values hidden unless `show_values: true` |
143
143
  | `get_console_logs` | ✓ | ✓ | one line per message, oldest first: `[level] text @ url:line` (lines from 1), objects and arrays previewed as the console shows them (`{n: 1}`, `[1, 2, 3]`), repeats in a row folded (`[x3]`), uncaught errors marked with up to 5 stack lines indented; `include_details: true` gives the JSON with every field; a message keeps at most 10 000 characters; Firefox: page errors, CSS warnings and platform messages need the debugger port |
@@ -154,7 +154,7 @@ see the note.
154
154
  | `resume` | ✓ | ✓ | |
155
155
  | `step_over` | ✓ | ✓ | |
156
156
  | `evaluate_on_call_frame` | ✓ | ✓ | |
157
- | `search_scripts` | ✓ | ✓ | a long line's preview is 100 characters on each side of the match |
157
+ | `search_scripts` | ✓ | ✓ | a long line's preview is 100 characters on each side of the match; frames of another origin too (Chrome ids such as `2.17`) |
158
158
  | `pause_on_load` | ✓ | ✗ | TODO on Firefox, see [Limitations and TODO](#limitations-and-todo) |
159
159
  | `enable_proxy_auth` | ✓ | partial | needs `--proxy-server`; a request the proxy rejects twice is cancelled; untested on Firefox against a real proxy |
160
160
  | `send_cdp_command` | ✓ | ✗ | `raw` group; raw Chrome DevTools Protocol; refuses `Network`/`Page`/`Runtime`/`Log`/`Debugger.disable` and `Browser.close`; `Fetch.enable` comes with a note |
@@ -173,7 +173,9 @@ action nothing reacts to costs those 50 ms and keeps its reply; otherwise
173
173
  the reply adds `The page reacted (the DOM changed, 1 request(s)) and settled
174
174
  after 134 ms.`, or says the page was still changing after 1 s. A click that
175
175
  navigates waits for the new page's requests. Use `wait_for` for anything
176
- slower (a timer, a long request).
176
+ slower (a timer, a long request). An action that opened tabs (a
177
+ `target=_blank` link, `window.open`) says so: `The action opened tab tab-3
178
+ (https://…): call switch_tab with its tab_id to act in it.`
177
179
 
178
180
  The JavaScript debugger tools on Firefox need its debugger (RDP) port: on by
179
181
  default for a launched Firefox, `--firefox-rdp-port` for an attached one. The
@@ -623,7 +625,11 @@ incompatible:
623
625
  - Frames of another origin: `evaluate_js` runs in the page only, and
624
626
  `capture_screenshot` cannot clip to an element inside such a frame (pass
625
627
  the iframe's ref instead); `snapshot` reads at most 20 of them, 5 deep;
626
- the coordinates in the replies of the input tools are the frame's.
628
+ the coordinates in the replies of the input tools are the frame's. On
629
+ Chrome, the console and network of at most 50 of them per tab are
630
+ logged, and the debugger reaches their scripts (ids such as `2.17`:
631
+ frame 2's script 17), as it does on Firefox; `pause_on_load` pauses the
632
+ page only.
627
633
 
628
634
  ## Untested
629
635
 
@@ -19,7 +19,7 @@
19
19
  "hasInstallScript": true,
20
20
  "license": "MIT",
21
21
  "name": "@raultov/browser-control-mcp",
22
- "version": "0.8.0-beta.12"
22
+ "version": "0.10.0-beta.14"
23
23
  },
24
24
  "node_modules/detect-libc": {
25
25
  "engines": {
@@ -48,5 +48,5 @@
48
48
  }
49
49
  },
50
50
  "requires": true,
51
- "version": "0.8.0-beta.12"
51
+ "version": "0.10.0-beta.14"
52
52
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "artifactDownloadUrls": [
3
- "https://github.com/raultov/browser-control-mcp/releases/download/v0.8.0-beta.12"
3
+ "https://github.com/raultov/browser-control-mcp/releases/download/v0.10.0-beta.14"
4
4
  ],
5
5
  "author": "raultov <raultov@protonmail.com>",
6
6
  "bin": {
@@ -92,7 +92,7 @@
92
92
  "zipExt": ".tar.xz"
93
93
  }
94
94
  },
95
- "version": "0.8.0-beta.12",
95
+ "version": "0.10.0-beta.14",
96
96
  "volta": {
97
97
  "node": "18.14.1",
98
98
  "npm": "9.5.0"