smooth-operator-mcp 2.4.6 → 2.4.8
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 +3 -0
- package/README.md +17 -1
- package/dist/smooth-operator.mjs +1708 -350
- package/dist/smooth-operator.mjs.map +3 -3
- package/docs/harnesses.md +14 -0
- package/docs/mcp-server.md +20 -10
- package/package.json +4 -7
package/docs/harnesses.md
CHANGED
|
@@ -12,6 +12,20 @@ SmoothOperator speaks MCP over stdio. The `smooth-operator install <target>`
|
|
|
12
12
|
command registers that stdio server with a supported client. It uses
|
|
13
13
|
structured argument arrays and never invokes a shell.
|
|
14
14
|
|
|
15
|
+
The server also supports Streamable HTTP at `/mcp` for harnesses that cannot
|
|
16
|
+
launch local stdio processes. Its HTTP adapter accepts current MCP sessions and
|
|
17
|
+
the SDK's legacy 2025-compatible handshake, while retaining host, origin,
|
|
18
|
+
authentication, and request-size checks. For a local harness that needs an
|
|
19
|
+
explicit path, use a structured command such as:
|
|
20
|
+
|
|
21
|
+
```text
|
|
22
|
+
smooth-operator --config /absolute/path/to/config.json
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
The installer-created `~/.smooth-operator/config.json` is discovered
|
|
26
|
+
automatically, so an explicit `--config` argument is only needed for a separate
|
|
27
|
+
profile or an unusual home/config location.
|
|
28
|
+
|
|
15
29
|
Build or install the package first:
|
|
16
30
|
|
|
17
31
|
```sh
|
package/docs/mcp-server.md
CHANGED
|
@@ -132,14 +132,16 @@ SMOOTH_OPERATOR_HTTP_HOST=0.0.0.0 \
|
|
|
132
132
|
SMOOTH_OPERATOR_ALLOW_REMOTE_HTTP=true \
|
|
133
133
|
SMOOTH_OPERATOR_HTTP_TOKEN="$(openssl rand -hex 32)" \
|
|
134
134
|
SMOOTH_OPERATOR_ALLOWED_HOSTS=example.internal \
|
|
135
|
-
SMOOTH_OPERATOR_ALLOWED_ORIGINS=
|
|
135
|
+
SMOOTH_OPERATOR_ALLOWED_ORIGINS=example.internal \
|
|
136
136
|
smooth-operator
|
|
137
137
|
```
|
|
138
138
|
|
|
139
139
|
Remote mode is rejected unless the token is at least 32 characters. Do not
|
|
140
140
|
use a token from a shell history, checked-in file, or shared log. A reverse
|
|
141
141
|
proxy can add TLS and network access controls, but it does not replace the
|
|
142
|
-
application token, Host/Origin allowlists, or request-size limit.
|
|
142
|
+
application token, Host/Origin allowlists, or request-size limit. Allowed host
|
|
143
|
+
and origin values are hostnames without a scheme; browser preflight requests
|
|
144
|
+
are answered only after the same Host and Origin checks.
|
|
143
145
|
|
|
144
146
|
## Browser lifecycle
|
|
145
147
|
|
|
@@ -167,8 +169,10 @@ SmoothOperator process using the same private profile is rejected by the profile
|
|
|
167
169
|
`SMOOTH_OPERATOR_BROWSER_AUTO_LAUNCH` is retained for backward compatibility but is
|
|
168
170
|
ignored in managed mode.
|
|
169
171
|
|
|
170
|
-
Browser actions share a bounded operation queue and deadline.
|
|
171
|
-
|
|
172
|
+
Browser actions share a bounded operation queue and deadline. Independent
|
|
173
|
+
read-only observations may run concurrently; navigation, mutation, snapshot,
|
|
174
|
+
and session-control operations remain exclusive. Browser startup uses one
|
|
175
|
+
in-flight connection promise, so concurrent callers wait for the same
|
|
172
176
|
reattach/launch attempt instead of starting duplicate processes. Newly
|
|
173
177
|
auto-attached top-level targets are held at the CDP boundary until the
|
|
174
178
|
navigation policy guard is installed; targets whose attachment ownership
|
|
@@ -230,9 +234,12 @@ browser mode.
|
|
|
230
234
|
|
|
231
235
|
## Configuration and precedence
|
|
232
236
|
|
|
233
|
-
Configuration can come from
|
|
234
|
-
|
|
235
|
-
|
|
237
|
+
Configuration can come from the installer-created
|
|
238
|
+
`~/.smooth-operator/config.json`, an explicitly selected JSON file via `--config`
|
|
239
|
+
or `SMOOTH_OPERATOR_CONFIG`, environment variables, and a small set of
|
|
240
|
+
command-line flags. When no explicit config path is supplied, the installer
|
|
241
|
+
file is loaded automatically so its browser, security, and data-directory
|
|
242
|
+
choices apply consistently to every harness. The effective precedence is:
|
|
236
243
|
|
|
237
244
|
1. command-line values (`--config`, `--transport`, `--host`, `--port`);
|
|
238
245
|
2. environment variables;
|
|
@@ -240,9 +247,11 @@ flags. The effective precedence is:
|
|
|
240
247
|
4. documented defaults.
|
|
241
248
|
|
|
242
249
|
The file is an object with nested `http`, `browser`, and `security` sections.
|
|
243
|
-
|
|
244
|
-
the
|
|
245
|
-
|
|
250
|
+
Explicit `--config`/`SMOOTH_OPERATOR_CONFIG` files reject unknown root keys;
|
|
251
|
+
the automatically discovered installer file ignores unrelated root sections so
|
|
252
|
+
it can coexist with harness settings. Keep the file owner-readable only
|
|
253
|
+
(`chmod 600`); the loader rejects group/world-readable configuration files and
|
|
254
|
+
rejects symlinked data directories.
|
|
246
255
|
|
|
247
256
|
Example:
|
|
248
257
|
|
|
@@ -269,6 +278,7 @@ variables include:
|
|
|
269
278
|
| Setting | Default | Notes |
|
|
270
279
|
| --- | --- | --- |
|
|
271
280
|
| `SMOOTH_OPERATOR_TRANSPORT` | `stdio` | `stdio` or `http` |
|
|
281
|
+
| `SMOOTH_OPERATOR_CONFIG` | auto-discovered | Explicit JSON config path; overrides the installer default |
|
|
272
282
|
| `SMOOTH_OPERATOR_DATA_DIR` | `~/.smooth-operator` | Private data, file, and download roots |
|
|
273
283
|
| `SMOOTH_OPERATOR_BROWSER_MODE` | `managed` | `managed`, `disabled`, `connect`, or `launch` |
|
|
274
284
|
| `SMOOTH_OPERATOR_BROWSER_URL` | `http://127.0.0.1:9222` | DevTools HTTP endpoint |
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "smooth-operator-mcp",
|
|
3
|
-
"version": "2.4.
|
|
3
|
+
"version": "2.4.8",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"packageManager": "npm@12.0.2",
|
|
6
6
|
"description": "A lightweight, production-grade MCP server for secure browser automation.",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"scripts": {
|
|
24
24
|
"start": "tsx src/server/main.ts",
|
|
25
25
|
"dev": "tsx watch src/server/main.ts",
|
|
26
|
-
"build": "
|
|
26
|
+
"build": "node scripts/build.mjs",
|
|
27
27
|
"postbuild": "node scripts/set-executable.mjs dist/smooth-operator.mjs",
|
|
28
28
|
"lint": "eslint .",
|
|
29
29
|
"typecheck": "tsc --noEmit",
|
|
@@ -34,19 +34,16 @@
|
|
|
34
34
|
"dead-code": "knip --include files,exports,dependencies,unlisted --no-progress",
|
|
35
35
|
"mcp:stdio": "npm run start -- --transport stdio",
|
|
36
36
|
"mcp:http": "npm run start -- --transport http",
|
|
37
|
-
"benchmark:mcp": "node scripts/benchmark-mcp.mjs",
|
|
38
|
-
"benchmark:mcp:live": "node scripts/benchmark-mcp.mjs --live",
|
|
39
|
-
"benchmark:mcp:dist": "node scripts/benchmark-mcp.mjs --dist",
|
|
40
37
|
"package:smoke": "npm run build && node scripts/verify-package.mjs",
|
|
41
38
|
"package:smoke:install": "npm run build && node scripts/verify-package.mjs --install",
|
|
42
|
-
"release:smoke": "npm run package:smoke:install
|
|
39
|
+
"release:smoke": "npm run package:smoke:install",
|
|
43
40
|
"prepack": "npm run build",
|
|
44
41
|
"prepare": "npm run build"
|
|
45
42
|
},
|
|
46
43
|
"dependencies": {
|
|
47
44
|
"@modelcontextprotocol/node": "^2.0.0",
|
|
48
45
|
"@modelcontextprotocol/server": "^2.0.0",
|
|
49
|
-
"puppeteer-core": "^25.
|
|
46
|
+
"puppeteer-core": "^25.9.0",
|
|
50
47
|
"zod": "^4.4.3"
|
|
51
48
|
},
|
|
52
49
|
"devDependencies": {
|