概要
Telegram Bot API を通じて、あらゆる AI エージェントから Telegram のメッセージ、写真、アルバム、ドキュメント、音声、動画、アニメーション、ステッカー、連絡先、スポット、位置情報、投票を送信できます。33 個のツール、ボットトークンによる認証です。送信に加えて、最近の更新を軽量に読み取れます(ロングポーリングなし)。
ガイド付きセットアップ
Telegram Bot を Claude に 2 分で接続
AnythingMCP Cloud の無料トライアルを始め、ガイド付きセットアップで Telegram Bot を接続して、MCP URL を Claude に追加します。コードもサーバーの運用も不要です。
クレジットカード不要 · 7日間の試用 · セルフホストの選択肢あり
AnythingMCP は Claude のコネクタディレクトリに掲載されています。ワンクリックで Claude に追加 (新しいタブで開きます)し、サインインして Claude が使える MCP サーバーを選んでください。
こう聞いてみよう
Telegram Bot のサンプルプロンプト
プロンプトをクリックでコピー。Claude / ChatGPT / Cursor / Gemini / Copilot / OpenClaw に貼り付けて、このコネクターで実行できます。
Claude は AI のため誤ることがあります。回答をご確認ください。
💡 インストール不要? cloud.anythingmcp.com を直接利用してください。 サインインし、Connectors → Telegram Bot をクリック、認証情報を貼り付け、MCP API キーを発行すれば完了です。Docker も
git cloneもローカルサーバーも不要。
Telegram Bot + Claude
Telegram Bot API を通じて、あらゆる AI エージェントから Telegram のメッセージ、写真、アルバム、ドキュメント、音声、動画、アニメーション、ステッカー、連絡先、スポット、位置情報、投票を送信できます。33 個のツール、ボットトークンによる認証です。送信に加えて、最近の更新を軽量に読み取れます(ロングポーリングなし)。
前提条件
完全なセットアップ手順はコネクタ自体に組み込まれています (ストアでコネクタを選択すると表示)。必要な環境変数:
TELEGRAM_BOT_TOKEN
ステップ 1 — 認証情報を取得
- Telegram で @BotFather とのチャットを開き、
/newbotを送信して、表示名と末尾がbotのユーザー名を決めます。 - BotFather から
123456789:ABCdef...のようなトークンが返ってきます。秘密情報として扱ってください。トークンを持っている人は誰でも、あなたのボットとして送信できます。 - トークン全体を
TELEGRAM_BOT_TOKENに貼り付けて、コネクターをインストールします。Telegram はトークンをリクエストのアドレスに含めるよう求めますが、コネクターが自動でそこに入れます。 - まず
telegram_bot_get_meを実行して、トークンが機能するか確認します。
ボットが届く相手: すべてのチャットには数値の chat_id があります。ユーザーが少なくとも一度あなたのボットに /start を送っている必要があり、グループとチャンネルには先にボットを追加する必要があります。公開チャンネルでは @channelusername も使えます。非公開チャンネルには -100 で始まる数値 ID が必要です。telegram_bot_get_updates は最近の受信メッセージをチャット ID 付きで表示します。
送信できるもの: テキストメッセージ(HTML 書式が最も安全です)、写真、アルバム、ドキュメント、音声ファイル、ボイスメッセージ、動画、GIF アニメーション、ステッカー、連絡先カード、スポット、位置情報(ライブ位置情報も可)、投票またはクイズです。自分のメッセージの編集と削除、チャット詳細の読み取りもできます。
アルバム: telegram_bot_send_album は、2〜10 件の写真と動画を 1 つのまとまったメッセージとして送信します。2〜10 件のドキュメント、または 2〜10 件の音声ファイルも送れます。ドキュメントと音声は他の種類と混在できません。キャプションは最初の項目に付きます。ある項目で Telegram が WEBPAGE_CURL_FAILED を返した場合、そのファイルをダウンロードできなかったということです。リンクは公開されていて、Web ページではなくファイルそのものを直接指している必要があります。
ファイル: メディアは HTTPS リンク(写真は 5 MB まで、その他のファイルは 20 MB まで)、または以前に送信したものの file_id で送信します。同じ呼び出しの中でパソコンからファイルをアップロードすることはできません。
リアクション、ピン留め、チャット管理: ボットはメッセージに絵文字でリアクションでき、自分が送信した写真、動画、ドキュメントのキャプションを変更できます。ボットが該当する権限(メッセージのピン留め、チャット情報の変更、ユーザーの招待、トピックの管理)を持つ管理者であるグループとチャンネルでは、メッセージのピン留めと解除、チャット名と説明の変更、追加の招待リンク(名前付き、有効期限付き、参加人数の上限付き)の作成、フォーラムグループでのトピック作成ができます。既存の画像をまとめて、ユーザーが所有する新しいステッカーセットを作成し、ステッカーを追加することもできます。telegram_bot_get_webhook_info はボットに Webhook が設定されているかを表示します。Webhook が設定されている間、telegram_bot_get_updates は 409 Conflict を返します。telegram_bot_remove_webhook は Webhook を削除するツールで、インストール時はオフです。削除すると、Webhook を受け取っているサービス(チャットボットや自動化)にメッセージが届かなくなるためです。コネクターのページで意図して有効にしてください。AI は変更のたびに確認を求めます。
すでにインストール済みですか? 以前にインストールしたコネクターにも、カタログ更新で新しいツールが届きます。AnythingMCP でコネクターを開き、Catalog update available の下で新しいツールの一覧を確認して、Apply update をクリックしてください。ボットトークンと、ご自身で追加したツールはそのまま残り、telegram_bot_remove_webhook は新規インストール時と同じくオフの状態で追加されます。
レート制限: 異なるチャット全体で毎秒約 30 件、同じチャットには毎秒 1 件、同じグループには毎分 20 件です。429 が返った場合は、待つべき時間を Telegram が知らせます。
コネクターは依頼されたときに最近の更新を読み取るだけで、自動で応答するチャットボットは動かしません。それにはご自身でホストする Webhook が必要です。決済、インラインモード、ゲームには対応していません。
ステップ 2 — アダプターをインストール
curl -fsSL https://raw.githubusercontent.com/HelpCode-ai/anythingmcp/main/docker-compose.quickstart.yml -o docker-compose.yml
printf 'JWT_SECRET=%s\nENCRYPTION_KEY=%s\n' "$(openssl rand -hex 32)" "$(openssl rand -hex 32)" > .env
docker compose up -d
ステップ 3 — Claude にコネクタを追加
サーバーURL: AnythingMCP で MCP Servers を開き、このコネクタがあるサーバーを選んで URL(
https://cloud.anythingmcp.com/mcp/…)をコピーします。このガイドでYOUR_SERVER_IDと表示されている箇所に使ってください。
推奨ルート:設定ファイルを触らずに claude.ai web で動作します。
- Claude で Plugins(一部のプランではまだ Customize)→ Connectors を開きます。
- + Add をクリックし、Add custom connector を選びます。
- 名前(例:
Telegram Bot)とリモート MCP サーバー URLhttps://cloud.anythingmcp.com/mcp/YOUR_SERVER_IDを入力し、Continue をクリックし、検出された設定のまま、もう一度 Continue をクリックします。 - Sign in now を選んで Add をクリックし、AnythingMCP にサインイン(OAuth)してアクセスを許可します。
下記のすべてのツールがチャットに表示されます。プロンプトを入力し始めてください。
利用可能なツール
| Tool | What it does |
|---|---|
telegram_bot_get_me | Return the bot's own user info: id, username, first_name, can_join_groups, can_read_all_group_messages, supports_inline_queries |
telegram_bot_send_message | Send a text message to a chat |
telegram_bot_send_photo | Send a photo (JPG/PNG, ≤5MB via URL) by HTTPS URL or by reusable file_id |
telegram_bot_send_document | Send a document (any type, ≤20MB via URL) by HTTPS URL or file_id |
telegram_bot_send_audio | Send an audio file (MP3, M4A, ≤20MB via URL) |
telegram_bot_send_voice | Send a voice note (OGG-Opus encoded) |
telegram_bot_send_video | Send a video (MP4, H.264, AAC, ≤20MB via URL) |
telegram_bot_send_location | Send a location point |
telegram_bot_send_poll | Send a poll (regular or quiz) |
telegram_bot_edit_message_text | Edit the text of a previously-sent message (your bot's own messages only) |
telegram_bot_delete_message | Delete a message the bot sent (within ~48 hours for groups, anytime for own DMs) |
telegram_bot_get_chat | Fetch chat info: title, type (private/group/supergroup/channel), photo, description, invite_link, member_count, permissions |
telegram_bot_get_updates | Long-poll recent inbound messages (one-shot: pulls all updates since the last offset+1) |
telegram_bot_send_album | Send 2 to 10 photos or videos as one album (sendMediaGroup), or 2 to 10 documents, or 2 to 10 audio files; documents and audio cannot be… |
telegram_bot_send_animation | Send a GIF or a silent MP4 animation by HTTPS URL or file_id; Telegram plays it on a loop |
telegram_bot_send_sticker | Send a sticker by file_id (any sticker the bot has seen, e.g. from telegram_bot_get_updates) or by HTTPS URL of a .WEBP image |
telegram_bot_send_contact | Send a phone contact card that the recipient can save or call |
telegram_bot_send_venue | Send a venue: a map pin with a name and address, e.g. a shop or meeting point |
telegram_bot_get_file | Look up a file the bot received (photo, document, voice note, video) by its file_id, from a message in telegram_bot_get_updates |
telegram_bot_download_file | Download a file by the file_path telegram_bot_get_file returned |
telegram_bot_fetch_sticker_set | Read a sticker set (or custom emoji set) by its name: title, sticker_type (regular, mask, custom_emoji) and every sticker with its emoji… |
telegram_bot_react_to_message | Set the bot's reaction on a message (the emoji under a message), or remove it with an empty list |
telegram_bot_pin_message | Pin a message in a chat, so it shows at the top |
telegram_bot_unpin_chat_message | Unpin a pinned message in a chat; without message_id the most recently pinned message is unpinned |
telegram_bot_rename_chat | Change the title of a group, supergroup or channel (1 to 128 characters); not possible for private chats |
telegram_bot_update_chat_description | Change the description of a group, supergroup or channel (0 to 255 characters; empty removes it) |
telegram_bot_add_forum_topic | Create a topic in a forum supergroup (a group with topics enabled) |
telegram_bot_edit_message_caption | Edit the caption of a photo, video, document, audio or animation message the bot sent (an empty caption removes it) |
telegram_bot_create_chat_invite_link | Create an additional invite link for a group, supergroup or channel, optionally named, expiring, limited to a number of joins, or requiring… |
telegram_bot_create_sticker_set | Create a new sticker set owned by a user, with 1 to 50 first stickers from existing image files |
telegram_bot_extend_sticker_set | Add one sticker to a sticker set the bot created (telegram_bot_create_sticker_set) |
telegram_bot_get_webhook_info | Show whether the bot has a webhook: its url (empty when none), pending_update_count, the last error date and message, and allowed_updates |
telegram_bot_remove_webhook | Remove the bot's webhook so updates can be read with telegram_bot_get_updates again |
プロンプトの例
- 「この 4 つのリンクの写真を 1 つのアルバムとしてチームのチャンネルに送ってください。キャプションは『新コレクション、本日公開』でお願いします。」
- 「営業グループに投票を投稿してください:四半期レビューは火曜日と木曜日のどちらが良いですか?」
- 「お店の住所をスポットとしてお客様とのチャットに送って、地図アプリで開けるようにしてください。」
- 「この 1 時間にボットが受け取ったメッセージと、その送信者を表示してください。」
- 「顧客グループで年末年始の営業時間についてのメッセージをピン留めして、いいねのリアクションを付けてください。」
- 「ベータグループ用に、金曜日に期限が切れて参加は最大 50 人までの招待リンクを作成してください。」
FAQ
Claude Code は Claude Desktop と同じように動作しますか? はい。両方を https://cloud.anythingmcp.com/mcp/YOUR_SERVER_ID に向けてください。
次のステップ
このガイドは役に立ちましたか?