Claude Code Channels

Complete Beginner-Friendly Chapter • Push External Events into a Running Claude Code Session
BIG IDEA

Channels let outside systems push events directly into an already-running Claude Code session.

A channel is an MCP server that can push messages, alerts and webhooks into the Claude Code session you already have open. Claude can react to events from Telegram, Discord, iMessage, CI systems, monitoring tools or other external services without starting a fresh session.

Current status: Channels are a research preview. They require Anthropic authentication through claude.ai or a Console API key, and they are not available through Amazon Bedrock, Google Cloud's Agent Platform, or Microsoft Foundry. Team and Enterprise organizations must explicitly enable them.

1. What Is a Channel?

A Channel connects an external event source to a running local Claude Code session. The external system sends an event through an MCP server, and that event is injected into the session Claude is already using.

External platform Channel MCP server Running Claude Code Claude reacts Reply through channel
Simple example:
You are debugging a Spring Boot application on your laptop. You walk away from your desk. A CI failure arrives through a configured channel. Claude receives the event in the same session, sees the repository and debugging context it already has, and can investigate.

The key difference

A normal MCP server is something Claude queries during a task. A Channel can push an event into Claude's running session even when you are not at the terminal.

2. Why Use Channels?

📱 Chat bridge
Talk to your local Claude Code session from Telegram, Discord or iMessage.
🚨 CI alerts
Push build/deployment failures directly into a debugging session.
📈 Monitoring
Forward monitoring or error events while Claude has the project open.
🔗 Webhooks
Connect external services that can emit webhooks.
🧠 Existing context
Events arrive in the session that already knows what you were doing.
↔ Two-way
Claude can reply through the same channel when the channel supports replies.
Memory trick:
MCP normally means “Claude asks an external system.”
Channel means “an external system can tell Claude something.”

3. Channel Architecture

A Channel is implemented as an MCP server. The channel server receives external messages and injects them into Claude Code as channel events.

Telegram / Discord / iMessage / CI / Webhook
                    │
                    ▼
             Channel MCP Server
                    │
                    ▼
        Running Claude Code Session
                    │
                    ▼
              Claude's tools
                    │
                    ▼
          Reply through the channel

Important: the session must be running

Channel events only arrive while the Claude Code session is open. If you want an always-on setup, run Claude in a background process or another persistent terminal environment.

A Channel is not the same thing as a scheduled task. A scheduled task runs a prompt at a scheduled time. A Channel reacts to an external event that is pushed into the session.

4. Channels vs Other Claude Code Features

FeatureWhat it doesBest use
Claude Code on the web Runs work in a fresh cloud sandbox cloned from GitHub. Delegate self-contained async work.
Claude in Slack An @Claude mention starts a web session. Start work directly from team conversations.
Standard MCP server Claude queries external tools/data during a task. On-demand access to systems.
Remote Control You drive your local session from claude.ai or the mobile app. Steer an existing session remotely.
Channels External systems push events into the already-running local session. Chat bridges, webhooks, CI and monitoring events.
Channel's unique position: It combines external event delivery with the context of the Claude Code session that is already running against your real local files.

5. Supported Channels

The current research preview includes official plugins for:

Telegram
Use a Telegram bot as a two-way chat bridge.
Discord
Use a Discord bot to send messages to Claude and receive replies.
iMessage
macOS-only integration using the local Messages database and AppleScript.

Each supported channel is installed as a plugin and requires Bun. The official fakechat channel is also available as a local demonstration.

6. Telegram Channel Setup

Step 1 — Create a Telegram bot

Open Telegram's BotFather and send:

/newbot

Give the bot a display name and unique username ending in bot. Copy the token returned by BotFather.

Step 2 — Install the official plugin

/plugin install telegram@claude-plugins-official

If the official marketplace is unavailable:

/plugin marketplace add anthropics/claude-plugins-official

Then install again.

Step 3 — Configure the token

/telegram:configure <token>

The plugin saves the token under:

~/.claude/channels/telegram/.env

Alternatively, set:

TELEGRAM_BOT_TOKEN

in your shell environment before launching Claude Code.

Step 4 — Start Claude with the channel

Exit Claude Code and restart:

claude --channels plugin:telegram@claude-plugins-official

Step 5 — Pair your account

Send any message to your Telegram bot. The bot returns a pairing code. In Claude Code:

/telegram:access pair <code>

Then restrict access:

/telegram:access policy allowlist
Telegram flow:
BotFather → Install plugin → Configure token → Restart with --channels → Message bot → Pair code → Allowlist.

7. Discord Channel Setup

Step 1 — Create a Discord application/bot

Open the Discord Developer Portal, create a new application, go to the Bot section, create a username, reset the token and copy it.

Step 2 — Enable Message Content Intent

In the bot settings, under Privileged Gateway Intents, enable:

Message Content Intent

Step 3 — Invite the bot

Use OAuth2 → URL Generator and select the bot scope with these permissions:

  • View Channels
  • Send Messages
  • Send Messages in Threads
  • Read Message History
  • Attach Files
  • Add Reactions

Step 4 — Install the plugin

/plugin install discord@claude-plugins-official

Step 5 — Configure the bot token

/discord:configure <token>

The plugin stores it under:

~/.claude/channels/discord/.env

You can alternatively set:

DISCORD_BOT_TOKEN

Step 6 — Start Claude with Discord

claude --channels plugin:discord@claude-plugins-official

Step 7 — Pair

DM your Discord bot. It responds with a pairing code:

/discord:access pair <code>

Then restrict access:

/discord:access policy allowlist

8. iMessage Channel Setup

Platform requirement: The iMessage channel requires macOS. It reads your Messages database directly and sends replies through AppleScript.

Step 1 — Grant Full Disk Access

The Messages database is:

~/Library/Messages/chat.db

macOS protects this file. When the channel first reads it, allow the access request. If the prompt does not appear, go to:

System Settings → Privacy & Security → Full Disk Access

Add your terminal application. Without this access, the server exits with authorization denied.

Step 2 — Install

/plugin install imessage@claude-plugins-official

Step 3 — Start with Channels

claude --channels plugin:imessage@claude-plugins-official

Step 4 — Text yourself

Open Messages on a device signed into your Apple ID and send a message to yourself. Self-chat bypasses access control without additional pairing.

Step 5 — Allow other senders

/imessage:access allow +15551234567

Handles can be phone numbers in +country format or Apple ID email addresses.

9. Fakechat — Learn Channels Without a Real Platform

Fakechat is the easiest way to understand the Channel architecture. It provides a local chat UI without authentication or an external messaging service.

Requirements

  • Claude Code installed and authenticated with claude.ai or a Claude Console API key.
  • Bun installed.
  • Team/Enterprise/managed Console organizations need Channels enabled by an admin.

Step 1 — Install

/plugin install fakechat@claude-plugins-official

Step 2 — Restart with the channel

claude --channels plugin:fakechat@claude-plugins-official

You can pass multiple channel plugins separated by spaces.

claude --channels plugin:fakechat@claude-plugins-official plugin:telegram@claude-plugins-official

Step 3 — Open the chat UI

http://localhost:8787

Type:

what's in my working directory?

The message enters the running Claude Code session as a channel event. Claude can then call its normal tools and use the channel's reply tool to send the answer back to the browser.

Browser fakechat Claude Code Tools fakechat reply Browser

What the terminal sees

← fakechat · web: what's in my working directory?

The model receives a channel event with a scoped source such as:

<channel source="plugin:fakechat:fakechat">

10. Security — Sender Allowlists

Every approved Channel plugin maintains a sender allowlist. Only senders you explicitly add can push messages into the session. Other senders are silently dropped.

Unknown sender Dropped
Approved sender Channel Claude session

Telegram / Discord pairing

  1. Send a message to the bot.
  2. The bot returns a pairing code.
  3. Approve the code in Claude Code.
  4. Your sender ID is added to the allowlist.

iMessage

Texting yourself automatically passes the access gate. Other contacts must be added with /imessage:access allow.

Important: The allowlist also controls permission relay when a channel supports it. Anyone who can reply through the channel may potentially approve or deny tool use in your session. Only allow senders you trust with that authority.

11. Permission Relay and Remote Approval

Some channel servers can declare a permission relay capability. This allows permission prompts from Claude Code to be forwarded through the channel.

Claude needs permission Channel relay Phone / external chat Approve / deny

This is useful when you are away from the terminal, but it increases the importance of sender access control.

Unattended mode

For unattended use, the documentation mentions:

--dangerously-skip-permissions
This bypasses most permission prompts. Use it only in environments you trust. Even then, the documented “actions no” mode auto-approvals still apply.

In non-interactive -p mode, tools that require terminal input, such as multiple-choice questions and plan-mode approval, are disabled so the session does not stall waiting for input.

12. Team and Enterprise Administration

Organizations have controls over whether Channels can be used.

SettingPurpose
channelsEnabled Master switch. Must be true for channel messages to be delivered.
allowedChannelPlugins Controls which channel plugins may register.

Default behavior

Organization/authenticationDefault
claude.ai Team / EnterpriseChannels are blocked until an Owner enables them.
Anthropic Console API keyChannels are allowed by default unless managed settings are deployed.
Pro / Max without organizationOrganization checks are skipped; user opts in per session with --channels.

