Better Telegram MCP
Better Telegram MCP
mcp-name: io.github.n24q02m/better-telegram-mcp
支持双模式的 Telegram MCP 服务器:用于快速机器人集成的 Bot API (httpx) 和用于完整用户账户访问的 MTProto (Telethon)。
功能特性
双模式 -- 用于机器人的 Bot API (httpx) 和用于用户账户的 MTProto (Telethon)
6 个工具,支持动作分发:
message、chat、media、contact、config、help自动检测模式 -- 设置机器人令牌以使用机器人模式,或设置 API 凭据以使用用户模式
基于 Web 的 OTP 认证 -- 基于浏览器的身份验证,支持无头环境的远程中继
工具注解 -- 每个工具都声明了
readOnlyHint、destructiveHint、idempotentHint、openWorldHintMCP 资源 -- 文档以
telegram://docs/*资源形式提供安全加固 -- SSRF 防护、路径遍历预防、错误信息脱敏
Related MCP server: Telegram MCP Server & Channel Monitor
设置
使用 AI Agent -- 复制并发送此内容给您的 AI Agent:
请为我设置 better-telegram-mcp。请遵循此指南: https://raw.githubusercontent.com/n24q02m/better-telegram-mcp/main/docs/setup-with-agent.md
手动设置 -- 请遵循 docs/setup-manual.md
工具
工具 | 动作 | 描述 |
|
| 发送、编辑、删除、转发消息。置顶、反应、搜索、浏览历史记录 |
|
| 列出并管理聊天、群组、频道。成员、管理员、论坛主题 |
|
| 发送照片、文件、语音笔记、视频。从消息中下载媒体 |
|
| 列出、搜索、添加联系人。拉黑/解除拉黑用户(仅限用户模式) |
|
| 服务器状态、运行时设置、缓存、凭据设置(中继、状态、重置、完成) |
| -- | 任何主题的完整文档 |
MCP 资源
URI | 内容 |
| 消息操作参考 |
| 聊天管理参考 |
| 媒体发送/下载参考 |
| 联系人管理参考 |
| 所有文档汇总 |
安全性
SSRF 防护 -- 所有 URL 均针对内部/私有 IP 范围进行验证,阻止 DNS 重绑定
路径遍历预防 -- 验证文件路径,阻止访问敏感目录
会话文件安全 -- 600 权限,仅通过 Web UI 进行 2FA(从不存储在环境变量中)
错误脱敏 -- 错误消息中绝不泄露凭据
从源码构建
git clone https://github.com/n24q02m/better-telegram-mcp.git
cd better-telegram-mcp
uv sync
uv run better-telegram-mcp许可证
MIT -- 参见 LICENSE。
This server cannot be deployed
Maintenance
Related MCP Connectors
Multi-tenant Telegram gateway for AI agents — HTTP+stdio, 8 tools, MTProto User API
Telegram bridge for your MCP-compatible agent. Bidirectional, no LLM in our stack.
Unified messaging MCP server: WhatsApp, Instagram, Telegram, SMS, Messenger & email support inbox
Telegram: FASTEST real time Telegram API. Retrieve channel's info and messages in milliseconds..
Related MCP Servers
- AlicenseBqualityCmaintenanceFull-featured Telegram Bot API server for MCP (Model Context Protocol). 174 tools covering the entire Bot API — messages, chats, stickers, payments, forums, stories, and more.10031 npm7MIT
- AlicenseAqualityDmaintenanceA comprehensive MCP server providing 35 tools for managing Telegram messages, media, and chat interactions via the Bot API. It also features a real-time monitoring system using the Telethon User API to log messages from specific channels.35Apache 2.0
- AlicenseNot gradedqualityBmaintenanceTelegram MTProto-based MCP server with 19 tools for reading, searching, sending, forwarding, and summarizing messagesMIT
- AlicenseNot gradedqualityCmaintenanceDual-plane Telegram MCP server providing read-only analytics and guarded write actions with built-in rate limiting, anti-spam protection, and session management.9MIT