Skip to content

How to Set Up Claude Code Channels with Telegram and Discord

Problem

I wanted to access my Claude Code session from my phone. Not just to chat - I wanted to run tests, edit files, and push hotfixes while away from my desk. But every solution I found required complex infrastructure:

  • OpenClaw’s Mac Mini setup with Docker containers
  • 70+ dependencies to manage
  • Port forwarding and network configuration
  • Always-on hardware running 24/7

Then I discovered Claude Code Channels - a built-in feature that lets me DM my Claude Code session from Telegram or Discord. No extra infrastructure needed.

The Solution

Claude Code Channels is a research preview feature for Pro and Max subscribers. You enable it with a single flag and a bot token:

terminal
# Enable Claude Code Channels
claude --channels

That’s it. Once configured, you can:

  • Send messages to Claude Code from Telegram or Discord
  • Use all the same tools (file edits, test runs, git operations)
  • Receive notifications about completed tasks
  • Maintain your existing session context

How It Works

The architecture is simpler than I expected:

architecture-diagram
Claude Code Channels Architecture:
+------------------+ +------------------+
| Your Phone | | Your Computer |
| Telegram/Discord|--------| Claude Code |
| | API | Session |
+------------------+ +------------------+
|
v
+------------------+
| MCP + Bun |
| Runtime |
+------------------+

Claude Code uses the Model Context Protocol (MCP) with Bun as the runtime. This combination provides fast iteration and reliable messaging between platforms.

Setting Up Telegram Integration

I set up Telegram first since it’s the most common option. Here’s what I did:

Step 1: Create a Telegram Bot

telegram-setup
1. Open Telegram and search for @BotFather
2. Send /newbot command
3. Follow prompts to name your bot
4. BotFather returns your bot token

The bot token looks like: 1234567890:ABCdefGHIjklMNOpqrsTUVwxyz

Step 2: Configure Claude Code

terminal
# Start Claude Code with Channels enabled
claude --channels
# You'll be prompted for your bot token
# Paste the token from BotFather

Step 3: Start Messaging

Once configured, I opened Telegram, found my bot, and started chatting with it. The bot forwards messages to my running Claude Code session, and Claude responds with full tool access.

Setting Up Discord Integration

Discord setup follows a similar pattern:

Step 1: Create a Discord Bot

discord-setup
1. Go to Discord Developer Portal
2. Create New Application
3. Navigate to Bot section
4. Click "Add Bot"
5. Copy the bot token

Step 2: Invite Bot to Server

discord-invite
1. Go to OAuth2 > URL Generator
2. Select "bot" scope
3. Select required permissions (Send Messages, Read Messages)
4. Copy generated URL
5. Open URL in browser to invite bot

Step 3: Configure and Run

terminal
# Same command - Claude Code handles both platforms
claude --channels

What I Can Do Remotely

The real power is full tool access from messaging platforms:

example-commands
# File operations
"Edit src/auth.ts to add rate limiting"
# Run tests
"Run the test suite and show me failures"
# Git operations
"Commit these changes with message 'fix auth bug'"
# Code review
"Review the changes in src/api/handlers.ts"

Claude Code executes these just like it would from the terminal. The messaging interface is just another input method.

Real-World Use Cases

I tested several scenarios:

Hotfix at 2am

I received a pager alert while away from my computer. Instead of waking up and opening my laptop, I messaged Claude Code from Telegram:

telegram-conversation
Me: "Check the error logs in /var/log/app"
Claude: [Shows last 50 lines with stack trace]
Me: "The issue is in auth.ts line 142. Fix it and run tests."
Claude: [Applies fix, runs tests, shows passing results]
Me: "Push to main"
Claude: [Pushes and confirms]

Quick Question During Meeting

During a standup, someone asked about a function’s behavior. I messaged Claude:

telegram-conversation
Me: "What does the validateToken function do?"
Claude: [Shows function code and explains its purpose]

Code Review on Commute

On my way home, I reviewed a PR through Discord:

discord-conversation
Me: "Review the last commit and suggest improvements"
Claude: [Analyzes code and provides suggestions]

What Reddit Users Say

I found the original discussion on r/claude. Here’s what users reported:

One user noted the significance:

“Channels is a pretty big step toward ‘always-on’ coding agents. The runtime/tooling details are interesting too, MCP + Bun makes sense for fast iteration”

Another confirmed Slack availability:

“I’ve had this in slack for a while already in Claude code, works wonders when it can read my actions and plan updates”

A third mentioned Dispatch:

“Dispatch lets me do it right in the Claude app”

Subscription Requirements

Channels is available for Pro and Max subscribers:

subscription-tiers
| Tier | Price | Channels Access |
|--------------|------------|-----------------|
| Free | $0/mo | No |
| Pro | $20/mo | Yes |
| Max | $100-200/mo| Yes |

This is a research preview feature, so availability may change.

Common Issues I Encountered

Issue 1: Bot Token Not Recognized

Initially, I pasted the wrong part of the BotFather response. The token is the long string after “Use this token to access the HTTP API:”. Make sure you copy the entire token including the colon and numbers before it.

Issue 2: Session Context Lost

I thought I could message Claude Code without a running session. Channels requires an active Claude Code session on your computer. If you close Claude Code, the bot won’t respond.

Issue 3: Permission Errors on Discord

My first attempt failed because I didn’t give the bot proper permissions. The bot needs at minimum:

  • Read Messages
  • Send Messages
  • Read Message History

Security Considerations

Since this gives messaging platforms access to your code, I recommend:

security-checklist
1. Use a private Telegram bot (not public)
2. Use a private Discord server (not public)
3. Don't share bot tokens in version control
4. Regenerate tokens if compromised
5. Be aware of what operations you authorize remotely

Custom Platform Support

The Reddit discussion mentioned sample code for custom platforms. While I haven’t tested this, the MCP architecture should support other messaging platforms if you’re willing to build custom integrations.

When This Makes Sense

Claude Code Channels is worth setting up if you:

  • Need to respond to issues while away from your desk
  • Want to run quick commands during meetings
  • Prefer mobile access to your coding environment
  • Already have a Claude Pro or Max subscription

If you’re on the free tier or don’t need mobile access, the terminal interface is sufficient.

Summary

In this post, I explained how to set up Claude Code Channels for Telegram and Discord integration. The key points are:

  1. Enable with --channels flag and provide a bot token
  2. Full tool access (file edits, tests, git) from messaging platforms
  3. Available for Pro and Max subscribers ($20-200/mo)
  4. Requires active Claude Code session on your computer
  5. Built on MCP with Bun runtime for fast iteration

The feature eliminates infrastructure overhead for remote AI coding access. You don’t need Docker, port forwarding, or always-on hardware - just a bot token and an active session.

Final Words + More Resources

My intention with this article was to help others share my knowledge and experience. If you want to contact me, you can contact by email: Email me

Here are also the most important links from this article along with some further resources that will help you in this scope:

Oh, and if you found these resources useful, don’t forget to support me by starring the repo on GitHub!

Comments