{
  "markdown": "# Clawback\n\nA [Claude Code](https://docs.anthropic.com/en/docs/claude-code) channel plugin that connects to the hosted [Clawback server](https://getclawback.io) for persistent cron scheduling and webhook delivery.\n\n## How it works\n\nClawback has two parts:\n\n1. **This plugin** — a thin WebSocket client that runs as a Claude Code MCP server. It receives events from the remote server and dispatches them as channel notifications to Claude.\n2. **The server** ([getclawback.io](https://getclawback.io)) — a hosted service that receives webhooks, runs crons, manages accounts, and pushes events to connected plugins via WebSocket.\n\n```\nExternal Services ──POST──▶ Clawback Server ◀──WebSocket──▶ This Plugin ──▶ Claude Code\n                            (getclawback.io)                (MCP over stdio)\n```\n\nEvents are dispatched one at a time. Claude processes each event and calls `event_ack` to release the next. A reminder fires after 2 minutes, and a timeout auto-advances after 5 minutes.\n\n## Quick Start\n\n### 1. Authenticate\n\nVisit [getclawback.io/auth/cli](https://getclawback.io/auth/cli) to sign in with GitHub. You'll get a shell command to save your connection config — paste it in your terminal.\n\n### 2. Install the plugin\n\n```bash\ncd clawback\nbun install\n\n# Register the MCP server\nclaude mcp add -s user clawback -- bun run $(pwd)/src/index.ts\n```\n\n### 3. Launch\n\nRestart Claude Code. The plugin connects automatically on startup.\n\nOnce connected, tell Claude what you want — it has access to all the Clawback tools and will configure sources, crons, and routing for you.\n\n## Configuration\n\n`~/.claude/channels/clawback/config.json`:\n\n```json\n{\n  \"remote\": \"wss://getclawback.io/ws\",\n  \"connectionToken\": \"cbt_your_token_here\"\n}\n```\n\n| Field | Required | Description |\n|-------|----------|-------------|\n| `remote` | Yes | WebSocket URL of the Clawback server (`wss://` for production, `ws://` allowed for localhost only) |\n| `connectionToken` | Yes | Connection token (starts with `cbt_`) |\n| `notifications` | No | Desktop notifications when events are processed (default: `false`) |\n| `sessionMessaging` | No | Allow receiving messages from other sessions (default: `false`) |\n| `dataDir` | No | Local data directory (default: `~/.claude/channels/clawback`) |\n\n## Features\n\n- **Webhooks** — External services POST to the server, events are pushed to Claude in real-time via WebSocket\n- **Crons** — Create persistent cron jobs through Claude (\"create a cron that runs /catchup every morning at 9am\"). Crons are stored on the server and survive across sessions.\n- **Webhook Verification** — The server supports GitHub HMAC-SHA256, Stripe signatures, and generic HMAC verification\n- **Multi-account** — The server supports multiple users with isolated event queues, webhook sources, and cron jobs\n- **Auto-reconnect** — If the WebSocket connection drops, the plugin reconnects automatically with exponential backoff. Events queue up on the server and drain when you reconnect.\n- **Sequential Dispatch** — Events are delivered one at a time. Claude calls `event_ack` when done, releasing the next event. Includes a reminder nudge (2 min) and timeout (5 min) as safety nets.\n- **Inter-agent messaging** — Sessions can send messages directly to each other via `session_send` and discover peers with `session_list`. Messages to offline sessions are durably queued. Enables multi-agent coordination without any webhook setup. Opt-in: set `\"sessionMessaging\": true` in config.\n- **Priority and interrupt** — Events can be marked as `priority` (jumps to front of queue) or `interrupt` (stops the current event, re-queues it, and dispatches immediately). Set on sources, crons, or session messages.\n\n## Project Structure\n\n```\nsrc/\n  index.ts              Entry point — config, WS client, MCP server, shutdown\n  mcp.ts                MCP server with channel capability + cron/ack tools\n  queue.ts              EventQueue — one-at-a-time dispatch with reminder + timeout\n  config.ts             Loads ~/.claude/channels/clawback/config.json\n  ws/\n    client.ts           WebSocket client with auto-reconnect + heartbeat\n    protocol.ts         Shared message types (ServerMessage, ClientMessage)\n```\n\n## Dependencies\n\n- [`@modelcontextprotocol/sdk`](https://github.com/modelcontextprotocol/sdk) — MCP server + stdio transport\n- [`croner`](https://github.com/Hexagon/croner) — Cron expression validation\n\n## License\n\nMIT\n",
  "bytes": 4419,
  "sha": "9260fc3ddbf4f0ca2c84770d4d43690505f70482280108a8a58ce5b90062670a",
  "repo_slug": "clawback-io/clawback",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/plg_clawback_io_clawback_clawback_c57fb8f9/readme"
}