@vibebrowser/mcp 0.2.5 → 0.2.7

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 CHANGED
@@ -47,6 +47,7 @@ Claude Desktop Cursor VS Code OpenCode
47
47
  - **Fast & Local** - Automation happens on your machine, no cloud latency
48
48
  - **Private** - Your browsing data never leaves your device
49
49
  - **Stable** - Content script based, no flaky CDP connections
50
+ - **Chrome DevTools Fallback** - Extension tools stay primary by default; use `--devtools` to force chrome-devtools-only mode
50
51
 
51
52
  ## Quick Start
52
53
 
@@ -210,6 +211,15 @@ Add to your Codex configuration:
210
211
  3. Go to Settings and enable "MCP External Control"
211
212
  4. The status should show "Connected"
212
213
 
214
+ If the extension is not connected, `vibebrowser-mcp` can optionally fall back to
215
+ `chrome-devtools-mcp` (started in `--autoConnect` mode) when that package is installed.
216
+ This fallback runs once in the shared local relay daemon (multi-agent safe), so
217
+ both `vibebrowser-mcp` and `vibebrowser-cli` use the same backend instance.
218
+ When extension is connected, extension tools are authoritative. Chrome DevTools
219
+ fallback tools are exposed only when extension is unavailable/disconnected.
220
+ Pass `--devtools` to either CLI to bypass relay/extension routing and use only
221
+ the chrome-devtools backend.
222
+
213
223
  ## Available Tools
214
224
 
215
225
  | Tool | Description |
@@ -266,6 +276,12 @@ npx -y --package @vibebrowser/mcp vibebrowser-mcp start --transport http --remot
266
276
 
267
277
  This exposes a local MCP endpoint at `http://127.0.0.1:8788/mcp` by default.
268
278
 
279
+ When OpenClaw runs on a different machine (for example cloud-hosted), provide a reachable URL:
280
+
281
+ ```bash
282
+ npx -y --package @vibebrowser/mcp vibebrowser-mcp openclaw --remote <extension-uuid> --public-url https://<reachable-host>/mcp
283
+ ```
284
+
269
285
  You can print the exact OpenClaw-friendly setup with:
270
286
 
271
287
  ```bash
@@ -279,12 +295,14 @@ For the full walkthrough, see `docs/openclaw-local-browser.md`.
279
295
  `vibebrowser-cli` mirrors the OpenClaw browser CLI shape for the real local-browser path:
280
296
 
281
297
  ```bash
298
+ npx -y --package @vibebrowser/mcp vibebrowser-cli sessions
282
299
  npx -y --package @vibebrowser/mcp vibebrowser-cli --remote <extension-uuid> status
283
300
  npx -y --package @vibebrowser/mcp vibebrowser-cli --remote <extension-uuid> tabs
284
301
  npx -y --package @vibebrowser/mcp vibebrowser-cli --remote <extension-uuid> open https://example.com
285
302
  npx -y --package @vibebrowser/mcp vibebrowser-cli --remote <extension-uuid> snapshot
286
303
  npx -y --package @vibebrowser/mcp vibebrowser-cli --remote <extension-uuid> click 12
287
304
  npx -y --package @vibebrowser/mcp vibebrowser-cli --remote <extension-uuid> type 23 "hello" --submit
