Channels — Messenger Integration
Even when you're away from the terminal, you can send tasks to Claude Code from Telegram, Discord, or iMessage and receive the results in the same chat.
[Telegram app] ──DM──► [Telegram bot] ──MCP──► [Claude Code session] ──► [File/terminal work]
◄────────────────────────────── [Result reply]
Channels is a research preview feature available from v2.1.80. The --channels flag syntax and protocol may change.
How It Differs from Remote Control
| Feature | Remote Control | Channels |
|---|---|---|
| Direction | Continue controlling an existing session from mobile | Push external messages into a session |
| Interface | claude.ai/code or mobile app | Telegram, Discord, iMessage |
| Use case | Monitor/direct work in progress | Request tasks from chat, receive webhooks |
Prerequisites
| Requirement | Description |
|---|---|
| Claude Code v2.1.80+ | Check with claude --version |
| claude.ai login | API key/Console auth not supported |
| Bun runtime | Required to run the plugin server |
| Messenger app | Telegram, Discord, or iMessage |
# Install Bun (macOS/Linux)
curl -fsSL https://bun.sh/install | bash
# Windows (PowerShell as Administrator)
powershell -c "irm bun.sh/install.ps1 | iex"
# Verify
bun --version
Supported Channels
Telegram
-
Create a bot: In Telegram, open @BotFather →
/newbot→ set a name/username (must end in "bot") → copy the API token -
Install the plugin:
/plugin install telegram@claude-plugins-official
Run /plugin marketplace update claude-plugins-official and try again. If you're adding the marketplace for the first time, run /plugin marketplace add anthropics/claude-plugins-official.
- Activate the plugin:
/reload-plugins
If the /telegram:configure command isn't recognized right after installation, this step was skipped.
- Register the token:
/telegram:configure <your_token>
- Restart in Channels mode:
claude --channels plugin:telegram@claude-plugins-official
- Pair your device: DM the bot → receive a 6-digit code → approve it in the terminal:
/telegram:access pair <code>
/telegram:access policy allowlist
Discord
- Create a bot: Discord Developer Portal → New Application → Bot → Reset Token
- Enable Message Content Intent: Bot settings → Privileged Gateway Intents
- Invite to a server: OAuth2 → URL Generator →
botscope + permissions (View Channels, Send Messages, Read Message History, Attach Files, Add Reactions) - Install and configure the plugin:
/plugin install discord@claude-plugins-official
/reload-plugins
/discord:configure <token>
claude --channels plugin:discord@claude-plugins-official
iMessage (macOS only)
No separate bot token needed — it reads the Messages database directly and replies via AppleScript.
/plugin install imessage@claude-plugins-official
claude --channels plugin:imessage@claude-plugins-official
You must grant your terminal Full Disk Access in macOS settings.
Security Configuration
Access Control
Every channel is protected by a sender allowlist. Only allowed IDs can send messages; everything else is ignored.
# Check current status
/telegram:access
# Change the policy
/telegram:access policy allowlist # Allowlist only (recommended default)
/telegram:access policy pairing # Temporary, for adding new users
/telegram:access policy disabled # Disable the bot
# Add/remove users directly
/telegram:access allow <userID>
/telegram:access remove <userID>
If a channel plugin declares the permission relay capability, users on the allowlist can approve/deny permission prompts through the channel. The official Telegram, Discord, and iMessage plugins support this capability. Only add users you trust.
Unattended Runs — Bypassing Permission Prompts
If you need to run a remote session in an environment where permission relay isn't supported, you can skip the prompts entirely with --dangerously-skip-permissions.
claude --channels plugin:telegram@claude-plugins-official --dangerously-skip-permissions
This flag bypasses all tool approvals. Use it only in trusted environments — your own local machine, an isolated server, etc.
Group Chats
DMs and groups are managed independently:
# Register a group (responds only when mentioned)
/telegram:access group add <groupID>
# Respond to all messages
/telegram:access group add <groupID> --no-mention
# Allow only specific members
/telegram:access group add <groupID> --allow 111111,222222
Enterprise Environments
On Team/Enterprise plans, Channels is disabled by default.
- An admin must set
channelsEnabled: truein claude.ai Admin Settings - The allowed plugin list can be restricted with
allowedChannelPlugins - Pro/Max users can use it right away without an organization
Core Behavior
The Session Is the Bot's Lifeline
Session open → Bot connected → Messages can be processed
Session closed → Bot doesn't respond
New session → Bot moves to the new session (previous session disconnects)
- You must keep the session running when launched with the
--channelsflag - For always-on operation, use a background process or a persistent terminal
- The session pauses when a permission prompt appears
Using Multiple Channels at Once
claude --channels plugin:telegram@claude-plugins-official plugin:discord@claude-plugins-official
You can pass multiple plugins separated by spaces.
Limitations
| Limitation | Description |
|---|---|
| Session required | If the session shuts down, messages can't be received |
| Authentication | claude.ai login required (API keys not supported) |
| Preview | Only plugins on Anthropic's allowlist can be used |
| Idle disconnects | Responses may become unstable after long periods without messages (fixed by restarting the session) |
Real usage insights, delivered free. Subscribe →
이 챕터를 완료하셨나요?
학습 진도를 체크하여 나의 로드맵 달성률을 높여보세요.