SuperAPI AI Directory

claudeclaw

Agents & models

View repository

Updated 10-15 20:10

About this skill

ClaudeClaw - Claude Code Channels Telegram Integration Guide

Claude Code의 Channels This is an installation guide skill for integrating so that you can direct tasks to Claude directly from Telegram using the feature.

Channels란? Using Anthropic's MCP (Model Context Protocol), this feature connects messenger apps like Telegram bidirectionally with the Claude Code session on my PC. Even while away from the computer and on the move, you can direct coding tasks to Claude through your phone's messenger and receive results in real time.


Prerequisites

Item Description
Claude Code CLI It must be installed on your system
Paid plan You must be logged in to a paid plan such as Claude Pro or Team
Bun runtime The Telegram plugin server runs on Bun (see installation method below)
Telegram app Mobile or desktop app
Telegram account Required to create a bot

Installing Bun (if not already installed)

macOS / Linux:

curl -fsSL https://bun.sh/install | bash

After installation, open a new terminal or apply the environment variables with the command below:

source ~/.bashrc   # bash 사용자
source ~/.zshrc    # zsh 사용자 (macOS 기본)

Windows (PowerShell with administrator privileges):

powershell -c "irm bun.sh/install.ps1 | iex"

On Windows, run PowerShell with administrator privilegesand then enter the command above. After installation, you must open a new PowerShell for the bun command to be recognized.

Verify installation (common to all OSes):

bun --version

If a version number is output, it is installed correctly.


Step 1: Create a Telegram bot and issue a token

First, create a bot in Telegram and get an API token issued.

1-1. Creating a bot with BotFather

  1. Open the Telegram app and search for @BotFatherin the search bar.
  2. In the BotFather chat, press the Start button.
  3. /newbot Enter the command.
  4. Enter the bot's display name(예: My Claude Bot).
  5. Enter the bot's username(예: my_claude_helper_bot).
    • It must botend with .

1-2. Copy the API token

When bot creation is complete, BotFather sends a message like the following:

Use this token to access the HTTP API:
123456789:AAH_이런형식의_긴_문자열

This token copyand save it.

Caution: The API token is like a password. Never share it with anyone else.


Step 2: Install the Telegram plugin

2-1. Run Claude Code

macOS / Linux:

claude

Windows (PowerShell or Command Prompt):

claude

팁: If it is cumbersome to press approve every time during the installation process, claude --dangerously-skip-permissions. Once installation is complete, run it again in normal mode.

2-2. Install the plugin

Enter the following command into the Claude Code prompt:

/plugin install telegram@claude-plugins-official
  • When asked for the installation scope, select project or user as desired.
    • user: Available in all projects (recommended)
    • project: Only available in the current project
  • It is still a Preview feature, so it may be somewhat unstable.

When you get an error saying the plugin cannot be found: /plugin marketplace update claude-plugins-officialfirst to refresh the list, then try again.


Step 3: Token setup

Register the Telegram token issued by BotFather in Step 1 with Claude Code.

/telegram:configure <발급받은_토큰>

Example:

/telegram:configure 123456789:AAH_이런형식의_긴_문자열

Press Enter to apply the settings.


Step 4: Restart with the Channels flag

This step is very important. --channels If you run it without the flag, the Telegram integration will not work.

Terminate the currently running Claude Code session:

exit

Then, run it again with the --channels flag added:

macOS / Linux:

claude --channels plugin:telegram@claude-plugins-official

Windows (PowerShell):

claude --channels plugin:telegram@claude-plugins-official

If a channel reception-related message appears in the terminal, it is working correctly.

If no message appears: Check that the plugin installation in Step 2 was done properly. Fully exit Claude Code and try again.


Step 5: Device pairing (Pairing)

5-1. Start the bot in Telegram

  1. Return to the Telegram app.
  2. Search for the bot you created in Step 1 (by the username you set).
  3. Start button or enter /start.

5-2. Check the pairing code

The bot replies with a 6-digit pairing code.

