High-performance browser automation bridge and multi-instance orchestrator with advanced stealth injection and real-time dashboard.
docs: add SMCP setup (env vars and paths) and README link
root82eb6f6d74ce
diff --git a/README.md b/README.mdindex de7bb5d2..3f917907 100644--- a/README.md+++ b/README.md@@ -136,6 +136,10 @@ Full docs at **[pinchtab.com/docs](https://pinchtab.com/docs)**- **[CLI Reference](https://pinchtab.com/docs/cli-reference)** — Command-line commands- **[Configuration](https://pinchtab.com/docs/configuration)** — Environment variables+### MCP (SMCP) integration++An **SMCP plugin** in this repo lets AI agents control PinchTab via the [Model Context Protocol](https://github.com/sanctumos/smcp) (SMCP). One plugin exposes 15 tools (e.g. `pinchtab__navigate`, `pinchtab__snapshot`, `pinchtab__action`). No extra runtime deps (stdlib only). See **[plugins/README.md](plugins/README.md)** for setup (env vars and paths).+---## Examplesdiff --git a/plugins/README.md b/plugins/README.mdindex 75bdaf16..6ea389ba 100644--- a/plugins/README.md+++ b/plugins/README.md@@ -2,6 +2,22 @@This directory contains MCP (SMCP) plugins for use with [sanctumos/smcp](https://github.com/sanctumos/smcp) or compatible MCP servers.+## What is SMCP?++**SMCP** is an MCP (Model Context Protocol) server used in the Animus/Letta/Sanctum ecosystem. It discovers plugins in a directory (e.g. `plugins/`), runs `python cli.py --describe` to get tool schemas, and exposes each command as an MCP tool (e.g. `pinchtab__navigate`). AI agents can then call PinchTab through the MCP layer without using HTTP directly.++## SMCP setup (env and paths)++- **Plugin directory:** Point your MCP server at this repo’s `plugins/` directory.+ - **SMCP:** Set `MCP_PLUGINS_DIR` to the absolute path of `plugins/` (e.g. `/path/to/pinchtab/plugins`), or copy the `pinchtab` folder into your existing SMCP `plugins/` directory.+- **PinchTab URL:** The plugin defaults to `http://localhost:9867` (orchestrator). Agents pass `base_url` (and optionally `token`, `instance_id`) per tool call; no extra env vars are required for the plugin itself.+- **Optional:** If PinchTab is protected with `BRIDGE_TOKEN`, agents must pass `token` in the tool args (or you can set it in your MCP server config if it supports per-plugin env).++**Quick check:** From the repo root:+```bash+cd plugins/pinchtab && python3 cli.py --describe | head -20+```+## pinchtabFull SMCP plugin for the PinchTab HTTP API: navigate, snapshot, action, text, screenshot, PDF, instances, tabs, and more.diff --git a/plugins/pinchtab/README.md b/plugins/pinchtab/README.mdindex efd5d7fa..7733848f 100644--- a/plugins/pinchtab/README.md+++ b/plugins/pinchtab/README.md@@ -41,6 +41,12 @@ SMCP (MCP) plugin for [PinchTab](https://github.com/pinchtab/pinchtab): browser- **Orchestrator + instance:** When using the orchestrator, pass `--instance-id inst_xxxx` for instance-scoped calls (navigate, snapshot, action, etc.).- **Token:** `--token YOUR_TOKEN` when PinchTab is protected with `BRIDGE_TOKEN`.+## SMCP setup (env and paths)++- **MCP_PLUGINS_DIR:** Set to the path of the **parent** `plugins/` directory (the one that contains the `pinchtab` folder). Example: if this repo is at `/home/me/pinchtab`, use `MCP_PLUGINS_DIR=/home/me/pinchtab/plugins`. SMCP will then find `plugins/pinchtab/cli.py` and run `python cli.py --describe`.+- **No plugin-specific env required:** Base URL, token, and instance ID are passed per tool call by the agent. Default base URL is `http://localhost:9867`.+- **Venv (optional):** For running tests only: `cd plugins/pinchtab && python3 -m venv .venv && .venv/bin/pip install pytest && .venv/bin/pytest tests/ -v`. The plugin itself uses stdlib only and does not require a venv at runtime.+## Example (SMCP tool call)Agent calls tool `pinchtab__navigate` with args: