How to Set Up Claude Code Channels
Connect Claude Code to Telegram and Discord so you can message your coding session from your phone.
Claude Code Channels let you send messages to a running Claude Code session from Telegram or Discord. Your session stays on your machine with full access to your filesystem, git, and MCP servers. The messaging app is just a remote interface into it.
The feature shipped on March 20, 2026, as a research preview in Claude Code v2.1.80. It requires a claude.ai subscription (Pro or higher). API key and Console authentication are not supported.
This guide covers setting up both Telegram and Discord channels, including the security model you should configure before using them for real work.
Prerequisites
Before starting, make sure you have:
- Claude Code v2.1.80 or later. Run
claude -vto check. Update withclaude updateif needed. - A claude.ai account (Pro, Max, Team, or Enterprise). Console and API key auth won’t work with channels.
- Bun installed. The channel plugins are Bun scripts. Check with
bun --version. If it’s not installed, runcurl -fsSL https://bun.sh/install | bash. - Team/Enterprise users: your organization admin must enable channels in managed settings before you can use them.
How Channels Work
A channel is an MCP server that runs locally on your machine as a subprocess of Claude Code. It polls a messaging platform’s API for new messages, forwards them into your active session, and sends Claude’s replies back through the same platform.
Nothing is exposed to the internet. The plugin runs locally and makes outbound requests to the Telegram or Discord API. No inbound ports, no webhooks, no public URLs.
Channels come in two types:
- One-way channels forward events like CI alerts or monitoring webhooks into your session. Claude reads them and acts, but doesn’t reply through the channel.
- Two-way channels (like Telegram and Discord) let Claude both receive messages and send replies back through the same platform.
Set Up Telegram
Create a Bot
Open Telegram and start a chat with @BotFather. Send /newbot, then provide a display name and a unique username ending in bot. BotFather replies with a bot token. Copy it.
Install the Plugin
In a Claude Code session, run:
/plugin install telegram@claude-plugins-official
If Claude Code reports the plugin wasn’t found, add the marketplace first:
/plugin marketplace add anthropics/claude-plugins-official
Then retry the install.
Configure Your Token
Pass the bot token from BotFather to the configure command:
/telegram:configure <your-bot-token>
This saves the token to ~/.claude/channels/telegram/.env. You can also set TELEGRAM_BOT_TOKEN in your shell environment before launching Claude Code.
Launch with Channels Enabled
Exit your current session and restart with the --channels flag:
claude --channels plugin:telegram@claude-plugins-official
The --channels flag is required every session. Having the plugin in .mcp.json alone won’t activate channel message delivery.
Pair Your Account
Open Telegram and send any message to your bot. The bot replies with a pairing code. Back in Claude Code, run:
/telegram:access pair <code>
Then immediately lock down access:
/telegram:access policy allowlist
This restricts your bot to only accept messages from your paired Telegram account. Without this step, anyone who messages your bot gets a pairing code reply.
You can now message your bot from Telegram and Claude will process the request using your local project, then reply in the same chat.
Set Up Discord
Create a Bot
Go to the Discord Developer Portal and click New Application. Name it, then go to the Bot section, create a username, click Reset Token, and copy the token.
Enable Message Content Intent
In your bot’s settings, scroll to Privileged Gateway Intents and toggle on Message Content Intent. Without this, your bot can’t read message content.
Invite the Bot to Your Server
Go to OAuth2 > URL Generator. Select the bot scope and enable these permissions:
- View Channels
- Send Messages
- Send Messages in Threads
- Read Message History
- Attach Files
- Add Reactions
Open the generated URL in your browser to add the bot to your Discord server.
Install the Plugin
In Claude Code, run:
/plugin install discord@claude-plugins-official
Add the marketplace first with /plugin marketplace add anthropics/claude-plugins-official if it’s not found.
Configure Your Token
/discord:configure <your-bot-token>
This saves the token to ~/.claude/channels/discord/.env. Alternatively, set DISCORD_BOT_TOKEN as an environment variable.
Launch with Channels Enabled
claude --channels plugin:discord@claude-plugins-official
Pair Your Account
DM your bot on Discord. It replies with a pairing code. In Claude Code, run:
/discord:access pair <code>
Then lock it down:
/discord:access policy allowlist
Run Multiple Channels
You can enable both Telegram and Discord in a single session by passing multiple plugins to --channels, space-separated:
claude --channels plugin:telegram@claude-plugins-official plugin:discord@claude-plugins-official
Security Considerations
Every approved channel plugin maintains a sender allowlist. Only Telegram or Discord user IDs you’ve explicitly paired can push messages into your session. Everyone else is silently dropped.
A few things to keep in mind:
- Pair, then immediately set allowlist mode. The default pairing mode means anyone who messages your bot gets a code. Switch to allowlist as soon as you’ve paired.
- The
--channelsflag controls activation. Even if a channel MCP server is in your.mcp.json, it won’t receive messages unless it’s also passed to--channelsat launch. - Permission prompts still apply. If Claude hits a permission prompt (like writing to a file), the session pauses until you approve locally. For unattended use,
--dangerously-skip-permissionsbypasses this, but only use it in environments you trust. - Gate on sender, not room. If you build a custom channel, check
message.from.id, notmessage.chat.id. In group chats these differ, and gating on the room lets anyone in that group inject messages.
Build a Custom Channel
Channels are standard MCP servers with one addition: the claude/channel capability in the server constructor. If you want to build a channel for a platform that doesn’t have a plugin yet, or connect a webhook source like CI or monitoring, you can write one from scratch using the @modelcontextprotocol/sdk package.
A minimal one-way webhook receiver that forwards HTTP POSTs into your session:
import { Server } from '@modelcontextprotocol/sdk/server/index.js'
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js'
const mcp = new Server(
{ name: 'webhook', version: '0.0.1' },
{
capabilities: { experimental: { 'claude/channel': {} } },
instructions: 'Events from the webhook channel are one-way. Read them and act.',
},
)
await mcp.connect(new StdioServerTransport())
Bun.serve({
port: 8788,
hostname: '127.0.0.1',
async fetch(req) {
const body = await req.text()
await mcp.notification({
method: 'notifications/claude/channel',
params: {
content: body,
meta: { path: new URL(req.url).pathname, method: req.method },
},
})
return new Response('ok')
},
})
Register it in .mcp.json:
{
"mcpServers": {
"webhook": { "command": "bun", "args": ["./webhook.ts"] }
}
}
Then launch with:
claude --dangerously-load-development-channels server:webhook
The --dangerously-load-development-channels flag is required during the research preview for custom channels that aren’t on the approved allowlist. To make a custom channel installable by others, package it as a plugin and submit it to the official marketplace for security review.
For two-way channels that support replies, add a tools: {} capability and register a reply tool using the standard MCP tool handlers. The full channels reference covers reply tools, sender gating, and the notification format in detail.
Channels in Practice
With channels configured, you can message Claude Code from your phone while a build runs, ask it to check on a failing test from Telegram while you’re away from your desk, or pipe CI failures into a session that already has your codebase loaded. The Telegram and Discord setup takes about five minutes each. The custom webhook path extends the same pattern to any system that can send an HTTP POST, from monitoring and alerting to deploy pipelines.
Get Insanely Good at AI
The book for developers who want to understand how AI actually works. LLMs, prompt engineering, RAG, AI agents, and production systems.
Keep Reading
Anthropic Adds Desktop Control to Claude Apps
Anthropic launched a research preview that lets Claude use desktop apps in Cowork and Claude Code, with Dispatch task handoff from phone.
How to Create Your First Agent Skill
A step-by-step guide to writing an agent skill from scratch: directory structure, SKILL.md format, effective descriptions, common patterns, and a complete working example.
WordPress.com Adds AI Agent Post Publishing
WordPress.com launched MCP write tools that let AI agents create, edit, and publish content on paid plans with user confirmation.
What Is the Model Context Protocol (MCP)?
MCP standardizes how AI models connect to tools and data. Here's what the Model Context Protocol is, how it works, and why it matters for developers building AI applications.
OpenAI Agrees to Acquire Astral
OpenAI signed a deal to acquire Astral, adding its Python tooling team and projects to Codex pending regulatory approval.