305
+ npx -y --package @vibebrowser/mcp vibebrowser-cli --devtools status
288
306
  ```
289
307
 
290
308
  The package now exposes two executables:
@@ -294,6 +312,53 @@ The package now exposes two executables:
294
312
 
295
313
  `vibebrowser-cli` accepts the OpenClaw-style `--browser-profile` flag for compatibility and supports `--json` for machine-readable output. Unlike OpenClaw's managed `openclaw` browser profile, this CLI always targets the real Vibe-connected browser session.
296
314
 
315
+ Local-session selection:
316
+
317
+ - `vibebrowser-cli sessions` lists connected local browser sessions.
318
+ - `vibebrowser-cli --session <id> ...` targets a specific local session.
319
+ - If `--session` is omitted in local mode, the CLI uses the first connected session.
320
+ - In remote mode, `--remote <extension-uuid>` remains the explicit browser selector.
321
+
322
+ Snapshot behavior is tool-only (no legacy snapshot RPC shortcut):
323
+
324
+ - `snapshot` (default, `--format ai`) resolves via `take_md_snapshot` — uses the content script's in-page markdown extractor. Fast and readable, but **may return empty for background tabs or complex SPAs** (Notion, Gmail) where the content script is unreachable or layout is not computed.
325
+ - `snapshot --format aria` resolves via `take_a11y_snapshot` — uses Chrome DevTools Protocol `Accessibility.getFullAXTree` directly. **Reliable for all tabs including background tabs and SPAs.** Use this as a fallback when the default format returns empty or only a page title.
326
+
327
+ This keeps CLI behavior aligned with extension-supported tools and ensures page targeting works consistently with `--page-id`/`--pageId`.
328
+
329
+ For navigation-style operations, responses now include page content when page state changes:
330
+
331
+ - CLI `open` / `navigate` include `pageContent` in JSON output.
332
+ - MCP tool calls for navigation-style tools return text content that includes current page state (with snapshot fallback when needed).
333
+
334
+ ### OpenClaw Integration
335
+
336
+ There are two ways to use Vibe with OpenClaw:
337
+
338
+ **Option A: Cloud OpenClaw controlling local browser**
339
+
340
+ If OpenClaw runs in the cloud but you want it to control your local browser:
341
+
342
+ 1. Install the Vibe extension and enable **Remote** mode (see [docs/openclaw-local-browser.md](docs/openclaw-local-browser.md))
343
+ 2. Start the local HTTP bridge: `vibebrowser-mcp openclaw --remote <extension-uuid> [--public-url <url>]`
344
+ 3. Register the MCP URL in OpenClaw
345
+
346
+ **Option B: OpenClaw skill for local agents**
347
+
348
+ For OpenClaw agents that need your real browser context (logged-in sessions, existing tabs):
349
+
350
+ 1. Copy the Vibe skill from this package to your OpenClaw skills folder
351
+ 2. Set `VIBE_EXTENSION_UUID` environment variable
352
+ 3. Use `vibebrowser-cli` commands in your agent prompts
353
+
354
+ The skill is located at [`openclaw/vibebrowser/SKILL.md`](openclaw/vibebrowser/SKILL.md) and provides:
355
+ - Full OpenClaw-compatible CLI commands (`status`, `tabs`, `snapshot`, `click`, `type`, etc.)
356
+ - Fallback-safe commands for DevTools-backed flows (`resize`, `upload`, `dialog`)
357
+ - `--json` output for machine parsing
358
+ - Environment-based configuration
359
+
360
+ See [docs/openclaw-local-browser.md](docs/openclaw-local-browser.md) for the complete walkthrough.
361
+
297
362
  ## Local LLM: `serve` Command
298
363
 
299
364
  Run a local LLM with one command — no cloud API keys required. Automatically installs [Ollama](https://ollama.com), downloads the model, and starts serving an OpenAI-compatible API.
@@ -355,17 +420,20 @@ npx -y --package @vibebrowser/mcp vibebrowser-mcp [start] [options]
355
420
  --http-path <path> Path for streamable HTTP MCP transport (default: /mcp)
356
421
  --allow-host <host> Allowed host header for HTTP transport (repeatable)
357
422
  -r, --remote <uuid> Connect to a remote extension via public relay
423
+ --devtools Use only chrome-devtools backend (bypasses extension relay)
358
424
  --relay-url <url> Custom relay server URL
359
425
 
360
426
  # OpenClaw helper
361
- npx -y --package @vibebrowser/mcp vibebrowser-mcp openclaw --remote <extension-uuid>
427
+ npx -y --package @vibebrowser/mcp vibebrowser-mcp openclaw --remote <extension-uuid> [--public-url <url>]
362
428
 
363
429
  # OpenClaw-compatible browser CLI
364
430
  npx -y --package @vibebrowser/mcp vibebrowser-cli --remote <extension-uuid> status
431
+ npx -y --package @vibebrowser/mcp vibebrowser-cli --remote <extension-uuid> status --wait-for-extension --wait-timeout 10000
365
432
  npx -y --package @vibebrowser/mcp vibebrowser-cli --remote <extension-uuid> tabs
366
433
  npx -y --package @vibebrowser/mcp vibebrowser-cli --remote <extension-uuid> snapshot --json
367
434
  npx -y --package @vibebrowser/mcp vibebrowser-cli --remote <extension-uuid> click 12
368
435
  npx -y --package @vibebrowser/mcp vibebrowser-cli --remote <extension-uuid> type 23 "hello" --submit
436
+ npx -y --package @vibebrowser/mcp vibebrowser-cli --devtools tabs
369
437
 
370
438
  # Local LLM server
371
439
  npx -y --package @vibebrowser/mcp vibebrowser-mcp serve <model> [options]
@@ -387,7 +455,7 @@ npx -y --package @vibebrowser/mcp vibebrowser-mcp serve <model> [options]
387
455
  1. Start `vibebrowser-mcp` in HTTP mode instead of stdio
388
456
  2. Make sure the bridge process is still running on the user's machine
389
457
  3. Confirm the extension is in `Remote` mode and connected
390
- 4. Verify the MCP URL in OpenClaw matches the bridge URL, usually `http://127.0.0.1:8788/mcp`
458
+ 4. Verify the MCP URL in OpenClaw matches the bridge URL. If OpenClaw is cloud-hosted, do not use `127.0.0.1`; use `openclaw --public-url` with a reachable host.
391
459
 
392
460
  ### Debug mode
393
461
 
@@ -1 +1 @@
1
- {"version":3,"file":"browser-cli.d.ts","sourceRoot":"","sources":["../src/browser-cli.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAsEpC,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAK7D;AAED,wBAAgB,4BAA4B,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAGnE"}
1
+ {"version":3,"file":"browser-cli.d.ts","sourceRoot":"","sources":["../src/browser-cli.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAmGpC,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAK7D;AAED,wBAAgB,4BAA4B,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAGnE"}