Enable Channels

An Owner can enable Channels from the Claude.ai administration area:

Admin settings → Claude Code → Channels

Or managed settings can contain:

{
  "channelsEnabled": true
}

Restrict allowed plugins

{
  "channelsEnabled": true,
  "allowedChannelPlugins": [
    {
      "marketplace": "claude-plugins-official",
      "plugin": "telegram"
    },
    {
      "marketplace": "claude-plugins-official",
      "plugin": "discord"
    },
    {
      "marketplace": "acme-corp-plugins",
      "plugin": "internal-alerts"
    }
  ]
}

This lets an organization allow specific official plugins and/or internal plugins.

If allowedChannelPlugins is an empty array, all channel plugins from the allowlist are blocked, although the development flag can still bypass this for local testing. To block Channels entirely, leave channelsEnabled disabled.

13. Build Your Own Channel

If the system you care about does not have an official Channel plugin, you can build your own. The documentation provides a Channels reference for this purpose.

Conceptually, your custom Channel needs to:

  1. Act as an MCP server.
  2. Receive events from your external system.
  3. Expose those events to Claude Code as channel events.
  4. Optionally expose a reply tool so Claude can respond through the same system.
  5. Implement appropriate access control.
  6. Package/install it as a plugin.

Example architecture — CI alerts

GitHub Actions / Jenkins / GitLab CI
              │
              ▼
       Your channel server
              │
              ▼
       Running Claude Code
              │
              ▼
       Claude investigates
              │
              ▼
       Reply / status update

Example event

{
  "source": "ci",
  "event": "build_failed",
  "repository": "acme/payments",
  "branch": "main",
  "job": "integration-tests",
  "url": "https://ci.example.com/job/123",
  "message": "17 integration tests failed"
}

Claude can receive the event and use the local repository and normal Claude Code tools to investigate.

14. Testing a Custom Channel During Preview

During the research preview, the normal --channels flag only accepts channel plugins from the effective approved allowlist.

For a channel you are building, the documentation provides:

--dangerously-load-development-channels
This development flag exists for testing custom Channels during the research preview. It is not the normal way to enable production channel plugins.

15. Research Preview Limitations

LimitationMeaning
Research previewThe feature is still evolving.
Flag may change--channels syntax and protocol contract may change.
Not in helpDuring preview, the flags may work without appearing in claude --help.
Anthropic authRequires claude.ai authentication or Console API key.
Provider limitationNot available on Bedrock, Google Cloud Agent Platform or Microsoft Foundry.
Session must runEvents arrive only while the Claude Code session is open.
AllowlistOnly approved/allowed channel plugins can register during the preview.

16. Real-World Workflow Examples

Example A — CI Failure → Claude

A deployment fails in CI. Instead of manually opening the terminal and explaining the failure, the CI system pushes an event into your running Claude session.

CI failure Channel event Claude sees repo Investigate Reply

Example B — Spring Boot Monitoring

Imagine a monitoring service reports:

HTTP 500 spike
service=payments
error=DataIntegrityViolationException
rate=18% in 5 minutes

A Channel can deliver that event into the running Claude Code session. Claude can inspect the Spring Boot code, search logs/files and prepare a diagnosis.

Example C — Next.js Production Alert

Vercel deployment failed
branch=main
error=TypeScript compilation failed
file=src/app/dashboard/page.tsx

Claude receives the event, examines the repository and can investigate the relevant TypeScript file.

Example D — Phone-to-Local-Claude

You are away from your laptop but want to ask Claude about the project:

Telegram:
"Check why the integration tests were failing earlier."

Claude receives the message in the existing local session, where it can use the real working directory.

This is one of the most important Channel use cases: your phone becomes a remote conversation surface for the Claude Code process that is actually running against your local project.

17. Recommended Channel Workflow

1. Pick event source 2. Install plugin 3. Configure credentials 4. Start with --channels 5. Pair / allowlist 6. Test
  1. Decide whether you need push events or simple MCP queries.
  2. Choose Telegram, Discord, iMessage, fakechat or a custom Channel.
  3. Install the plugin.
  4. Configure credentials or access.
  5. Start Claude Code with the channel explicitly enabled.
  6. Pair your sender where required.
  7. Restrict access with an allowlist.
  8. Test a harmless message first.
  9. Only then connect CI, monitoring or production events.

18. Common Mistakes

