# Weavetab MCP Documentation > **Package:** `@weavetab/mcp` | **Version:** 2.6.4 | **License:** AGPLv3 | **Author:** Weavetab (owned by fy2ne) --- ## Overview Weavetab is an in-process MCP (Model Context Protocol) server providing AI agents with direct control across Chromium browsers and Electron desktop applications. It communicates directly over the Chrome DevTools Protocol (CDP) WebSocket — no WebDriver process, no browser binary download, no cloud middleware. ### Core Capabilities - **40 Built-in MCP Tools** across functional categories (Vision, Navigation, Input, Tabs, Mission Execution, Dialog, Wait, Storage, Device, Network, Canvas, Output, Evaluation, Office Documents) - **Direct CDP WebSocket** — Local in-process transport, zero external driver overhead - **Semantic Delta Engine** — Per-tab snapshot diffing returning only added, modified, or removed elements - **Ghost Cursor** — Bézier curve click engine with human acceleration and jitter - **Human Typing Engine** — burst-pattern profiling, per-character jitter, natural pauses - **Blind Injection** — host-isolated credential injection via `secrets.json` with domain scoping, Shadow DOM isolation, and JS property hardening - **Self-Learning** — per-domain session memory, knowledge hints, automatic framework detection - **Security Stack** — domain blacklist, RBAC (5 roles), rate limiter, loop detection, input filter, root guard - **Burst Mode** — chain N actions in 1 MCP call via `browser_burst` - **Plugin System** — Extensible plugin ecosystem supporting tool additions, `/` commands (MCP prompts), `@` mentions (MCP resources & URI templates), overrides (with originalHandler wrapping), and tool removals across 3 trust tiers (Official, Verified, Unverified) - **Built-in `/` Commands & `@` Mentions** — `/page_context`, `/agent`, and `@active-tab` (`weavetab://active-tab`) for zero-tool-call context injection - **GitHub Automation (Plugin)** — Repo analysis, file reading, issues, and PRs are provided by the official `@weavetab/plugin-github` plugin, not built in ### Weavetab Skills **Weavetab Skills** is an optional companion package (`@weavetab/skills`) that provides pre-built workflow patterns and mission templates for AI agents. These skills help agents understand complex Weavetab workflows and execute multi-step missions more effectively. **Installation:** ```bash npm install -g @weavetab/skills ``` **Available Skills:** - **Multi-step Form Automation** — Complex form filling with validation handling - **E-commerce Checkout** — Shopping cart navigation and payment processing - **Data Extraction Pipelines** — Structured data scraping and export - **Content Management Systems** — WordPress, Drupal, and CMS-specific workflows - **API Testing & Validation** — Endpoint testing and response verification Skills are automatically discovered by compatible MCP clients and provide context-aware guidance for mission planning. --- ## Architecture ``` MCP Client → stdio/WebSocket → WithSecurity Pipeline → CDP WebSocket → Chromium (RateLimit → DomainPolicy → RBAC) ``` ### Five Architectural Layers | Layer | Components | Responsibility | |-------|-----------|----------------| | **Transport** | stdio (JSON-RPC), WebSocket (port 3000) | MCP client communication | | **Security & Governance** | Domain blacklist, Rate limiter, RBAC, Root guard, Storage blocker | Pre-flight checks | | **Intelligence** | Session memory, Delta engine, DOM pruner, Trail/loop detection, Knowledge hints, Vision fallback | Token optimization, self-learning | | **Sensor Systems** | Network telemetry, DOM mutations, Human pacing, Agent state machine, Thought HUD | Runtime awareness | | **CDP Bridge** | DOM walker, Ghost cursor, Keystroke engine, Pruner, Shadow DOM injector, Tab manager, Browser launcher | Browser control | --- ## Tool Reference (40 Tools) All tools share: Zod schema validation, `withSecurity()` pipeline (rate limiting + specificity-ordered domain policy + fail-closed RBAC + per-tool timeout budgets), and structured audit logging. ### Vision & Reading (7 tools) | Tool | Description | |------|-------------| | `browser_map` | DOM enumeration with volatile `w:NN` ref IDs, cached map reuse, `depth: 0` DOM init, Set-of-Marks visual grounding (`visual: true` / `"auto"`), container binding, modal hoisting, nav cluster collapsing, delta diffing, and scope filtering. | | `browser_find` | Native CDP text search with single and multi-match (`all: true`, `limit: N`), null-body safety, and secret redaction on matched labels without a full DOM walk | | `browser_scrape` | CSS/XPath structured data extraction in 1 CDP call with unified retry preserving `multiple: false`, live `.value`, and secret redaction | | `browser_inspect` | Parallel CDP inspection returning computed styles, inline styles, box model, and event listener types with Shadow DOM fallback | | `browser_snapshot` | MHTML capture/restore of DOM state + resources with non-destructive CSS capture masking, MHTML secret redaction, verified restore paths, and `pathToFileURL()` | | `browser_screenshot` | PNG/JPEG capture via CDP with non-destructive CSS secret masking and accurate scaled dimensions on >1280px viewports (base64 data URL, zero disk I/O) | | `browser_console` | Read/clear buffered console logs and exceptions (`0`/`false` preserved, noise filtered across all paths, secrets redacted, 1,000-char entry cap) | ### Navigation (1 tool) | Tool | Description | |------|-------------| | `browser_navigate` | Direct CDP navigation with domain blocklist enforcement, Electron-safe defaults (skips web cookie auto-click), guaranteed non-empty title fallback, and `weavetab://` protocol | ### Input (9 tools) | Tool | Description | |------|-------------| | `browser_click` | Ghost Cursor (Bézier) click with visual mark targeting (`mark: N`), intent memory, opt-in `include_map`, Electron URL safety, and stuck-loop detection | | `browser_type` | Human keystroke engine with zero-target `document.activeElement` typing, exact ref/selector targeting, anti-unfocus guard, jitter, and burst patterns | | `browser_type_secret` | Blind Injection from `secrets.json` — strict domain check blocking empty-hostname URLs (`file://`, `about:blank`), exact ref matching, `target: "focused"`, and DOM property hardening | | `browser_key` | Native keyboard dispatch with combo hotkeys (`"Ctrl+A"`, `"Cmd+K"`), printable text payloads, and Electron-safe `Enter` handling | | `browser_pointer` | Hover, double-click, drag-and-drop (`buttons: 1`, `end_ref` coordinate verification), and multi-level flyout menu traversal via `hover_chain` | | `browser_select` | Native `