Prerequisites: A FrontMCP project initialized (see Installation). Channels require
@frontmcp/sdk >= 1.0.0.What You’ll Build
- A webhook channel that receives deploy events and pushes them to Claude Code
- Upgrade to a two-way channel where Claude can reply
- Add a service connector with outbound tools
- Add replay buffering for offline sessions
Step 1: Create the Channel
Createsrc/apps/devops/channels/deploy.channel.ts:
| Part | Purpose |
|---|---|
@Channel() | Declares metadata — name, source, static meta |
ChannelContext | Base class providing logger, DI, and lifecycle hooks |
onEvent() | Inbound handler — receives external events, returns a notification for Claude |
source: { type: 'webhook', path: '...' } | Registers an HTTP POST endpoint |
meta | Static key-value pairs added to every notification |
Step 2: Register in an App
Createsrc/apps/devops/index.ts:
Step 3: Enable Channels in Server
Updatesrc/main.ts:
Step 4: Test It
Write an E2E test usingcreateDirect():
Step 5: Add Two-Way Support
Make it so Claude can reply to deploy events (e.g., to trigger a rollback):twoWay: true auto-registers a channel-reply tool. Claude can now call:
Step 6: Upgrade to Service Connector
For full bidirectional messaging (like WhatsApp), use a service connector with contributed tools:Step 7: Add Replay Buffer
Events that arrive while Claude is offline can be buffered and replayed:replayed: "true" in their meta so Claude can distinguish them from live events.
Next Steps
Channels Reference
Full channels documentation with all 7 source types
@Channel API
Complete decorator and configuration reference