smooth-operator-mcp 2.4.11 → 3.0.1
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/.env.example +23 -2
- package/README.md +14 -3
- package/dist/smooth-operator.mjs +879 -444
- package/dist/smooth-operator.mjs.map +3 -3
- package/docs/harnesses.md +23 -2
- package/docs/mcp-server.md +76 -21
- package/package.json +2 -1
package/docs/harnesses.md
CHANGED
|
@@ -2,11 +2,32 @@
|
|
|
2
2
|
|
|
3
3
|
## Interactive wizard (directly to your harness)
|
|
4
4
|
|
|
5
|
-
`smooth-operator install <harness>` is interactive by default — it asks
|
|
5
|
+
`smooth-operator install <harness>` is interactive by default — it asks exactly 3
|
|
6
|
+
curated questions (browser mode/profile, browser executable, and
|
|
7
|
+
security/data-directory settings) with recommended defaults in brackets.
|
|
8
|
+
Omitting `<harness>` is allowed too: on a TTY the installer prompts for the
|
|
9
|
+
target first (default `opencode`), while piped or CI environments print usage
|
|
10
|
+
and exit instead. Use `smooth-operator install opencode --yes` to skip prompts
|
|
11
|
+
and use recommended defaults. The wizard normalizes and validates its choices
|
|
12
|
+
before saving them to `~/.smooth-operator/config.json` (0600, bounded,
|
|
13
|
+
owner-only, and symlink-safe). Managed mode owns one private persistent profile;
|
|
14
|
+
connect mode attaches to an operator-owned browser and does not own or close
|
|
15
|
+
its profile/process. Personal-Chrome mode derives `browserUrl` after launching
|
|
16
|
+
the helper on port 9222; it is not a separate prompt.
|
|
6
17
|
|
|
7
18
|
### Personal Chrome (connect) helper
|
|
8
19
|
|
|
9
|
-
When you pick “
|
|
20
|
+
When you pick “connected browser” (mode `connect`), the wizard finds Chromium via
|
|
21
|
+
`discovery.ts`, launches a dedicated debugging profile under
|
|
22
|
+
`~/.smooth-operator/personal-chrome` with port `9222`, and polls the loopback
|
|
23
|
+
endpoint until it is live. On success it writes
|
|
24
|
+
`SMOOTH_OPERATOR_BROWSER_MODE=connect` and
|
|
25
|
+
`SMOOTH_OPERATOR_BROWSER_URL=http://127.0.0.1:9222` for you. This does not
|
|
26
|
+
attach to or take ownership of an operator's daily browser profile. No manual
|
|
27
|
+
`9222` knowledge is needed. Non-interactive environments (no TTY or `CI` set)
|
|
28
|
+
skip prompts entirely and apply the same recommended defaults as `--yes`. The
|
|
29
|
+
`chrome://inspect` toggle remains as an advanced opt-in (see
|
|
30
|
+
`docs/mcp-server.md`).
|
|
10
31
|
|
|
11
32
|
SmoothOperator speaks MCP over stdio. The `smooth-operator install <target>`
|
|
12
33
|
command registers that stdio server with a supported client. It uses
|
package/docs/mcp-server.md
CHANGED
|
@@ -43,6 +43,16 @@ smooth-operator --help
|
|
|
43
43
|
|
|
44
44
|
(The registry package is `smooth-operator-mcp`; plain `smooth-operator` is an unrelated library. You can also install straight from GitHub: `npm install -g github:Gitshop77/Smooth-Operator`.)
|
|
45
45
|
|
|
46
|
+
The interactive installer asks exactly three questions: (1) browser profile
|
|
47
|
+
ownership, (2) headed or headless display, and (3) which Chromium executable to
|
|
48
|
+
use. Its recommended defaults are a managed private persistent profile, headed
|
|
49
|
+
display, and the first detected Chromium executable. It also enables page eval
|
|
50
|
+
and the identity-preserving compatibility profile; behavioral timing is off
|
|
51
|
+
for fast deterministic input and can be enabled explicitly. Managed mode owns
|
|
52
|
+
its profile. Connected mode launches and attaches to
|
|
53
|
+
a dedicated debugging profile and does not claim ownership of an operator's
|
|
54
|
+
daily browser.
|
|
55
|
+
|
|
46
56
|
From a checkout:
|
|
47
57
|
|
|
48
58
|
```sh
|
|
@@ -155,8 +165,13 @@ evaluating page content.
|
|
|
155
165
|
|
|
156
166
|
The managed browser is headed by default for sign-in and human handoff. On CI or a
|
|
157
167
|
displayless host, explicitly set `SMOOTH_OPERATOR_BROWSER_HEADLESS=true` or use
|
|
158
|
-
Xvfb.
|
|
159
|
-
|
|
168
|
+
Xvfb. If you set both `SMOOTH_OPERATOR_BROWSER_VIEWPORT_WIDTH` and
|
|
169
|
+
`SMOOTH_OPERATOR_BROWSER_VIEWPORT_HEIGHT`, that explicit viewport is applied to
|
|
170
|
+
the browser and any explicitly configured viewport. All local browser tools and
|
|
171
|
+
features are available by default, including page evaluation and the
|
|
172
|
+
identity-preserving compatibility profile. Behavioral timing is off by default
|
|
173
|
+
for fast deterministic input. See `STEALTH-GUIDE.md` for challenge handling
|
|
174
|
+
and the remaining boundaries.
|
|
160
175
|
|
|
161
176
|
### Managed mode (default)
|
|
162
177
|
|
|
@@ -285,16 +300,46 @@ variables include:
|
|
|
285
300
|
| `SMOOTH_OPERATOR_BROWSER_EXECUTABLE` | unset | Managed-mode override; required for explicit launch mode |
|
|
286
301
|
| `SMOOTH_OPERATOR_BROWSER_USER_DATA_DIR` | `${SMOOTH_OPERATOR_DATA_DIR}/browser` | Dedicated persistent browser profile |
|
|
287
302
|
| `SMOOTH_OPERATOR_BROWSER_HEADLESS` | `false` | Set `true` for CI/displayless managed or launch use |
|
|
303
|
+
| `SMOOTH_OPERATOR_BROWSER_VIEWPORT_WIDTH` / `_HEIGHT` | unset | Set both to apply an explicit viewport |
|
|
304
|
+
| `SMOOTH_OPERATOR_BROWSER_AUTO_LAUNCH` | `false` | Backward-compatible connect-mode recovery option |
|
|
305
|
+
| `SMOOTH_OPERATOR_BROWSER_TIMEOUT_MS` | `15000` | Per-action deadline |
|
|
306
|
+
| `SMOOTH_OPERATOR_BROWSER_CONNECT_TIMEOUT_MS` | `30000` | Browser connection deadline |
|
|
307
|
+
| `SMOOTH_OPERATOR_BROWSER_CDP_TIMEOUT_MS` | `30000` | DevTools command deadline |
|
|
308
|
+
| `SMOOTH_OPERATOR_MAX_SCREENSHOT_BYTES` | `8000000` | Screenshot byte cap |
|
|
309
|
+
| `SMOOTH_OPERATOR_MAX_HTML_CHARS` | `200000` | HTML output cap |
|
|
288
310
|
| `SMOOTH_OPERATOR_ALLOWED_DOMAINS` | unset | Comma-separated allowlist |
|
|
289
311
|
| `SMOOTH_OPERATOR_BLOCKED_DOMAINS` | unset | Comma-separated denylist |
|
|
290
312
|
| `SMOOTH_OPERATOR_ALLOWED_FILE_ROOTS` | data `files`, `downloads` | Explicit roots replace defaults |
|
|
291
313
|
| `SMOOTH_OPERATOR_ALLOW_PRIVATE_NETWORK` | `false` | Allows non-loopback private targets when true |
|
|
292
|
-
| `SMOOTH_OPERATOR_ALLOW_EVAL` | `
|
|
314
|
+
| `SMOOTH_OPERATOR_ALLOW_EVAL` | `true` | Set `false` to disable page JavaScript |
|
|
315
|
+
| `SMOOTH_OPERATOR_STEALTH_ENABLED` | `true` | Native-identity viewport compatibility script |
|
|
316
|
+
| `SMOOTH_OPERATOR_STEALTH_PROFILE` | `balanced` | `balanced` or `max` compatibility label |
|
|
317
|
+
| `SMOOTH_OPERATOR_STEALTH_GPU` | `false` | Adds opt-in GPU launch flags |
|
|
318
|
+
| `SMOOTH_OPERATOR_BEHAVIOR_ENABLED` | `false` | Opt-in timing wrappers |
|
|
319
|
+
| `SMOOTH_OPERATOR_HTTP_HOST` | `127.0.0.1` | HTTP bind host |
|
|
320
|
+
| `SMOOTH_OPERATOR_HTTP_PORT` | `3344` | HTTP bind port |
|
|
321
|
+
| `SMOOTH_OPERATOR_HTTP_PATH` | `/mcp` | HTTP endpoint path |
|
|
293
322
|
| `SMOOTH_OPERATOR_HTTP_TOKEN` | unset | Required for HTTP; 32+ chars for remote mode |
|
|
294
323
|
| `SMOOTH_OPERATOR_ALLOW_REMOTE_HTTP` | `false` | Allows non-loopback HTTP only with a strong token |
|
|
295
324
|
| `SMOOTH_OPERATOR_HTTP_MAX_BODY_BYTES` | `2000000` | Bounded HTTP request body |
|
|
325
|
+
| `SMOOTH_OPERATOR_ALLOWED_HOSTS` | `localhost,127.0.0.1,[::1]` | HTTP Host allowlist |
|
|
326
|
+
| `SMOOTH_OPERATOR_ALLOWED_ORIGINS` | `localhost,127.0.0.1,[::1]` | HTTP Origin allowlist |
|
|
296
327
|
| `SMOOTH_OPERATOR_LOG_LEVEL` | `info` | `debug`, `info`, `warn`, or `error` |
|
|
297
328
|
|
|
329
|
+
### Fast operation mode
|
|
330
|
+
|
|
331
|
+
The default configuration is a native managed browser with page evaluation
|
|
332
|
+
available, native browser identity, and deterministic input. Enable
|
|
333
|
+
`SMOOTH_OPERATOR_BEHAVIOR_ENABLED=true` only when a workflow explicitly needs
|
|
334
|
+
timing wrappers. Tool calls remain bounded and cancellable; no hidden planning
|
|
335
|
+
loop is introduced.
|
|
336
|
+
|
|
337
|
+
Raw MCP/tool-call speed is not the main bot-detection vector. Sites can score
|
|
338
|
+
network and browser identity, IP reputation, session history, and interaction
|
|
339
|
+
timing independently. A faster call does not bypass a challenge or make an
|
|
340
|
+
automated session legitimate; use the internal AI workflow or human handoff
|
|
341
|
+
only where the target permits automation.
|
|
342
|
+
|
|
298
343
|
## Security enforcement layers
|
|
299
344
|
|
|
300
345
|
There are no client-selectable permissiveness tiers. The following controls
|
|
@@ -314,13 +359,15 @@ are always applied, with explicit opt-ins where documented:
|
|
|
314
359
|
unknown schemes are rejected.
|
|
315
360
|
- Upload and PDF destinations must stay within configured file roots after
|
|
316
361
|
realpath and symlink checks. Download paths and generated files are bounded.
|
|
317
|
-
- Page JavaScript is
|
|
318
|
-
|
|
319
|
-
|
|
362
|
+
- Page JavaScript is available in the native profile by default and can be
|
|
363
|
+
disabled with `SMOOTH_OPERATOR_ALLOW_EVAL=false`; when enabled, page code can
|
|
364
|
+
observe and mutate page state with the browser's privileges.
|
|
320
365
|
- Page text, HTML, titles, attributes, search snippets, cookies, and logs are
|
|
321
366
|
treated as untrusted data, normalized, bounded, and redacted before output.
|
|
322
|
-
-
|
|
323
|
-
not
|
|
367
|
+
- Challenge and anti-bot markers are reported from bounded evidence. The server
|
|
368
|
+
does not rotate identities or silently bypass challenges. The connected-AI
|
|
369
|
+
challenge loop collects fresh classification and visual/state evidence,
|
|
370
|
+
allows ordinary browser actions, and verifies with a subsequent call.
|
|
324
371
|
|
|
325
372
|
Run the server with a dedicated browser profile and the smallest domain and
|
|
326
373
|
file-root allowlists that fit the task. Browser automation can still perform
|
|
@@ -347,22 +394,28 @@ individual descriptions and limits are returned by `tools/list`.
|
|
|
347
394
|
`browser_close_tab`, `browser_click`, `browser_input`, `browser_select`,
|
|
348
395
|
`browser_scroll`, `browser_scroll_to_bottom`, `browser_key`,
|
|
349
396
|
`browser_wait`, `browser_wait_for_element`, `browser_wait_for_text`, `browser_wait_for_url`,
|
|
350
|
-
`browser_wait_for_network_idle`, `browser_hover`, `browser_press_and_hold`,
|
|
397
|
+
`browser_wait_for_network_idle`, `browser_hover`, `browser_move`, `browser_press_and_hold`,
|
|
351
398
|
`browser_type`, `browser_close`, and `browser_close_all`.
|
|
352
399
|
|
|
353
|
-
**
|
|
400
|
+
**Available local capabilities:** `browser_screenshot`, `browser_pdf`,
|
|
354
401
|
`browser_upload`, `browser_downloads`, `browser_network_log`,
|
|
355
|
-
`browser_console_log`, `browser_dialog`, `browser_cookies`,
|
|
356
|
-
`
|
|
357
|
-
`
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
402
|
+
`browser_console_log`, `browser_dialog`, `browser_cookies`, `browser_storage`,
|
|
403
|
+
`browser_batch`, `browser_exec`, `browser_wait_for_human`,
|
|
404
|
+
`browser_solve_challenge`, and all other browser tools are available by default.
|
|
405
|
+
`browser_close_session` remains a local lifecycle control and does not change
|
|
406
|
+
browser permissions. Page evaluation is available by default and can be
|
|
407
|
+
disabled explicitly with `SMOOTH_OPERATOR_ALLOW_EVAL=false`.
|
|
408
|
+
|
|
409
|
+
`browser_evaluate` is page JavaScript and is available by default (set
|
|
410
|
+
`SMOOTH_OPERATOR_ALLOW_EVAL=false` when it is not wanted). `browser_exec`
|
|
361
411
|
accepts only a JSON array of validated browser actions; it is not a shell,
|
|
362
412
|
Python, or arbitrary code runner. Destructive batch actions require explicit
|
|
363
413
|
confirmation. `browser_wait_for_human` pauses for an operator to complete a
|
|
364
|
-
visible sign-in or challenge
|
|
365
|
-
|
|
414
|
+
visible sign-in or challenge. `browser_solve_challenge` is an internal
|
|
415
|
+
connected-AI observe/act/verify loop: it returns bounded evidence and is
|
|
416
|
+
successful only when a fresh final classification explicitly reports the
|
|
417
|
+
challenge absent. `browser_close_session` closes the one native browser session
|
|
418
|
+
by its explicit session identifier.
|
|
366
419
|
|
|
367
420
|
Actions that leave a usable page—navigation, click, input, select, scroll, key,
|
|
368
421
|
back, forward, and reload—accept optional `includeSnapshot: true`. The action
|
|
@@ -399,7 +452,7 @@ not a per-result multiplier. URL fields and fixed untrusted-data wrapper
|
|
|
399
452
|
markers are outside that text budget. The response body is bounded before
|
|
400
453
|
parsing, redirects are rejected, cancellation and timeout are propagated, and
|
|
401
454
|
credentials/query secret placeholders are removed from result URLs. Transient
|
|
402
|
-
|
|
455
|
+
retrieval failures use at most three bounded attempts; anti-bot responses are
|
|
403
456
|
reported without attempting a bypass.
|
|
404
457
|
|
|
405
458
|
### Resources
|
|
@@ -415,7 +468,10 @@ The server publishes read-only resources:
|
|
|
415
468
|
- `smooth-operator://browser/logs/console`
|
|
416
469
|
|
|
417
470
|
Resource output is bounded and follows the same redaction and policy rules as
|
|
418
|
-
tool output.
|
|
471
|
+
tool output. The capabilities resource also reports the native defaults and
|
|
472
|
+
effective feature flags for local browser tools, page evaluation, stealth, and
|
|
473
|
+
behavioral timing, plus whether challenge success requires an explicit absent
|
|
474
|
+
classification.
|
|
419
475
|
|
|
420
476
|
### Prompts
|
|
421
477
|
|
|
@@ -438,7 +494,6 @@ mode remains under the operator's ownership.
|
|
|
438
494
|
To clean up a local installation:
|
|
439
495
|
|
|
440
496
|
```sh
|
|
441
|
-
smooth-operator install claude-desktop # inspect config before removal
|
|
442
497
|
npm uninstall -g smooth-operator-mcp
|
|
443
498
|
```
|
|
444
499
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "smooth-operator-mcp",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"packageManager": "npm@12.0.2",
|
|
6
6
|
"description": "A lightweight, production-grade MCP server for secure browser automation.",
|
|
@@ -43,6 +43,7 @@
|
|
|
43
43
|
"dependencies": {
|
|
44
44
|
"@modelcontextprotocol/node": "^2.0.0",
|
|
45
45
|
"@modelcontextprotocol/server": "^2.0.0",
|
|
46
|
+
"ghost-cursor": "^1.4.2",
|
|
46
47
|
"puppeteer-core": "^25.9.0",
|
|
47
48
|
"zod": "^4.4.3"
|
|
48
49
|
},
|