Esta página ainda está em inglês. A tradução para português está em andamento.
Channels — Bidirectional Chat with Claude Code
Channels let you push messages into a running Claude Code session and receive replies back — like a chat bridge between external platforms and your terminal.Channels vs Integrations: Integrations (API clients, MCP servers) are tools Claude calls on demand during a task. Channels are the reverse: external systems that push events into the session. You can have both — for example, Discord as an integration (community monitoring via @pulse) AND as a channel (bidirectional chat with Claude).
Supported Channels
Prerequisites
- Claude Code v2.1.80+ (check with
claude --version) - Bun installed (check with
bun --version, install at bun.sh) - claude.ai login (Console and API key authentication are not supported)
- Plugin marketplace configured:
/plugin marketplace add anthropics/claude-plugins-official
Setup: Telegram
Full integration docs at docs/integrations/telegram.md.1. Create a Bot
- Open Telegram and message @BotFather
- Send
/newbotand follow the prompts - Copy the Bot Token provided
2. Install the Plugin
In Claude Code:3. Configure the Token
~/.claude/channels/telegram/.env. Alternatively, set TELEGRAM_BOT_TOKEN in your shell environment.
4. Start the Channel
Manual (foreground):screen session with --dangerously-skip-permissions.
5. Pair Your Account
- In Telegram, send any message to your bot
- The bot replies with a pairing code
- In Claude Code, run:
- Lock down access to your account only:
Manage
Setup: Discord Channel
Note: This is the Discord Channel (bidirectional chat with Claude Code), separate from the Discord API integration used by @pulse for community monitoring. They are independent and can coexist.
1. Create a Discord Bot
- Go to the Discord Developer Portal
- Click New Application and give it a name
- In the Bot section, click Reset Token and copy the token
2. Enable Message Content Intent
In your bot settings, under Privileged Gateway Intents, enable:- Message Content Intent (required)
3. Invite the Bot to Your Server
Go to OAuth2 > URL Generator. Select thebot scope and enable these permissions:
- View Channels
- Send Messages
- Send Messages in Threads
- Read Message History
- Attach Files
- Add Reactions
4. Install the Plugin
In Claude Code:5. Configure the Token
~/.claude/channels/discord/.env. Alternatively, set DISCORD_BOT_TOKEN in your environment.
6. Start the Channel
Manual (foreground):7. Pair Your Account
- DM your bot on Discord
- The bot replies with a pairing code
- In Claude Code:
- Lock down access:
Manage
Setup: iMessage
Requirement: macOS only. Reads the Messages.app database directly and sends replies via AppleScript. No bot token or external service needed.
1. Grant Full Disk Access
The Messages database (~/Library/Messages/chat.db) is protected by macOS. On the first read, macOS prompts for permission — click Allow.
If the prompt doesn’t appear or you clicked “Don’t Allow”, grant access manually:
System Settings > Privacy & Security > Full Disk Access — add your terminal app (Terminal, iTerm, etc.)
2. Install the Plugin
In Claude Code:3. Start the Channel
Manual (foreground):4. Test — Send a Message to Yourself
Open Messages on any device signed into your Apple ID and send a message to yourself. Self-chat works automatically with no access configuration needed.On Claude’s first reply, macOS prompts for Automation permission to control Messages. Click OK.
5. Allow Other Senders
By default, only your own messages pass through. To allow another contact:+1...) or Apple ID emails.
Manage
Multiple Channels
You can run multiple channels simultaneously. Each runs in its ownscreen session:
Security
- Each channel maintains a sender allowlist — only approved IDs can push messages
- Telegram and Discord use pairing: the sender messages the bot, receives a code, and you approve it in Claude Code
- iMessage allows self-chat automatically; other contacts are added by handle
- Permission relay: bidirectional channels can forward permission prompts so you can approve/deny remotely (e.g., approve a
Bashcommand from Telegram) - Being in
.mcp.jsonis not enough — the server must also be named in--channels
Enterprise / Team
On Team and Enterprise plans, channels are disabled by default. The admin controls access via:
Configure at: claude.ai > Admin settings > Claude Code > Channels
Custom Channels
You can build your own channels for systems that don’t have a plugin yet (CI/CD, monitoring, webhooks). See the Channels Reference for the full technical documentation.Troubleshooting
Bot doesn’t respond on Telegram/Discord:- Make sure Claude Code is running with
--channels(or viamake telegram/make discord-channel) - Use
make telegram-attachormake discord-channel-attachto view the terminal
- Run
/plugin marketplace update claude-plugins-official - Then
/reload-plugins
- Admin needs to enable
channelsEnabledin managed settings
- Grant Full Disk Access to your terminal in System Settings > Privacy & Security
- Confirm you completed pairing (
/telegram:access pair,/discord:access pair) - Confirm the policy is set to allowlist (
/telegram:access policy allowlist)
- Channels with permission relay forward the prompts. Reply from chat or the local terminal
- For unattended use:
--dangerously-skip-permissions(only in trusted environments)