telegram-channel-mcp-server
telegram-channel-mcp-server
用于通过 Bot API 在 Telegram 频道中发布和管理帖子的 MCP 服务器(stdio)。 让代理(Claude Code、Claude Desktop 等)能够发布文本、照片、视频、相册、文档、 语音消息、视频笔记、投票/测验和付费内容,并编辑/删除/置顶帖子。
安装
npm install
npm run buildRelated MCP server: Telegram Bot MCP Server
配置
变量 | 必需 | 描述 |
| 是 | 来自 @BotFather 的机器人令牌。机器人必须是频道管理员,并具有“发布消息”权限(以及相应的编辑/删除权限)。 |
| 否 | 默认频道: |
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.jsClaude 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" }
}
}
}工具
工具 | 功能 |
| 带 HTML/MarkdownV2 的文本、链接预览控制、按钮 |
| 带说明文字、剧透和按钮的单个媒体项 |
| 将 2-10 个媒体项作为一个帖子发送的相册 |
| 用于 Telegram Stars 的付费帖子 |
| 投票或测验 / 关闭它并获取结果 |
| 修改文本、说明文字、媒体、按钮 |
| 删除最多 100 个帖子 |
| 置顶 / 取消置顶 |
| 从另一个聊天复制或转发帖子 |
| 代表频道添加回应 |
| 频道信息和订阅者数量(只读) |
媒体 在每个工具中都以字符串形式给出:公开的 http(s) URL、本地文件的绝对路径(由服务器上传),或 Telegram file_id(在发送结果中返回,因此无需重新上传即可复用文件)。
按钮 是行的数组:[[{ "text": "Website", "url": "https://…", "style": "primary" }], [{ "text": "Copy", "copy_text": "PROMO" }]]。url / callback_data / copy_text 三选一;style:primary | 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 - 入口点。
This server cannot be installed
Maintenance
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
- AlicenseBqualityDmaintenanceEnables 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.727MIT
- AlicenseNot gradedqualityBmaintenanceEnables sending Telegram messages, photos, and documents, and retrieving bot information through the Telegram Bot API.581MIT
- AlicenseNot gradedqualityCmaintenanceLets Claude manage a Telegram channel through the Bot API, including tracking subscriber growth and publishing, editing, pinning, or deleting posts.58MIT
- FlicenseNot gradedqualityCmaintenanceEnables publishing posts to a Telegram channel via an MCP tool, designed for scheduled content delivery and integration with Claude.
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.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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