Skip to main content
Glama
eduard256

telegram-channel-mcp-server

by eduard256

telegram-channel-mcp-server

用于通过 Bot API 在 Telegram 频道中发布和管理帖子的 MCP 服务器(stdio)。 让代理(Claude Code、Claude Desktop 等)能够发布文本、照片、视频、相册、文档、 语音消息、视频笔记、投票/测验和付费内容,并编辑/删除/置顶帖子。

安装

npm install
npm run build

Related MCP server: Telegram Bot MCP Server

配置

变量

必需

描述

TELEGRAM_BOT_TOKEN

来自 @BotFather 的机器人令牌。机器人必须是频道管理员,并具有“发布消息”权限(以及相应的编辑/删除权限)。

TELEGRAM_CHAT_ID

默认频道:-100…@username。每个工具都接受一个 chat_id 来覆盖默认值。

Claude Code

claude mcp add telegram-channel -e TELEGRAM_BOT_TOKEN=123:ABC -e TELEGRAM_CHAT_ID=-1001234567890 -- node /abs/path/telegram-channel-mcp/dist/index.js

Claude Desktop (claude_desktop_config.json)

{
  "mcpServers": {
    "telegram-channel": {
      "command": "node",
      "args": ["/abs/path/telegram-channel-mcp/dist/index.js"],
      "env": { "TELEGRAM_BOT_TOKEN": "123:ABC", "TELEGRAM_CHAT_ID": "-1001234567890" }
    }
  }
}

工具

工具

功能

telegram_send_message

带 HTML/MarkdownV2 的文本、链接预览控制、按钮

telegram_send_photo / _video / _animation / _document / _audio / _voice / _video_note

带说明文字、剧透和按钮的单个媒体项

telegram_send_media_group

将 2-10 个媒体项作为一个帖子发送的相册

telegram_send_paid_media

用于 Telegram Stars 的付费帖子

telegram_send_poll / telegram_stop_poll

投票或测验 / 关闭它并获取结果

telegram_edit_message

修改文本、说明文字、媒体、按钮

telegram_delete_messages

删除最多 100 个帖子

telegram_pin_message / telegram_unpin_message

置顶 / 取消置顶

telegram_copy_message

从另一个聊天复制或转发帖子

telegram_set_reaction

代表频道添加回应

telegram_get_chat

频道信息和订阅者数量(只读)

媒体 在每个工具中都以字符串形式给出:公开的 http(s) URL、本地文件的绝对路径(由服务器上传),或 Telegram file_id(在发送结果中返回,因此无需重新上传即可复用文件)。

按钮 是行的数组:[[{ "text": "Website", "url": "https://…", "style": "primary" }], [{ "text": "Copy", "copy_text": "PROMO" }]]url / callback_data / copy_text 三选一;styleprimary | success | danger

服务器处理的 Bot API 限制

  • 相册和视频笔记不能携带按钮——请将它们放在单独的消息中发送。

  • 在相册中,show_caption_above_media 会同时应用于所有项目。

  • 付费内容仅在频道中有效,价格为 1-10 000 stars。

  • 频道中的投票始终是匿名的。

  • 限制:文本 4096 字符,说明文字 1024,文件上传 50 MB / 通过 URL 20 MB。

开发

npm run dev                        # run from sources
npm run smoke -- /path/to/img.png  # e2e check against a real channel (creates and deletes test posts)
npx @modelcontextprotocol/inspector node dist/index.js

目录结构:src/telegram.ts - API 客户端和媒体解析,src/schemas.ts - 共享的 zod schemas, src/format.ts - 响应格式化,src/tools/* - 按领域分组的工具,src/index.ts - 入口点。

F
license - not found
Not graded
quality - not tested
C
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • A
    license
    B
    quality
    D
    maintenance
    Enables interaction with Telegram channels through the Bot API, supporting comprehensive messaging operations including sending text/photos, creating polls, managing reactions, and editing/deleting messages. Provides complete channel management capabilities for automated Telegram bot operations.
    7
    27
    MIT
  • A
    license
    Not graded
    quality
    C
    maintenance
    Lets Claude manage a Telegram channel through the Bot API, including tracking subscriber growth and publishing, editing, pinning, or deleting posts.
    58
    MIT

View all related MCP servers

Related MCP Connectors

  • Telegram channels you administer: analytics, content plans, scheduled publishing. No userbot

  • Publish, schedule, and manage social media posts across major platforms via the Postproxy API.

  • MemberPass MCP — manage projects, plans, members, payments, and analytics for Telegram creators.

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/eduard256/telegram-channel-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server