{
  "markdown": "# Hookdeck Channel Plugin for Claude Code\n\nReceive webhooks from any provider (GitHub, Stripe, CI pipelines, monitoring tools) in your Claude Code session via [Hookdeck](https://hookdeck.com). Hookdeck captures, inspects, and forwards webhook events to Claude with stable URLs, event replay, and filtering — no tunnel setup required.\n\nChannels are in [research preview](https://code.claude.com/docs/en/channels#research-preview) and require Claude Code v2.1.80+.\n\n## Use-cases\n\n- **Iterate without re-triggering** — Capture a webhook once from your provider, then replay it every time you change your channel server code. No need to push another commit or create another test payment.\n- **Stable webhook URLs across restarts** — Your Hookdeck source URL stays the same between sessions. Reconfigure your webhook provider once and it keeps working no matter how many times you restart Claude Code or the CLI.\n- **Inspect what your channel actually receives** — See the full request body, headers, and response for every webhook in the CLI or Hookdeck dashboard. Useful when your channel notification formatting isn't producing what you expect.\n- **Filter out noise during development** — If you're subscribed to all GitHub events but only building a handler for push events, filter at the Hookdeck layer so your channel only receives what you're working on.\n- **Test multiple event types quickly** — Trigger one of each event type from your provider, then selectively replay them from Hookdeck's history as you build handlers for each one.\n- **Share webhook payloads with teammates** — Multiple developers can connect to the same Hookdeck source independently, each forwarding to their own local channel server without stepping on each other.\n\n## Architecture\n\n```\nExternal Service (GitHub, Stripe, CI, etc.)\n        ↓ POST webhook\nHookdeck Event Gateway (cloud)\n        ↓ captures, queues, inspects\nHookdeck CLI (forwards to localhost)\n        ↓\nThis Plugin (MCP server + HTTP listener)\n        ↓ notifications/claude/channel\nClaude Code Session (reacts to events)\n```\n\n## Prerequisites\n\n- [Bun](https://bun.sh) runtime\n- [Claude Code](https://claude.ai) v2.1.80+ with claude.ai login\n- [Hookdeck CLI](https://hookdeck.com/docs/cli) (for Approach A)\n- [Hookdeck API key](https://dashboard.hookdeck.com) (for Approach B)\n\n## Installation\n\n### From a marketplace\n\n```\n/plugin install hookdeck@<marketplace-name>\n```\n\n### For development\n\n```bash\nclaude --plugin-dir ./path/to/claude-channel-plugin\n```\n\n## Running with channels enabled\n\nChannels must be explicitly enabled per session with `--channels`:\n\n```bash\nclaude --channels plugin:hookdeck@<marketplace-name>\n```\n\nDuring the research preview, custom channels aren't on the approved allowlist. To test locally:\n\n```bash\nclaude --dangerously-load-development-channels plugin:hookdeck@<marketplace-name>\n```\n\nOr for a bare MCP server (no plugin wrapper):\n\n```bash\nclaude --dangerously-load-development-channels server:hookdeck-channel\n```\n\n## Setup\n\nAfter installing and enabling the plugin, configure your webhook sources.\n\n### Approach A: Manual (simpler)\n\nRun the Hookdeck CLI in another terminal:\n\n```bash\nhookdeck listen 8788 my-source\n```\n\nPoint your webhook provider at the Hookdeck source URL the CLI gives you.\n\n### Approach B: Auto-provision (more integrated)\n\nSet `HOOKDECK_API_KEY` and `HOOKDECK_SOURCES` environment variables in the plugin's `.mcp.json`. The plugin auto-creates Hookdeck connections and logs the source URLs on startup. You still need the Hookdeck CLI running to forward events locally:\n\n```bash\nhookdeck listen 8788 --cli-path /webhook\n```\n\n## Configuration\n\nAll configuration is via environment variables in the plugin's `.mcp.json`:\n\n| Variable | Default | Description |\n|---|---|---|\n| `HOOKDECK_PORT` | `8788` | Local HTTP server port |\n| `HOOKDECK_API_KEY` | — | Hookdeck API key (enables auto-provisioning) |\n| `HOOKDECK_SOURCES` | — | Comma-separated source names to provision |\n| `HOOKDECK_EVENT_FILTER` | — | Comma-separated event types to allow (e.g., `push,pull_request`) |\n| `HOOKDECK_ALLOWED_IPS` | — | Comma-separated IPs to allow (empty = allow all; localhost always allowed) |\n\n## Testing Locally\n\nWith the plugin running, send test webhooks:\n\n```bash\n./test/test-webhook.sh\n```\n\nOr manually:\n\n```bash\ncurl -X POST http://localhost:8788/webhook \\\n  -H \"Content-Type: application/json\" \\\n  -H \"x-hookdeck-source-name: test-source\" \\\n  -H \"x-github-event: push\" \\\n  -d '{\"ref\":\"refs/heads/main\",\"commits\":[{\"message\":\"fix bug\"}]}'\n```\n\n## Reply Tool\n\nThe plugin exposes a `hookdeck_reply` tool so Claude can send outbound HTTP requests in response to events — post PR comments, acknowledge alerts, trigger downstream services, etc.\n\n## How It Works\n\n1. On session start, a hook installs dependencies into `${CLAUDE_PLUGIN_DATA}` if needed\n2. The plugin starts a localhost HTTP server on `HOOKDECK_PORT` to receive forwarded webhooks\n3. It registers as an MCP server with the `claude/channel` capability (under `experimental`)\n4. Server `instructions` are added to Claude's system prompt so it knows how to handle events\n5. When a POST arrives at `/webhook`, it extracts metadata from Hookdeck headers and well-known webhook headers (GitHub, Stripe, GitLab)\n6. It emits a `notifications/claude/channel` notification with the payload as `content` and metadata as `meta` attributes\n7. Claude Code receives the event as a `<channel>` tag and acts on it\n\n## Plugin Structure\n\n```\nclaude-channel-plugin/\n├── .claude-plugin/\n│   └── plugin.json         # Plugin manifest\n├── .mcp.json                # MCP server config\n├── hooks/\n│   └── hooks.json           # SessionStart hook for dependency installation\n├── index.ts                 # MCP server + HTTP listener\n├── package.json             # Dependencies\n├── tsconfig.json\n├── README.md\n└── test/\n    └── test-webhook.sh      # curl commands for local testing\n```\n",
  "bytes": 5909,
  "sha": "d62389e2e8229eb2d9183e3fee0a07c205b301a782b71e606f9a51d6052d6d57",
  "repo_slug": "hookdeck/claude-channel-plugin",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/plg_hookdeck_claude_channel_plugin_hookdeck_afee3aac/readme"
}