Connect Claude Code to Telegram in 5 Minutes
Claude Code Channels let you monitor tasks, approve tool use, and query your codebase from your phone. Here's how to wire up Telegram in one sitting.
Claude Code Channels — launched March 20, 2026 as a research preview — turns your running Claude Code session into something you can poke from your phone. It’s an MCP server that pushes session events outward to a platform (Telegram or Discord) and routes your replies back in. Two-way, real-time, no polling.
Practical upshot: kick off a long build, go make coffee, get a Telegram ping when it finishes. Or approve a risky tool call without walking back to your desk.
What You’ll Build
A Telegram bot connected to your Claude Code session. Once set up, you can:
- Receive notifications when Claude finishes a task or hits a decision point
- Reply directly in Telegram to continue the conversation
- Approve or reject tool use from your phone
- Run quick queries against your codebase without opening your laptop
Setup takes about 5 minutes. The connection persists across sessions as long as the bot token is valid.
Prerequisites
- Claude Code v2.1.80+ — run
claude --versionto check. Update vianpm i -g @anthropic-ai/claude-codeif needed. - Bun runtime — Channels uses Bun under the hood. Install it if you haven’t:
curl -fsSL https://bun.sh/install | bash - A Telegram account — any account works; you’ll create a bot through Telegram’s own tooling.
- 5 minutes
Step 1: Create a Telegram Bot
Open Telegram and start a chat with @BotFather. Run:
/newbot
BotFather walks you through naming your bot, then hands you a token that looks like:
7412093841:AAF3k2j1mNpQrXtYvWzBcDeGhIjKlMnOpQ
Copy it. You’ll need it in the next step. Keep it private — anyone with this token can send messages as your bot.
Step 2: Configure the Channel in Claude Code
Open your Claude Code settings file. If you’re on macOS:
open ~/.claude/settings.json
Add a `channels` block. If `mcpServers` already exists, add `channels` alongside it at the top level:
```json
{
"channels": {
"telegram": {
"botToken": "7412093841:AAF3k2j1mNpQrXtYvWzBcDeGhIjKlMnOpQ",
"allowedChatIds": []
}
}
}
Leave `allowedChatIds` empty for now — you'll fill it in after the next step.
---
## Step 3: Get Your Chat ID
Start Claude Code in any project:
```bash
claude
Now open Telegram and send any message to your new bot. Claude Code is listening. Back in your terminal, you'll see something like:
[channels/telegram] Received message from chat 198472610 (@yourhandle)
Chat ID not in allowedChatIds — ignoring. Add 198472610 to settings to enable.
That number is your chat ID. Copy it and add it to your settings:
```json
{
"channels": {
"telegram": {
"botToken": "7412093841:AAF3k2j1mNpQrXtYvWzBcDeGhIjKlMnOpQ",
"allowedChatIds": [198472610]
}
}
}
The allowlist is how you prevent random Telegram users from talking to your session. Only add IDs you trust.
---
## Step 4: Restart and Verify
Quit Claude Code and relaunch it:
```bash
claude
Send your bot a message in Telegram — something simple like "what files are in this project?" Claude Code receives it, processes it against your active session, and replies in the same Telegram chat.
You should see a response within a few seconds. If you don't, check Step 5 below.
---
## Step 5: Troubleshoot Common Issues
**Bot doesn't respond:**
- Confirm Bun is installed and on your `$PATH`: `bun --version`
- Make sure your chat ID is in `allowedChatIds` (easy to mistype)
- Check Claude Code logs: `claude --debug` shows MCP server startup events
**"Invalid token" error on startup:**
- BotFather tokens are sensitive to whitespace. Re-copy the token directly from the BotFather chat.
**Replies show up in Claude's terminal but not Telegram:**
- Your bot may not have permission to send messages. Go back to BotFather, run `/mybots`, select your bot, and verify it's enabled.
---
## Result
Once connected, your Claude Code session is reachable wherever you have Telegram. Long-running tasks report back to you. Tool-use approvals don't require you to be at your desk. You can ask quick questions about the codebase from your phone and get real answers — not hallucinated ones — because Claude is talking to your actual session.
The Channels architecture is MCP-native, which means platform support is plugin-extensible. Telegram and Discord ship officially; community plugins for Slack and others are already appearing in the wild.
The research preview label means the API surface may shift before GA. Watch the [Channels docs](https://code.claude.com/docs/en/channels) for breaking changes before updating Claude Code versions.