连接器指南阅读约 5 分钟33 个 MCP 工具7 种语言

Telegram MCP 接入 Claude:消息与投票

通过 Telegram Bot API,从任意 AI 代理发送 Telegram 消息、照片、相册、文档、音频、视频、动画、贴纸、联系人、地点、位置和投票。33 个工具,使用机器人令牌认证。以发送为主,另可轻量读取最近的更新(不使用长轮询)。

HC作者:HelpCode 团队更新于 5 分钟阅读 在 GitHub 开源

无需信用卡 · 7 天试用 · 提供自托管方案

Telegram Bot

Telegram Bot

Send Telegram messages, photos, albums, documents, audio, video, animations, stickers, contacts, venues, locations and polls from any AI agent via the Telegram Bot API, react to and pin messages, and manage group titles, invite links and forum topics. Bot-token auth. Outbound plus a lightweight read of recent updates (no long-polling).

个工具

33

区域

INTL

类别

即时通讯

身份验证

API credentials

所需环境变量

TELEGRAM_BOT_TOKEN
在 Cloud 上一键安装

7 天免费试用 · 无需信用卡

  • 7 天免费试用
    无需信用卡
  • 符合 GDPR,SOC 2 就绪
    数据驻留欧盟,审计日志
  • 在 GitHub 开源
    开源 · AGPL-3.0
  • 支持 ChatGPT、Claude、Gemini
    任何兼容 MCP 的客户端

摘要

通过 Telegram Bot API,从任意 AI 代理发送 Telegram 消息、照片、相册、文档、音频、视频、动画、贴纸、联系人、地点、位置和投票。33 个工具,使用机器人令牌认证。以发送为主,另可轻量读取最近的更新(不使用长轮询)。

引导式设置

2 分钟将 Telegram Bot 连接到 Claude

开始 AnythingMCP Cloud 免费试用,在引导式设置中连接 Telegram Bot,再把你的 MCP URL 添加到 Claude。无需代码,也无需自行运行服务器。

无需信用卡 · 7 天试用 · 提供自托管方案

AnythingMCP 已收录在 Claude 的连接器目录中:一键添加到 Claude (在新标签页中打开),然后登录并选择 Claude 可以使用哪些 MCP 服务器。

试试这样问

Telegram Bot 的示例提示

点击任意提示即可复制,然后粘贴到 Claude、ChatGPT、Cursor、Gemini、Copilot 或 OpenClaw 中,在该连接器上运行。

Telegram Bot · 通过 MCP 实时
分享
Opus 4.7

Claude 是 AI,可能会出错。请核对回答。

💡 无需安装? 直接使用 cloud.anythingmcp.com。 登录、点击 Connectors → Telegram Bot、粘贴凭证、生成 MCP API key,即可完成。无 Docker、无 git clone、无本地服务器。

Telegram Bot + Claude

通过 Telegram Bot API,从任意 AI 代理发送 Telegram 消息、照片、相册、文档、音频、视频、动画、贴纸、联系人、地点、位置和投票。33 个工具,使用机器人令牌认证。以发送为主,另可轻量读取最近的更新(不使用长轮询)。

前提条件

完整的设置说明已内置在连接器中 (在 store 中选择连接器时可见)。所需环境变量:

TELEGRAM_BOT_TOKEN

步骤 1 — 获取凭证

  1. 在 Telegram 中打开与 @BotFather 的对话,发送 /newbot,然后设置显示名称和以 bot 结尾的用户名。
  2. BotFather 会回复一个类似 123456789:ABCdef... 的令牌。请把它当作密钥保管:任何拿到它的人都能以你的机器人身份发送消息。
  3. 将完整令牌粘贴到 TELEGRAM_BOT_TOKEN,然后安装连接器。Telegram 要求令牌出现在请求地址中,连接器会自动帮你放进去。
  4. 先运行 telegram_bot_get_me,确认令牌可用。