If the pairing code does not arrive:

  • Check that the --channels flag in Step 4 was run properly.
  • Try entering /startto the bot again.
  • Check in BotFather that the token is correct.

5-3. Complete pairing in Claude Code

Return to the Claude Code prompt and connect the device with the following command:

/telegram:access pair <6자리_페어링_코드>

Example:

/telegram:access pair 482951

When the approval (Yes) prompt appears, select Yes.


Step 6: Security settings (Allowlist)

Be sure to do this! In the initial pairing mode, anyone who knows the bot address can send messages. You must change the access policy so that only you can use it.

Enter the following command into the Claude Code prompt:

/telegram:access policy allowlist

When you press approval (Yes):

  • Only you, registered in the allowlist, can communicate
  • Access by others is completely blocked

Why is this necessary? Without an allowlist, anyone can access Claude through the bot, which is a security risk.


Step 7: Integration Test

7-1. Simple Message Test

Enter this in the Telegram bot chat:

Hi Claude

If the message appears in the Claude Code terminal and a response comes back, integration is successful!

7-2. Task Command Test

Try sending an actual task command from Telegram:

현재 디렉토리에 index.html 파일 만들어줘

Verify that Claude Code receives the request, performs the task, and sends the result back to Telegram.


Troubleshooting

Symptom Solution
bun: command not found Check whether you opened a new terminal after installing Bun. On Windows, restart PowerShell
Plugin installation failed Check your internet connection. /plugin marketplace update claude-plugins-official Run and try again
--channels Channel messages do not appear after running Check whether the plugin was installed properly. Fully quit Claude Code and restart it
Pairing code does not arrive in the Telegram bot In the bot, /start enter again. Check in BotFather that the token is correct. --channels Check whether it was run with the flag
/telegram:access pair failed Check that you entered the code exactly. The code may expire after some time, so /startget a new code with
Messages still do not arrive after pairing When restarting Claude Code, be sure to check that you included the --channels plugin:telegram@claude-plugins-official flag
API token error In BotFather, /token recheck the token with the command. /telegram:configureset it again with
Claude Code does not run on Windows Check that Node.js and npm are installed. Run PowerShell as administrator

Notes for Windows Users

  • Terminal choice: We recommend using PowerShell or Windows Terminal. The default Command Prompt (cmd) also works, but PowerShell is more stable.
  • Path separator: On Windows, file paths use \(backslash), but in commands within Claude Code, you may also use /.
  • Firewall: Windows Defender Firewall may block the connection. When Claude Code or Bun requests network access, select Allow.
  • Background execution: To keep the Telegram integration running, you must keep the Claude Code terminal window open. If you close the terminal, the connection is disconnected.

Note: Full Command Summary (Quick Reference)

# 0. Bun 설치 (macOS/Linux)
curl -fsSL https://bun.sh/install | bash

# 0. Bun 설치 (Windows PowerShell 관리자 권한)
# powershell -c "irm bun.sh/install.ps1 | iex"

# 1. Claude Code 실행
claude

# 2. 텔레그램 플러그인 설치
/plugin install telegram@claude-plugins-official

# 3. API 토큰 설정 (BotFather에서 발급받은 토큰)
/telegram:configure YOUR_BOT_TOKEN

# 4. Claude Code 종료 후 --channels 플래그로 재시작
exit
claude --channels plugin:telegram@claude-plugins-official

# 5. 텔레그램 봇에서 받은 6자리 페어링 코드로 연결
/telegram:access pair YOUR_6DIGIT_CODE

# 6. 보안 설정 (Allowlist)
/telegram:access policy allowlist

Additional Uses

  • Extending with Custom Channels: Referring to Anthropic's 'Build your own channel' documentation, you can build a structure that sends prompts directly to a Claude session not only from Telegram but also from your own service (such as SaaS).
  • Discord integration: After creating a bot in the Discord Developer Portal and issuing a token, you can integrate the plugin through a similar process.
  • Usage examples: You can issue work instructions to Claude Code from a Slack bot, Discord bot, your own web dashboard, etc.