JSPM

  • Created
  • Published
  • Downloads 15
  • Score
    100M100P100Q114863F
  • License MIT

Claude Code channel app for clawborrator: an stdio MCP server that bridges to a remote clawborrator hub via WebSocket so collaborators can prompt the same Claude Code session from a browser.

Package Exports

    This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (clawborrator-channel) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

    Readme

    clawborrator channel

    npm

    Claude Code side of clawborrator. A stdio MCP server that dials out to a clawborrator hub over WebSocket and relays prompts, replies, and tool-permission verdicts in both directions.

    The hub lives at clawborrator/hub.

    Claude Code only. This channel uses Claude Code's experimental <channel> notification protocol (--dangerously-load-development-channels). It does not work with Claude Desktop, the Claude API, or any other client — Claude Desktop's claude_desktop_config.json MCP slot routes tool calls but doesn't deliver inbound channel notifications, so the remote operator's prompts never reach the model. If you wire the channel into claude_desktop_config.json you'll see the MCP server connect but nothing will flow.

    Use

    No clone, no npm install. Sign in at https://clawborrator.com with GitHub, mint a channel token at /settings, then add this to .mcp.json in your project root (or ~/.claude.json for user-level — note: ~/.claude.json, not ~/Library/Application Support/Claude/claude_desktop_config.json):

    {
      "mcpServers": {
        "clawborrator": {
          "command": "npx",
          "args": ["-y", "clawborrator-channel"],
          "env": {
            "CLAWBORRATOR_HUB_URL": "wss://clawborrator.com",
            "CLAWBORRATOR_TOKEN":   "ck_live_..."
          }
        }
      }
    }

    npx -y clawborrator-channel fetches the latest published version on first run, caches it, and uses the cache on subsequent runs.

    Then start Claude Code with custom channels enabled (research-preview flag):

    claude --dangerously-load-development-channels server:clawborrator

    Env vars

    Var Default Purpose
    CLAWBORRATOR_HUB_URL ws://localhost:8787 Hub WebSocket URL. Use wss://clawborrator.com for the hosted hub.
    CLAWBORRATOR_TOKEN (required) Bearer token for WS upgrade. Mint at <hub>/settings. Channel exits on missing.
    CLAWBORRATOR_SESSION_ID random UUID Stable session id (see below).
    CLAWBORRATOR_SOURCE clawborrator <channel source="…"> attribute Claude sees.

    Durable session IDs

    By default each Claude Code restart spawns a fresh session row in the hub dashboard (a new random UUID per process). That's usually what you want — each terminal instance is a real, distinct session.

    If you'd rather keep the same dashboard row across restarts (e.g. you restart Claude Code several times a day on the same project and don't want a new "session" entry each time), set CLAWBORRATOR_SESSION_ID to a UUID of your choosing in .mcp.json:

    {
      "mcpServers": {
        "clawborrator": {
          "command": "npx",
          "args": ["-y", "clawborrator-channel"],
          "env": {
            "CLAWBORRATOR_HUB_URL":    "wss://clawborrator.com",
            "CLAWBORRATOR_TOKEN":      "ck_live_...",
            "CLAWBORRATOR_SESSION_ID": "8b7d2a3a-9c0e-4ff4-9c40-1a2b3c4d5e6f"
          }
        }
      }
    }

    The hub keys session state by this id, so the same channel ID will re-attach to the same hub-side session on reconnect (chat history, shares, queue all preserved). One CLAWBORRATOR_SESSION_ID per project: set it in the project's .mcp.json and don't reuse the same value across different projects.

    Generate a fresh UUID with uuidgen (macOS/Linux) or [guid]::NewGuid() (PowerShell).

    Transcript-tail hooks (optional)

    By default the hub only sees prompts you send and Claude's final replies. The intermediate work — every Read, Edit, Bash invocation — happens inside your local Claude Code process and never crosses the channel. Install the transcript-tail hooks to fan tool calls out to the hub so remote operators see them inline as ▸ Read foo.js / ▸ Bash npm test (12s, ok) in the chat log.

    From your project root, with Claude Code running:

    npx -y clawborrator-channel install-hooks

    Or — to skip the explicit install step — add CLAWBORRATOR_AUTO_INSTALL_HOOKS=true to your .mcp.json env block. The channel will install the hooks on every MCP boot (idempotent; fast no-op once present). On a fresh project the hooks won't fire until the next CC restart since Claude Code reads .claude/settings.json at session start, before MCP servers spawn.

    This is idempotent and writes two things:

    • .claude/hooks/clawborrator-tail.mjs — a small self-contained Node script that POSTs each hook event to the hub.
    • .claude/settings.json — adds entries under hooks.PreToolUse, hooks.PostToolUse, hooks.Stop, hooks.SubagentStop, and hooks.Notification that point at the script.

    Restart Claude Code after installing so the new hook config loads.

    To remove the hooks later:

    npx -y clawborrator-channel uninstall-hooks

    The hook script reads the same CLAWBORRATOR_* env vars from your .mcp.json — no extra setup. Each event POSTs with a 800 ms / 2 s timeout (tighter for PreToolUse since that one blocks Claude). Failures log to stderr and exit 0; the hook never blocks your turn.

    What flows through:

    Hook event Renders as
    PreToolUse ▸ Read foo.js (placeholder while the tool runs)
    PostToolUse folds into the matching PreToolUse line, adding (ok, 12s) or (err)
    Stop late assistant text — only shows when Claude finished a turn without calling the reply MCP tool
    SubagentStop summary text from a Task subagent
    Notification idle / waiting / thinking transitions

    Server-side redaction strips common secrets (API keys, GitHub tokens, AWS keys, KEY=value patterns) from previews, and previews truncate to 2 KB.

    Development

    If you're hacking on the channel itself, clone the repo and point args at the local file instead:

    {
      "command": "node",
      "args": ["/abs/path/to/clawborrator/channel/channel.js"]
    }