机器人能联系谁:每个聊天都有一个数字 chat_id。用户必须至少给你的机器人发送过一次 /start,群组和频道则需要先把机器人加进去。公开频道也接受 @channelusername;私有频道需要数字 id,以 -100 开头。telegram_bot_get_updates 会显示最近收到的消息及其 chat id。

能发送什么:文本消息(HTML 格式最稳妥)、照片、相册、文档、音频文件、语音消息、视频、GIF 动画、贴纸、联系人名片、地点、位置(包括实时位置)以及投票或测验。它还可以编辑和删除自己发出的消息,并读取聊天详情。

相册:telegram_bot_send_album 可将 2 到 10 张照片和视频作为一条分组消息发送,也可发送 2 到 10 个文档或 2 到 10 个音频文件;文档和音频不能与其他类型混合。说明文字放在第一项上。如果 Telegram 对某一项报告 WEBPAGE_CURL_FAILED,说明它无法下载该文件:链接必须公开,并直接指向文件本身,而不是网页。

文件:媒体通过 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 — 安装 adapter

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 上工作,无需触碰任何配置文件。

  1. 在 Claude 中打开 Plugins(部分套餐仍显示为 Customize)→ Connectors。
  2. 点击 + Add,然后点击 Add custom connector。
  3. 输入名称(例如 Telegram Bot)和远程 MCP 服务器 URL https://cloud.anythingmcp.com/mcp/YOUR_SERVER_ID,然后点击 Continue,保留检测到的设置,再次点击 Continue。
  4. 选择 Sign in now,点击 Add,登录 AnythingMCP(OAuth)并允许访问。

下面所有工具都会出现在你的聊天中,开始输入提示。

可用工具

