
Telegram MCP 服务器由 Telethon 驱动,允许 MCP 客户端阅读聊天、管理群组,并发送/修改消息、媒体、联系人和设置。
概览
Telegram 集成,适用于 Claude、Cursor 及其他兼容 MCP 客户端。它通过模型上下文协议(Model Context Protocol)使用 Telethon 展示 Telegram 账户、聊天、消息、联系人、媒体、文件夹和管理操作。 请Claude分析聊天记录并回复: 服务器目前包含80+ MCP工具,分为以下几个区域: - 按账户标签列出已配置的账户并路由工具调用。- 列出聊天内容,检查元数据,创建群组/频道,加入或离开聊天,邀请用户,管理管理员,封禁,默认权限,慢模式,话题,邀请链接,常见聊天,已读回执和消息链接。- 发送、调度、编辑、删除、转发、固定、取消固定、标记已读、回复、搜索、查看上下文、创建投票、管理反应、检查内联按钮,并点击内联回拨。- 列表、搜索、添加、删除、屏蔽、解除屏蔽、导入、导出、检查直接聊天,并查找最近的联系人互动。
概述(AI 翻译)
Telegram 集成,适用于 Claude、Cursor 及其他兼容 MCP 客户端。它通过模型上下文协议(Model Context Protocol)使用 Telethon 展示 Telegram 账户、聊天、消息、联系人、媒体、文件夹和管理操作。
🤖 MCP行动
Claude 中 Telegram MCP 的基本使用:
请Claude分析聊天记录并回复:
消息已成功发送:
目录
- 技能与实用工作流程
- 它能做什么
- 要求
- 快速入门
- MCP客户端配置
- 多账户设置
- 设备身份
- 预期账户核查
- 代理支持
- 文件路径安全
- 聊天访问隐私(允许列表)
- Docker
- 发展
- 安全说明
- 故障排除
- 许可证
技能与工作流程
正在寻找现成的工作流程、提示示例或集成配方? 探索技能文档,获取以下步骤指南:
- 安全总结未读消息
- 在未发送的情况下草拟回复
- 优先处理行动项和紧急请求
- 搜索聊天历史并扩展上下文
它能做什么
服务器目前包含80+ MCP工具,分为以下几个区域:
- 账户: 列出已配置账户并按账户标签路由工具调用。
本页由 AI 翻译,技术细节请以原文为准。
README
以下为原文 README 节选,完整内容请查看原文。
A Telegram integration for Claude, Cursor, and other MCP-compatible clients. It exposes Telegram account, chat, message, contact, media, folder, and admin operations through the Model Context Protocol using Telethon.
🤖 MCP in Action
Basic Telegram MCP usage in Claude:
Asking Claude to analyze chat history and send a response:
Message sent successfully:
Contents
- Skills & Practical Workflows
- What It Can Do
- Requirements
- Quick Start
- MCP Client Configuration
- Multi-Account Setup
- Device Identity
- Expected Account Check
- Proxy Support
- File Path Security
- Chat Access Privacy (Allowlist)
- Docker
- Development
- Security Notes
- Troubleshooting
- License
Skills & Workflows
Looking for ready-to-use workflows, prompt examples, or integration recipes? Explore the Skills Documentation for step-by-step guides on:
- Summarizing unread messages safely
- Drafting replies without sending
- Triaging action items & urgent requests
- Searching chat history and expanding context
What It Can Do
The server currently includes 80+ MCP tools grouped into these areas:
- Accounts: list configured accounts and route tool calls by account label.
安装
npx -y mcp-remote http://127.0.0.1:8765/mcp配置
{
"mcpServers": {
"telegram-mcp": {
"command": "uv",
"args": [
"--directory",
"/full/path/to/telegram-mcp",
"run",
"main.py"
],
"env": {
"TELEGRAM_API_ID": "your_api_id_here",
"TELEGRAM_API_HASH": "your_api_hash_here",
"TELEGRAM_SESSION_STRING": "your_session_string_here"
}
}
}
}