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.

Updated

๐ŸŽ 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

๐Ÿš€ 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:

  1. Make a Telegram bot

    Send /newbot to @BotFather, pick a name and a username ending in bot. Then send /setprivacy, pick the bot and choose Disable, so it sees @mentions in groups.
  2. A cloud environment for the bot

    Claude creates one named after your bot, with network access to api.telegram.org.
  3. 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.
  4. 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 approve telegram-relay, approve it once.
  5. Claim the bot

    DM your bot /start before 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.