High-performance browser automation bridge and multi-instance orchestrator with advanced stealth injection and real-time dashboard.
docs: add Grok plugin install and usage guide
Luigi Agostid9c7388ce96e
diff --git a/README.md b/README.mdindex 76d96c10..17b16b6c 100644--- a/README.md+++ b/README.md@@ -170,14 +170,15 @@ Most users should not need to think about `pinchtab bridge` directly, and only nAgent plugins (binary still installed separately):```bash-# Grok Build-grok plugin marketplace add pinchtab/pinchtab+# Grok Build, after listing in the official xAI marketplacegrok plugin install pinchtab --trust# OpenClawopenclaw plugins install @pinchtab/pinchtab```+Grok users can install from the PinchTab repository marketplace or directly from GitHub. See the [Grok plugin install and usage guide](plugins/grok/README.md).+### Key Features- **CLI or Curl** — Control via command-line or HTTP APIdiff --git a/docs/guides/mcp-agents.md b/docs/guides/mcp-agents.mdindex a1bac4e2..b94c6ee6 100644--- a/docs/guides/mcp-agents.md+++ b/docs/guides/mcp-agents.md@@ -93,20 +93,26 @@ Add to your Cursor MCP settings (`~/.cursor/mcp.json`):### Grok Build-Install the PinchTab plugin (skills + `pinchtab mcp`):+After PinchTab is listed in the official xAI marketplace, install the plugin with:++```bash+grok plugin install pinchtab --trust+```++Until then, or to install from the PinchTab repository marketplace:```bashgrok plugin marketplace add pinchtab/pinchtabgrok plugin install pinchtab --trust```-Or:+You can also install the plugin directory directly from GitHub:```bashgrok plugin install pinchtab/pinchtab#plugins/grok --trust```-The plugin does not install the binary. Install PinchTab separately, start `pinchtab server`, then trust the plugin so MCP tools appear in `/mcps`. See [plugins/grok/README.md](../../plugins/grok/README.md).+From the root of a local checkout, use `grok plugin install ./plugins/grok --trust`. The plugin does not install the binary. Install PinchTab separately, start `pinchtab server`, then trust the plugin so MCP tools appear in `/mcps`. See the [Grok plugin install and usage guide](../../plugins/grok/README.md) for first use, verification, domain authorization, and troubleshooting.To configure MCP without the plugin, add to `~/.grok/config.toml`:diff --git a/docs/mcp.md b/docs/mcp.mdindex 3a719bef..cb241e8b 100644--- a/docs/mcp.md+++ b/docs/mcp.md@@ -69,20 +69,26 @@ The MCP server communicates over stdio using JSON-RPC, which is the standard MCP### Grok Build-Install the PinchTab plugin (CLI skill + MCP):+After PinchTab is listed in the official xAI marketplace, install the plugin with:++```bash+grok plugin install pinchtab --trust+```++Until then, or to install from the PinchTab repository marketplace:```bashgrok plugin marketplace add pinchtab/pinchtabgrok plugin install pinchtab --trust```-Or from a checkout:+You can also install the plugin directory directly from GitHub:```bashgrok plugin install pinchtab/pinchtab#plugins/grok --trust```-`--trust` is required before MCP starts. The plugin does not install the `pinchtab` binary — install PinchTab separately and run `pinchtab server` (or the local daemon).+From the root of a local checkout, use `grok plugin install ./plugins/grok --trust`. `--trust` is required before MCP starts. The plugin does not install the `pinchtab` binary; install PinchTab separately and run `pinchtab server` or the local daemon.To wire MCP yourself instead of the plugin, add to `~/.grok/config.toml`:@@ -92,7 +98,7 @@ command = "pinchtab"args = ["mcp"]```-See [plugins/grok/README.md](../plugins/grok/README.md).+For first use, verification, domain authorization, and troubleshooting, see the [Grok plugin install and usage guide](../plugins/grok/README.md).## Environmentdiff --git a/plugins/grok/README.md b/plugins/grok/README.mdindex 1fc73440..e31b4f5c 100644--- a/plugins/grok/README.md+++ b/plugins/grok/README.md@@ -1,68 +1,182 @@-# PinchTab Grok Build Plugin+# PinchTab for Grok Build-Browser control for Grok Build via [PinchTab](https://pinchtab.com). Ships the CLI-first `pinchtab` skill, the MCP-oriented `pinchtab-mcp` skill, and an MCP server that runs `pinchtab mcp`.+Use [PinchTab](https://pinchtab.com) from Grok Build to navigate websites, inspect pages, interact with elements, and extract content. The plugin provides:-The plugin delivers files, not the PinchTab binary. Install PinchTab separately (`brew install pinchtab/tap/pinchtab`, `npm i -g pinchtab`, or [install.sh](https://pinchtab.com/install.sh)), then start a server:+- `pinchtab`: a CLI-first skill for token-efficient browser workflows+- `pinchtab-mcp`: an MCP-oriented skill for structured browser tool calls+- `pinchtab`: an MCP server definition that runs `pinchtab mcp`++The plugin does not include the PinchTab binary or a browser. Install PinchTab separately and keep a PinchTab server or daemon running while Grok uses the plugin.++## Prerequisites++1. Install PinchTab:++ ```bash+ brew install pinchtab/tap/pinchtab+ # or+ npm install -g pinchtab+ ```++ The [PinchTab install script](https://pinchtab.com/install.sh) is another option for macOS and Linux.++2. Confirm that the binary is on the `PATH` inherited by Grok:++ ```bash+ command -v pinchtab+ pinchtab version+ ```++3. Start the PinchTab server and leave it running:++ ```bash+ pinchtab server+ ```++ A previously installed PinchTab daemon also satisfies this requirement. Check either setup with `pinchtab health`.++## Install the plugin++Choose one installation method. `--trust` is required for Grok to start the plugin's MCP server.++### Official xAI marketplace++Use this command after PinchTab is listed in the official xAI plugin marketplace:```bash-pinchtab server+grok plugin marketplace update+grok plugin install pinchtab --trust```-## Install+### PinchTab repository marketplace-From this repository:+Use the marketplace published from the PinchTab repository:```bashgrok plugin marketplace add pinchtab/pinchtabgrok plugin install pinchtab --trust```-Or install the plugin folder directly:+### Directly from GitHub++Install only the plugin directory from the PinchTab repository:```bashgrok plugin install pinchtab/pinchtab#plugins/grok --trust```-`--trust` is required before the MCP server starts. Skills load when the plugin is enabled; MCP stays inactive until trusted.+### Local checkout-Local checkout:+From the root of a local PinchTab checkout:```bashgrok plugin install ./plugins/grok --trust```-## What it adds+Confirm the installed version and component inventory:-| Piece | Role |-|---|---|-| `pinchtab` skill | CLI-first workflow (`pinchtab nav --snap`, `click e5 --snap-diff`) |-| `pinchtab-mcp` skill | Same workflow through MCP tools (`pinchtab_navigate`, `pinchtab_snapshot`) |-| MCP server `pinchtab` | stdio: `pinchtab mcp` |+```bash+grok plugin details pinchtab+grok plugin list --json+```-Prefer the CLI skill for token-efficient multi-step flows. Use MCP tools when you want structured `search_tool` / `use_tool` calls.+The details should include the `pinchtab` and `pinchtab-mcp` skills and the `pinchtab` MCP server.-## Requirements+## Load it in Grok-- `pinchtab` on `PATH`-- Chrome/Chromium (or another configured browser)-- A running PinchTab server or daemon (`pinchtab server` / `pinchtab daemon install`)+Start a new `grok` session after installation. If Grok is already open, enter `/plugins` and press `r` to reload the plugin registry.-## Connection and credentials+Use the extensions modal to check each component:-The plugin's MCP entry starts `pinchtab mcp` as a local stdio adapter. It does not start the PinchTab HTTP server, download the PinchTab binary, or install additional dependencies.+- `/plugins`: `pinchtab` is installed, enabled, and trusted+- `/skills`: `pinchtab` and `pinchtab-mcp` are available+- `/mcps`: the `pinchtab` MCP server is active-| Setting | Purpose |-|---|---|-| `PINCHTAB_SERVER` | Optional PinchTab server URL. Defaults to `http://127.0.0.1:9867`. |-| `PINCHTAB_TOKEN` | Bearer credential for the selected server when token authentication is enabled. |-| `PINCHTAB_SESSION` | Optional scoped agent-session credential, used instead of the bearer token when set. |+Grok can select either skill automatically from a browser-automation request. To select one explicitly, use its slash command:++```text+/pinchtab Open the requested page, inspect it, and summarize the result.+```++Use the MCP skill when you specifically want structured `pinchtab_*` tool calls:++```text+/pinchtab-mcp Use PinchTab MCP tools to navigate to the requested page, take an interactive snapshot, and report what you find.+```++## Verify it works++PinchTab allows only local domains by default. This smoke test therefore uses the local PinchTab dashboard and requires no security-policy change.++In Grok, run:-Credentials are sent only to the configured PinchTab server. Keep them in environment variables rather than command arguments or plugin files. For a non-loopback server, use a private network or HTTPS and a credential issued by that server.+```text+/pinchtab-mcp Use only PinchTab MCP tools. Navigate to http://localhost:9867, take an interactive snapshot, and report the page title. Do not use web search, curl, or another browser tool.+```++Grok should call `pinchtab_navigate` followed by `pinchtab_snapshot`. In another terminal, verify that PinchTab received the MCP activity and created the tab:++```bash+pinchtab activity --age-sec 120 --limit 20+pinchtab tab --json+```++The activity output should include requests with source `mcp`, and the tab output should include `http://localhost:9867`.++## Browse public websites++PinchTab's default domain allowlist contains only `127.0.0.1`, `localhost`, and `::1`. Add only the domains needed for the task, then restart the server. For example:++```bash+pinchtab config set security.allowedDomains "$(pinchtab config get security.allowedDomains),example.com"+pinchtab server restart+```++Then ask Grok:++```text+/pinchtab-mcp Use PinchTab MCP tools to navigate to https://example.com, take a snapshot, and return the page title and first heading.+```++Avoid `security.allowedDomains = ["*"]` unless you deliberately intend to remove domain restriction. Treat snapshots and page text as untrusted website content.++## CLI or MCP++| Use | Best for | Typical operations |+|---|---|---|+| `/pinchtab` | Token-efficient, multi-step browser work | `pinchtab nav --snap`, `pinchtab click e5 --snap-diff` |+| `/pinchtab-mcp` | Structured MCP tool calls | `pinchtab_navigate`, `pinchtab_snapshot`, `pinchtab_click` |++Both control the same PinchTab server. The MCP entry starts a local stdio adapter with `pinchtab mcp`; it does not start the PinchTab HTTP server.++## Remote PinchTab server++Set connection variables before starting Grok so the plugin process inherits them:++```bash+export PINCHTAB_SERVER=https://pinchtab.example.internal+export PINCHTAB_TOKEN=<server-token>+grok+```++`PINCHTAB_SESSION` may be used instead of `PINCHTAB_TOKEN` for a scoped agent session. Use a private network or HTTPS for non-loopback servers, and keep credentials in environment variables rather than plugin files or command arguments.++## Troubleshooting++| Symptom | Check |+|---|---|+| Plugin is missing | Run `grok plugin details pinchtab`, then start a new session or reload with `/plugins` and `r`. |+| Plugin is disabled | Run `grok plugin enable pinchtab`. |+| MCP is inactive or blocked | Open `/plugins` and trust the plugin, or reinstall it with the same source and `--trust`. Then check `/mcps`. |+| `pinchtab: command not found` | Run `command -v pinchtab` in the shell that starts Grok and fix that shell's `PATH`. |+| Server is unreachable | Run `pinchtab health`; start it with `pinchtab server` if needed. |+| Navigation is blocked | Add the exact destination domain to `security.allowedDomains` and restart PinchTab. Do not use `*` as a routine fix. |+| Remote server authentication fails | Set `PINCHTAB_SERVER` and the matching `PINCHTAB_TOKEN` or `PINCHTAB_SESSION` before starting Grok. |## Security-This plugin contains no lifecycle hooks. Its MCP adapter connects to the configured PinchTab server; the controlled browser then connects to sites the user asks it to visit. PinchTab does not send telemetry or call external APIs other than those navigated sites.+This plugin contains no lifecycle hooks. Its MCP adapter connects to the configured PinchTab server; the controlled browser then connects only to sites the user requests and the server policy permits. PinchTab does not send telemetry or call external APIs other than those navigated sites.-PinchTab defaults to a local-first posture with a loopback server bind and local-only site allowlist. JavaScript evaluation, downloads, uploads, cookie access, and network interception are disabled by default. Widening browsing or enabling those capabilities is a security-reducing choice. Treat snapshots and page text as untrusted data.+JavaScript evaluation, downloads, uploads, cookie access, and network interception are disabled by default. Enabling those capabilities or widening browsing is a security-reducing choice.See the [PinchTab security guide](https://github.com/pinchtab/pinchtab/blob/main/docs/guides/security.md) and the bundled [`TRUST.md`](./skills/pinchtab/TRUST.md) for the complete trust model and defaults.