@ricsam/browser-mcp 0.3.22 → 0.3.24
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/README.md +48 -6
- package/dist/{chunk-678a5n25.js → chunk-1xzht87a.js} +4475 -722
- package/dist/chunk-4cgmscyh.js +7 -0
- package/dist/chunk-bqtb05cg.js +7 -0
- package/dist/main.js +4 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
Native Chrome companion. Requires Node >=22.14.0 and an installed
|
|
4
4
|
Google Chrome. No browser download or startup occurs during npm installation.
|
|
5
5
|
|
|
6
|
-
Release 0.3.
|
|
6
|
+
Release 0.3.24 uses one cross-platform Node package with matching server/chart 0.3.24, native protocol 3 and no database schema change. The runtime adds `target` locators on actions, DOM-backed refs and structured search matches, compact outlines with an interactive view, waits for text, network quiet and time, read-only scripts, WebMCP calls by name, element screenshots delivered as images or files, isolated browser sessions, typing into code editors, reopening the previous tabs at start (`--no-restore-tabs` to start blank), and back/forward-cache, crashed-tab and background-tab handling. Each new argument needs its capability; older servers do not offer it and older runtimes are refused with `runtime_update_required`. Passkey prompt detection and back, forward and reload for the user who controls a tab with `--live-view` (0.3.22), takeover from the dashboard or an MCP App with `user_in_control` refusals (0.3.21), `pageState` timing (0.3.20), upload and secret-export capabilities in tool text with up-front transfer grant limits (0.3.19), private download routing (0.3.18), background screenshots and capture-only download retry remain. Verified readiness is still required before retrieving bytes. Keep administrative sign-ins outside automated profiles unless deliberately delegated: internal pages, local files and the Browser MCP dashboard are no longer blanket-blocked, subject to Chrome's interface limits. Stop the old CLI before upgrading, then restart the same named profile to preserve sign-ins and pairing; never replay uncertain actions automatically.
|
|
7
7
|
|
|
8
8
|
```sh
|
|
9
|
-
npm install -g @ricsam/browser-mcp@0.3.
|
|
9
|
+
npm install -g @ricsam/browser-mcp@0.3.24
|
|
10
10
|
browser-mcp browser start --server https://browser-mcp.click --profile work
|
|
11
11
|
browser-mcp browser status --profile work
|
|
12
12
|
browser-mcp browser pause --profile work
|
|
@@ -23,6 +23,13 @@ opened, copied or attached. `--live-view` enables screenshot-based live view
|
|
|
23
23
|
locally (off by default); remote viewers cannot enable it. With it, the signed-in
|
|
24
24
|
owner can also take control of the streamed tab (takeover) from the dashboard or
|
|
25
25
|
an MCP App; the agent cannot use that tab until control returns.
|
|
26
|
+
`--screenshot-max-edge 1568` scales screenshots down so their longer side is at
|
|
27
|
+
most that many pixels (512 to 2000, default 2000), for MCP clients or models that
|
|
28
|
+
would otherwise shrink larger images and so misplace coordinate clicks. It does
|
|
29
|
+
not apply to screenshots delivered as files (`browser_screenshot` with `deliver`
|
|
30
|
+
`file` or `both`), which keep their full resolution: Chrome's device pixels, up
|
|
31
|
+
to 8,192 on the longer side. Element screenshots (`ref` or `selector`) scroll the
|
|
32
|
+
element into view and capture its box, like Playwright's `locator.screenshot()`.
|
|
26
33
|
|
|
27
34
|
Foreground lifecycle: keep the CLI running. Ctrl-C, stop, or normal CLI exit
|
|
28
35
|
closes its Chrome. There is no detach or automatic CDP reattachment. Each launch
|
|
@@ -32,6 +39,40 @@ Chrome launch (up to 30 seconds) before closing acquired resources. Repeated
|
|
|
32
39
|
signals wait for that same cleanup. Pairing waits are cancelled too. A cleanup
|
|
33
40
|
error is reported after the other safe cleanup stages have been attempted.
|
|
34
41
|
|
|
42
|
+
A named profile reopens the web pages (`http`, `https` and `file`, from the first
|
|
43
|
+
100 tabs opened, never Incognito) that were open when it last stopped, whether by
|
|
44
|
+
Ctrl-C, stop, closing the last window or a crash. They reopen as user tabs with
|
|
45
|
+
new tab IDs, once the runtime's page protections are in place, and load again as
|
|
46
|
+
if typed into the address bar, with all of the site's cookies: history and form
|
|
47
|
+
contents are not restored, and an agent's temporary tabs come back as ordinary
|
|
48
|
+
tabs. `--no-restore-tabs` starts with a blank window instead. The addresses are
|
|
49
|
+
kept owner-only in the profile directory (`open-tabs.json`); ephemeral profiles
|
|
50
|
+
save nothing. Keep Chrome's own "On startup" setting at "Open the New Tab page"
|
|
51
|
+
in the dedicated profile, and do not pin tabs there.
|
|
52
|
+
|
|
53
|
+
Agents can create isolated browser sessions in a browser (`browser_create_session`)
|
|
54
|
+
to be signed in to the same site as several accounts at once. Each is a Chrome of
|
|
55
|
+
its own with its own profile under `~/.browser-mcp/sessions/<profile>/`, started in
|
|
56
|
+
the background (its first tab in a minimized window) when a tab is opened in it,
|
|
57
|
+
stopped after 10 minutes without tabs and with the CLI, and kept on disk, still
|
|
58
|
+
signed in, until an agent ends it, which deletes its profile. `status` lists them;
|
|
59
|
+
`recover` also removes their verified stale locks. An ephemeral browser's sessions
|
|
60
|
+
are deleted when it stops.
|
|
61
|
+
|
|
62
|
+
Agents click and type the way a person does. A ref that the page draws over or
|
|
63
|
+
hides while it still takes input, such as a code editor's text input (Monaco,
|
|
64
|
+
CodeMirror 5, Ace) or a styled checkbox's native input, is clicked with trusted
|
|
65
|
+
mouse input where its widget or label is drawn, and typing then goes to the
|
|
66
|
+
editor, which applies its own typing rules. A stale ref, a covered or hidden
|
|
67
|
+
target, or a code editor given to `browser_form_input` is answered with what to do
|
|
68
|
+
instead rather than a timeout.
|
|
69
|
+
|
|
70
|
+
Actions also take a `target` locator such as `{"role":"button","name":"Save"}`,
|
|
71
|
+
resolved to exactly one visible element when the action runs; none or several
|
|
72
|
+
are refused before any input, with candidates. Every visible `browser_read_page`
|
|
73
|
+
query match has a ref, also one the outline leaves out, such as a text span in a
|
|
74
|
+
table cell: a DOM-backed ref (`d12`, `f1d3`) that every ref-taking tool accepts.
|
|
75
|
+
|
|
35
76
|
Every Chrome launch enables WebMCP by default, equivalent to setting
|
|
36
77
|
`chrome://flags/#enable-webmcp-testing` to **Enabled**. The launcher passes
|
|
37
78
|
`--enable-features=WebMCP,WebMCPTesting,DevToolsWebMCPSupport` to support current
|
|
@@ -75,10 +116,11 @@ others running. Ctrl-C closes all browsers started by that command, and the CLI
|
|
|
75
116
|
exits after the last browser stops. A launch/runtime failure stops the group and
|
|
76
117
|
waits for cleanup; it never takes over an existing profile.
|
|
77
118
|
|
|
78
|
-
`--server`, `--chrome-path`, `--ephemeral
|
|
79
|
-
in that invocation. With
|
|
80
|
-
|
|
81
|
-
|
|
119
|
+
`--server`, `--chrome-path`, `--ephemeral`, `--live-view`, `--no-restore-tabs` and
|
|
120
|
+
`--screenshot-max-edge` apply to all profiles in that invocation. With
|
|
121
|
+
`--ephemeral`, each profile name still identifies its pairing and local
|
|
122
|
+
controls, but its Chrome data is throw-away. Omitting `--profile` selects
|
|
123
|
+
`default`; duplicate profile names are rejected.
|
|
82
124
|
|
|
83
125
|
Alternatively, run separate `browser start` commands with different profiles in
|
|
84
126
|
separate terminals (also supported in 0.3.6). This lets you choose different
|