Skip to main content
Build a CI/CD alert channel that forwards deploy events into Claude Code, then upgrade it to a two-way service connector with replay support. By the end, you’ll understand how channels work end-to-end.
Prerequisites: A FrontMCP project initialized (see Installation). Channels require @frontmcp/sdk >= 1.0.0.

What You’ll Build

  1. A webhook channel that receives deploy events and pushes them to Claude Code
  2. Upgrade to a two-way channel where Claude can reply
  3. Add a service connector with outbound tools
  4. Add replay buffering for offline sessions

Step 1: Create the Channel

Create src/apps/devops/channels/deploy.channel.ts:
Key concepts:

Step 2: Register in an App

Create src/apps/devops/index.ts:

Step 3: Enable Channels in Server

Update src/main.ts:
Channels must be explicitly enabled with channels: { enabled: true }. Without this, channel declarations are ignored.

Step 4: Test It

Write an E2E test using createDirect():
When Claude Code connects to this server, it will see events as:

Step 5: Add Two-Way Support

Make it so Claude can reply to deploy events (e.g., to trigger a rollback):
Setting 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:
When a new Claude Code session connects, buffered events can be replayed. Replayed events include 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