Claude Code on Telegram
Talk to Claude Code from Telegram, on your phone, in a DM or in a group with friends and other bots. Switchboard sets it up from one pasted line, and it runs on Claude Code Web, so there's no server to keep up.
๐ What you get
A Telegram bot that is Claude Code
DM it and youโre talking to a full Claude Code session, with its tools.
Group chats
Add the bot to a group and anyone there can @mention it or reply to it. The group shares one session, so Claude remembers what each of you said to it, plus the recent chat around it.
One session per chat
Every DM, group and forum topic gets its own Claude Code session. /new starts a fresh one, and /stop cancels the current task.
A native chat feel
A โThinkingโฆโ placeholder with a Stop button, streamed replies, and rich Markdown: tables, headings and code.
Approvals
Before a risky action, Claude can post owner-only Approve / Deny buttons and wait for your tap.
Photos and files
in both directions.
๐งฐ What you need
- A Claude account with access to Claude Code Web.
- A Telegram account, to make a bot with @BotFather.
- About 5 minutes.
๐ How to set it up
Open a new session at claude.ai/code and paste:
Set up https://github.com/useswitchboard/switchboard/blob/main/SETUP.md
Claude walks you through the rest, one step at a time:
Make a Telegram bot
Send/newbotto @BotFather, pick a name and a username ending inbot. Then send/setprivacy, pick the bot and choose Disable, so it sees @mentions in groups.A cloud environment for the bot
Claude creates one named after your bot, with network access toapi.telegram.org.Save the token
You paste the BotFather token into the environmentโs variables yourself, in Claude Code settings. The token never goes into the chat.Start the router
You start one more session, the router, in that environment, with the switchboard repo, the Haiku model and Auto permissions. Claude gives you the exact prompt, or a ready-to-start task card. If the router asks to approvetelegram-relay, approve it once.Claim the bot
DM your bot/startbefore you share its username. The first person to DM it becomes its owner.
โ๏ธ How it works
The relay runs inside a router session as an MCP server. Itโs the only thing that talks to Telegram. It waits for messages, and for each chat it opens or wakes a worker session that does the actual work.
| Part | What it does |
|---|---|
| Router session | Keeps the Telegram connection and passes messages on. Every routing decision is code, so a small, cheap model (Haiku) is enough. |
| Worker sessions | One per DM, group or forum topic. Theyโre the Claude you talk to, on Opus by default. They never see the bot token. |
| Cloud environment | Holds the bot token as a variable and allows the connection to Telegram. |
Keep the router session running: archiving it stops the bot. Each worker session is tagged telegram, so you can find them in your session list. The full design is in the Claude architecture doc.
๐ฅ Use it in groups
Add the bot to any Telegram group. It answers when someone @mentions it or replies to one of its messages. Each group, and each topic in a forum group, gets its own session.
If youโd rather it joined in on its own, the owner can switch a group to /mode smart. Claude then sees every message from a person and decides whether it was meant for it, staying silent when it wasnโt. Smart mode uses more tokens.
Other bots can be in the same group: see how to put several AI agents in one Telegram group.
โ Common questions
๐ฅ๏ธ Do I need a server or a computer that stays on?
No. Everything runs in Claude Code Web.
๐ง Which model answers?
Workers run on Opus by default. The router runs on whatever you start it with; Haiku is recommended because it only follows instructions printed by code.
๐ฅ Can other people use my Claude?
Only you can DM it. In groups you added it to, anyone can mention it, up to 20 messages an hour per member by default.
๐ธ Is it free?
Switchboard is free and open source (MIT). Claude usage counts toward your own Claude plan.
More answers are in the FAQ.