smooth-operator-mcp 2.4.10 → 3.0.0
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 +24 -3
- package/README.md +19 -6
- package/dist/smooth-operator.mjs +3826 -1516
- package/dist/smooth-operator.mjs.map +3 -3
- package/docs/harnesses.md +25 -4
- package/docs/mcp-server.md +84 -25
- package/package.json +2 -1
package/docs/harnesses.md
CHANGED
|
@@ -1,12 +1,33 @@
|
|
|
1
1
|
# Harness installation
|
|
2
2
|
|
|
3
|
-
## Interactive wizard (
|
|
4
|
-
|
|
5
|
-
`smooth-operator install <harness>` is interactive by default — it asks
|
|
3
|
+
## Interactive wizard (directly to your harness)
|
|
4
|
+
|
|
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
|
+
balanced stealth, and short behavioral timing in the native profile; pass the
|
|
51
|
+
corresponding environment flags as `false` when those capabilities are not
|
|
52
|
+
wanted. Managed mode owns 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
|
|
@@ -145,18 +155,23 @@ are answered only after the same Host and Origin checks.
|
|
|
145
155
|
|
|
146
156
|
## Browser lifecycle
|
|
147
157
|
|
|
148
|
-
The server manages one headed, persistent private
|
|
149
|
-
default. On the first browser tool call it discovers an installed
|
|
158
|
+
The server manages one headed, persistent private Chromium-based browser session
|
|
159
|
+
by default. On the first browser tool call it discovers an installed browser,
|
|
150
160
|
launches it with `${SMOOTH_OPERATOR_DATA_DIR}/browser` as a non-default profile,
|
|
151
161
|
and records its loopback DevTools endpoint for later reattachment. Sign in once
|
|
152
162
|
in the visible window; its sessions persist in that private profile. The
|
|
153
163
|
`browser_doctor` tool reports executable resolution and endpoint state without
|
|
154
164
|
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 opt-in stealth page metrics. All local browser tools and
|
|
171
|
+
features are available by default, including page evaluation and the balanced
|
|
172
|
+
stealth/short-behavior profile. Set their environment flags to `false` for a
|
|
173
|
+
stricter or faster profile. See `STEALTH-GUIDE.md` for challenge handling and
|
|
174
|
+
the remaining boundaries.
|
|
160
175
|
|
|
161
176
|
### Managed mode (default)
|
|
162
177
|
|
|
@@ -283,18 +298,50 @@ variables include:
|
|
|
283
298
|
| `SMOOTH_OPERATOR_BROWSER_MODE` | `managed` | `managed`, `disabled`, `connect`, or `launch` |
|
|
284
299
|
| `SMOOTH_OPERATOR_BROWSER_URL` | `http://127.0.0.1:9222` | DevTools HTTP endpoint |
|
|
285
300
|
| `SMOOTH_OPERATOR_BROWSER_EXECUTABLE` | unset | Managed-mode override; required for explicit launch mode |
|
|
286
|
-
| `SMOOTH_OPERATOR_BROWSER_USER_DATA_DIR` | `${SMOOTH_OPERATOR_DATA_DIR}/browser` | Dedicated persistent
|
|
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` | Set `false` to preserve raw automation signals |
|
|
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` | `true` | Set `false` for fastest raw interactions |
|
|
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 short bounded
|
|
332
|
+
behavioral timing, the conservative stealth baseline, and page evaluation
|
|
333
|
+
available. For the fastest raw interactions, set
|
|
334
|
+
`SMOOTH_OPERATOR_BEHAVIOR_ENABLED=false` and, when appropriate,
|
|
335
|
+
`SMOOTH_OPERATOR_STEALTH_ENABLED=false`; set `SMOOTH_OPERATOR_ALLOW_EVAL=false`
|
|
336
|
+
when page JavaScript is not needed. Tool calls remain bounded and cancellable;
|
|
337
|
+
no hidden planning loop is introduced.
|
|
338
|
+
|
|
339
|
+
Raw MCP/tool-call speed is not the main bot-detection vector. Sites can score
|
|
340
|
+
network and browser identity, IP reputation, session history, and interaction
|
|
341
|
+
timing independently. A faster call does not bypass a challenge or make an
|
|
342
|
+
automated session legitimate; use the internal AI workflow or human handoff
|
|
343
|
+
only where the target permits automation.
|
|
344
|
+
|
|
298
345
|
## Security enforcement layers
|
|
299
346
|
|
|
300
347
|
There are no client-selectable permissiveness tiers. The following controls
|
|
@@ -314,13 +361,15 @@ are always applied, with explicit opt-ins where documented:
|
|
|
314
361
|
unknown schemes are rejected.
|
|
315
362
|
- Upload and PDF destinations must stay within configured file roots after
|
|
316
363
|
realpath and symlink checks. Download paths and generated files are bounded.
|
|
317
|
-
- Page JavaScript is
|
|
318
|
-
|
|
319
|
-
|
|
364
|
+
- Page JavaScript is available in the native profile by default and can be
|
|
365
|
+
disabled with `SMOOTH_OPERATOR_ALLOW_EVAL=false`; when enabled, page code can
|
|
366
|
+
observe and mutate page state with the browser's privileges.
|
|
320
367
|
- Page text, HTML, titles, attributes, search snippets, cookies, and logs are
|
|
321
368
|
treated as untrusted data, normalized, bounded, and redacted before output.
|
|
322
|
-
-
|
|
323
|
-
not
|
|
369
|
+
- Challenge and anti-bot markers are reported from bounded evidence. The server
|
|
370
|
+
does not rotate identities or silently bypass challenges. The connected-AI
|
|
371
|
+
challenge loop collects fresh classification and visual/state evidence,
|
|
372
|
+
allows ordinary browser actions, and verifies with a subsequent call.
|
|
324
373
|
|
|
325
374
|
Run the server with a dedicated browser profile and the smallest domain and
|
|
326
375
|
file-root allowlists that fit the task. Browser automation can still perform
|
|
@@ -347,22 +396,28 @@ individual descriptions and limits are returned by `tools/list`.
|
|
|
347
396
|
`browser_close_tab`, `browser_click`, `browser_input`, `browser_select`,
|
|
348
397
|
`browser_scroll`, `browser_scroll_to_bottom`, `browser_key`,
|
|
349
398
|
`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`,
|
|
399
|
+
`browser_wait_for_network_idle`, `browser_hover`, `browser_move`, `browser_press_and_hold`,
|
|
351
400
|
`browser_type`, `browser_close`, and `browser_close_all`.
|
|
352
401
|
|
|
353
|
-
**
|
|
402
|
+
**Available local capabilities:** `browser_screenshot`, `browser_pdf`,
|
|
354
403
|
`browser_upload`, `browser_downloads`, `browser_network_log`,
|
|
355
|
-
`browser_console_log`, `browser_dialog`, `browser_cookies`,
|
|
356
|
-
`
|
|
357
|
-
`
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
404
|
+
`browser_console_log`, `browser_dialog`, `browser_cookies`, `browser_storage`,
|
|
405
|
+
`browser_batch`, `browser_exec`, `browser_wait_for_human`,
|
|
406
|
+
`browser_solve_challenge`, and all other browser tools are available by default.
|
|
407
|
+
`browser_close_session` remains a local lifecycle control and does not change
|
|
408
|
+
browser permissions. Page evaluation is available by default and can be
|
|
409
|
+
disabled explicitly with `SMOOTH_OPERATOR_ALLOW_EVAL=false`.
|
|
410
|
+
|
|
411
|
+
`browser_evaluate` is page JavaScript and is available by default (set
|
|
412
|
+
`SMOOTH_OPERATOR_ALLOW_EVAL=false` when it is not wanted). `browser_exec`
|
|
361
413
|
accepts only a JSON array of validated browser actions; it is not a shell,
|
|
362
414
|
Python, or arbitrary code runner. Destructive batch actions require explicit
|
|
363
415
|
confirmation. `browser_wait_for_human` pauses for an operator to complete a
|
|
364
|
-
visible sign-in or challenge
|
|
365
|
-
|
|
416
|
+
visible sign-in or challenge. `browser_solve_challenge` is an internal
|
|
417
|
+
connected-AI observe/act/verify loop: it returns bounded evidence and is
|
|
418
|
+
successful only when a fresh final classification explicitly reports the
|
|
419
|
+
challenge absent. `browser_close_session` closes the one native browser session
|
|
420
|
+
by its explicit session identifier.
|
|
366
421
|
|
|
367
422
|
Actions that leave a usable page—navigation, click, input, select, scroll, key,
|
|
368
423
|
back, forward, and reload—accept optional `includeSnapshot: true`. The action
|
|
@@ -398,7 +453,9 @@ schema) is one aggregate budget across the returned title and snippet text,
|
|
|
398
453
|
not a per-result multiplier. URL fields and fixed untrusted-data wrapper
|
|
399
454
|
markers are outside that text budget. The response body is bounded before
|
|
400
455
|
parsing, redirects are rejected, cancellation and timeout are propagated, and
|
|
401
|
-
credentials/query secret placeholders are removed from result URLs.
|
|
456
|
+
credentials/query secret placeholders are removed from result URLs. Transient
|
|
457
|
+
retrieval failures use at most three bounded attempts; anti-bot responses are
|
|
458
|
+
reported without attempting a bypass.
|
|
402
459
|
|
|
403
460
|
### Resources
|
|
404
461
|
|
|
@@ -413,7 +470,10 @@ The server publishes read-only resources:
|
|
|
413
470
|
- `smooth-operator://browser/logs/console`
|
|
414
471
|
|
|
415
472
|
Resource output is bounded and follows the same redaction and policy rules as
|
|
416
|
-
tool output.
|
|
473
|
+
tool output. The capabilities resource also reports the native defaults and
|
|
474
|
+
effective feature flags for local browser tools, page evaluation, stealth, and
|
|
475
|
+
behavioral timing, plus whether challenge success requires an explicit absent
|
|
476
|
+
classification.
|
|
417
477
|
|
|
418
478
|
### Prompts
|
|
419
479
|
|
|
@@ -436,7 +496,6 @@ mode remains under the operator's ownership.
|
|
|
436
496
|
To clean up a local installation:
|
|
437
497
|
|
|
438
498
|
```sh
|
|
439
|
-
smooth-operator install claude-desktop # inspect config before removal
|
|
440
499
|
npm uninstall -g smooth-operator-mcp
|
|
441
500
|
```
|
|
442
501
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "smooth-operator-mcp",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0",
|
|
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
|
},
|