MistakeWhy it happensFix
Installing plugin but not using --channelsPlugin is installed but not opted into the session.Restart Claude with --channels plugin:....
Bot does not respondClaude was started without the channel flag.Restart with the channel enabled.
Everyone can message the botAccess control was not configured.Pair and use an allowlist.
Assuming channel works after Claude exitsChannels deliver to a running session.Use a persistent/background process for always-on behavior.
Using a local MCP server as a Channel automaticallyMCP configuration alone does not enable push delivery.The server must be named in --channels.
Admin enabled plugin but messages do not arrivechannelsEnabled may be off.Have an Owner/admin enable Channels.
Custom channel won't registerIt is not on the effective preview allowlist.Use the development flag for testing or configure an org allowlist.
Giving permission relay to untrusted usersChannel sender can approve/deny tool use.Allowlist only trusted senders.

19. Channel vs Hook vs Scheduled Task

FeatureTriggerExample
HookClaude Code lifecycle eventAfter Edit → run formatter.
Scheduled taskTime-based scheduleEvery morning → run a prompt.
ChannelExternal pushed eventCI failure → tell running Claude.
Memory trick:
Hook = Claude event
Scheduled task = clock event
Channel = external event

20. Quick Cheat Sheet

GoalCommand / setting
Install Telegram/plugin install telegram@claude-plugins-official
Configure Telegram/telegram:configure <token>
Pair Telegram/telegram:access pair <code>
Telegram allowlist/telegram:access policy allowlist
Start Telegramclaude --channels plugin:telegram@claude-plugins-official
Install Discord/plugin install discord@claude-plugins-official
Configure Discord/discord:configure <token>
Pair Discord/discord:access pair <code>
Discord allowlist/discord:access policy allowlist
Start Discordclaude --channels plugin:discord@claude-plugins-official
Install iMessage/plugin install imessage@claude-plugins-official
Start iMessageclaude --channels plugin:imessage@claude-plugins-official
Allow iMessage sender/imessage:access allow +country-number
Install fakechat/plugin install fakechat@claude-plugins-official
Start fakechatclaude --channels plugin:fakechat@claude-plugins-official
Fakechat UIhttp://localhost:8787
Enable org-wide"channelsEnabled": true
Restrict pluginsallowedChannelPlugins
Custom channel testing--dangerously-load-development-channels

21. Interview / Revision Questions

  1. What is a Claude Code Channel?
  2. How is a Channel different from a normal MCP server?
  3. Why must a Claude Code session be running?
  4. What external platforms are currently supported in the research preview?
  5. Why does every Channel plugin require Bun?
  6. How do you start Claude Code with a Channel?
  7. What does the --channels flag do?
  8. How does Telegram pairing work?
  9. How does Discord pairing work?
  10. Why does iMessage require macOS Full Disk Access?
  11. What is fakechat?
  12. Why are sender allowlists important?
  13. What is permission relay?
  14. Why is permission relay a security concern?
  15. What does channelsEnabled control?
  16. What does allowedChannelPlugins control?
  17. How do Channels differ from scheduled tasks?
  18. How would you connect CI failures to a local Claude session?
  19. How would you build a custom Channel?
  20. Why are Channels still considered research preview?

22. Practice Exercises

Exercise 1 — Fakechat

Install fakechat, start Claude with --channels and send a message from the browser.

Exercise 2 — Telegram

Create a test bot, pair your account and send a harmless message to your local Claude session.

Exercise 3 — Allowlist

Configure a Channel so only your account can send events.

Exercise 4 — CI Event

Design the JSON payload a CI system could send when a build fails.

Exercise 5 — Spring Boot

Design a monitoring event for a Spring Boot HTTP 500 spike and describe how Claude should investigate it.

Exercise 6 — Admin Policy

Create a managed settings example that allows only Telegram and an internal alert plugin.

23. Final Memory Map

External Event Channel Plugin Running Session Claude Tools Channel Reply

Remember This

Channel = external event → existing Claude Code session.

MCP gives Claude on-demand access to external systems.

Channel lets external systems push events into Claude.

--channels explicitly opts a channel into the current session.

Allowlist decides who can send events.

channelsEnabled controls whether an organization permits Channels.

24. Final Takeaway

Channels are useful when Claude needs to react to something that happens outside the terminal. Instead of polling or starting a new cloud session, a Channel can deliver the event directly into the Claude Code process that is already running against your local project.

The strongest mental model is:

Normal MCP:
Claude → asks system → gets data

Channel:
External system → pushes event → Claude's running session → reacts

Hook:
Claude Code event → hook → automation

Scheduled task:
Clock → prompt → Claude

For practical learning, start with fakechat, then try Telegram or Discord, and only after that connect real CI/monitoring systems. Always keep sender access restricted, especially when permission relay or unattended operation is involved.