ToolWhat it does
telegram_bot_get_meReturn the bot's own user info: id, username, first_name, can_join_groups, can_read_all_group_messages, supports_inline_queries
telegram_bot_send_messageSend a text message to a chat
telegram_bot_send_photoSend a photo (JPG/PNG, ≤5MB via URL) by HTTPS URL or by reusable file_id
telegram_bot_send_documentSend a document (any type, ≤20MB via URL) by HTTPS URL or file_id
telegram_bot_send_audioSend an audio file (MP3, M4A, ≤20MB via URL)
telegram_bot_send_voiceSend a voice note (OGG-Opus encoded)
telegram_bot_send_videoSend a video (MP4, H.264, AAC, ≤20MB via URL)
telegram_bot_send_locationSend a location point
telegram_bot_send_pollSend a poll (regular or quiz)
telegram_bot_edit_message_textEdit the text of a previously-sent message (your bot's own messages only)
telegram_bot_delete_messageDelete a message the bot sent (within ~48 hours for groups, anytime for own DMs)
telegram_bot_get_chatFetch chat info: title, type (private/group/supergroup/channel), photo, description, invite_link, member_count, permissions
telegram_bot_get_updatesLong-poll recent inbound messages (one-shot: pulls all updates since the last offset+1)
telegram_bot_send_albumSend 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_animationSend a GIF or a silent MP4 animation by HTTPS URL or file_id; Telegram plays it on a loop
telegram_bot_send_stickerSend 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_contactSend a phone contact card that the recipient can save or call
telegram_bot_send_venueSend a venue: a map pin with a name and address, e.g. a shop or meeting point
telegram_bot_get_fileLook 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_fileDownload a file by the file_path telegram_bot_get_file returned
telegram_bot_fetch_sticker_setRead 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_messageSet the bot's reaction on a message (the emoji under a message), or remove it with an empty list
telegram_bot_pin_messagePin a message in a chat, so it shows at the top
telegram_bot_unpin_chat_messageUnpin a pinned message in a chat; without message_id the most recently pinned message is unpinned
telegram_bot_rename_chatChange the title of a group, supergroup or channel (1 to 128 characters); not possible for private chats
telegram_bot_update_chat_descriptionChange the description of a group, supergroup or channel (0 to 255 characters; empty removes it)
telegram_bot_add_forum_topicCreate a topic in a forum supergroup (a group with topics enabled)
telegram_bot_edit_message_captionEdit the caption of a photo, video, document, audio or animation message the bot sent (an empty caption removes it)
telegram_bot_create_chat_invite_linkCreate 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_setCreate a new sticker set owned by a user, with 1 to 50 first stickers from existing image files
telegram_bot_extend_sticker_setAdd one sticker to a sticker set the bot created (telegram_bot_create_sticker_set)
telegram_bot_get_webhook_infoShow 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_webhookRemove the bot's webhook so updates can be read with telegram_bot_get_updates again

示例提示

  • “把这四个链接里的照片作为一个相册发到我们的团队频道,说明文字写‘新系列,今日上线’。”
  • “在销售群里发一个投票:季度回顾安排在周二还是周四?”
  • “把我们店的地址作为地点发到客户聊天里,方便他们在地图应用中打开。”
  • “给我看看机器人在过去一小时收到的消息,以及是谁发的。”
  • “在客户群里置顶节假日营业时间的那条消息,并给它点个赞。”
  • “为测试群创建一个邀请链接,周五过期,最多允许 50 人加入。”

FAQ

Claude Code 和 Claude Desktop 一样工作吗? 是的,两者都指向 https://cloud.anythingmcp.com/mcp/YOUR_SERVER_ID。

下一步

这份指南对你有帮助吗?

2 分钟将 Telegram Bot 连接到 Claude

开始 AnythingMCP Cloud 免费试用,在引导式设置中连接 Telegram Bot,再把你的 MCP URL 添加到 Claude。无需代码,也无需自行运行服务器。

相关指南

连接器

Telegram MCP 接入 Microsoft Copilot

通过 Telegram Bot API,从任意 AI 代理发送 Telegram 消息、照片、相册、文档、音频、视频、动画、贴纸、联系人、地点、位置和投票。33 个工具,使用机器人令牌认证。以发送为主,另可轻量读取最近的更新(不使用长轮询)。

连接器

Telegram MCP 接入 Meta Muse

通过 Telegram Bot API,从任意 AI 代理发送 Telegram 消息、照片、相册、文档、音频、视频、动画、贴纸、联系人、地点、位置和投票。33 个工具,使用机器人令牌认证。以发送为主,另可轻量读取最近的更新(不使用长轮询)。

连接器

Telegram MCP 接入 ChatGPT:消息与媒体

通过 Telegram Bot API,从任意 AI 代理发送 Telegram 消息、照片、相册、文档、音频、视频、动画、贴纸、联系人、地点、位置和投票。33 个工具,使用机器人令牌认证。以发送为主,另可轻量读取最近的更新(不使用长轮询)。

连接器

Telegram MCP 接入 Cursor:消息与投票

通过 Telegram Bot API,从任意 AI 代理发送 Telegram 消息、照片、相册、文档、音频、视频、动画、贴纸、联系人、地点、位置和投票。33 个工具,使用机器人令牌认证。以发送为主,另可轻量读取最近的更新(不使用长轮询)。

连接器

Telegram MCP 接入 Gemini CLI

通过 Telegram Bot API,从任意 AI 代理发送 Telegram 消息、照片、相册、文档、音频、视频、动画、贴纸、联系人、地点、位置和投票。33 个工具,使用机器人令牌认证。以发送为主,另可轻量读取最近的更新(不使用长轮询)。

连接器

Telegram MCP 服务器:消息与媒体

通过 Telegram Bot API,从任意 AI 代理发送 Telegram 消息、照片、相册、文档、音频、视频、动画、贴纸、联系人、地点、位置和投票。33 个工具,使用机器人令牌认证。以发送为主,另可轻量读取最近的更新(不使用长轮询)。