
Telegram 的 MCP 服务器 — 通过用户 API( MTProto) 连接 Claude 与您真实的Telegram 账户
概览
一个通过用户 API (MTProto) 连接 Claude等AI 助手的 MCP 服务器. 不是机器人——克洛德像你一样读和发送信息. 由Gotd/td和官方MCP Go SDK所建. :此项目使用Telegram用户API. 您必须从 my.telegram.org 获得自己的 api id 和 api hash , 并遵守 Telegram API 服务条款 。 滥用用户API(垃圾邮件、散装邮件、刮刮)可能导致您的账户被禁。 你独自负责如何使用这个工具.
概述(AI 翻译)
一个MCP服务器,通过用户API(MTProto)将克洛德等AI助手连接到您 ** real Telegram 账户**. 不是机器人——克洛德像你一样读和发送信息.
由Gotd/td和官方MCP Go SDK所建.
Telegram API 服务条款:本项目使用Telegram用户API. 您必须从 my.telegram.org 获得自己的[[T0]和
api_hash,并遵守Telegram API 服务条款。 滥用用户API(垃圾邮件、散装邮件、刮刮)可能导致您的账户被禁。 你独自负责如何使用这个工具。
□ 目录
- 特征
- 你可以用它做什么吗?
- 如何比对链死/电话-mcp
- 快开始
- 客户端配置
- 配置参考
- 警卫
– – . . .
□ 特性
游戏工具 它做什么 需要的许可 |--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
QQ[ [T3]] 列表 ACL 白名单可见的对话框 QQ
QQ[ [T4]] 以页码、日期过滤和媒体下载获取消息历史 QQread
QQ[ [T6] 以文本查询方式在聊天中搜索消息,可选发送器过滤QQ[ [T7] QQ
本页由 AI 翻译,技术细节请以原文为准。
README
以下为原文 README 节选,完整内容请查看原文。
mcp-telegram
An MCP server that connects AI assistants like Claude to your real Telegram account via the User API (MTProto). Not a bot — Claude reads and sends messages as you.
Built with gotd/td and the official MCP Go SDK.
Telegram API Terms of Service: This project uses the Telegram User API. You must obtain your own
api_idandapi_hashfrom my.telegram.org and comply with the Telegram API Terms of Service. Misuse of the User API (spam, bulk messaging, scraping) may result in your account being banned. You are solely responsible for how you use this tool.
Contents
- Features
- What you can do with it
- How it compares to chaindead/telegram-mcp
- Quick start
- Client configuration
- Configuration reference
- Security
Features
| Tool | What it does | Required permission |
|---|---|---|
tg_me |
Returns current account info | — |
tg_dialogs |
Lists dialogs visible to the ACL whitelist | — |
tg_history |
Fetches message history with pagination, date filtering, and media download | read |
tg_search |
Searches messages in a chat by text query, with optional sender filter | read |
tg_send |
Sends a text message or file, with optional reply-to | send |
tg_forward |
Forwards messages from one chat to another | read + send |
tg_draft |
Saves a draft message (does not send) | draft |
tg_mark_read |
Marks a chat as read | mark_read |
Additional capabilities:
- File and photo sending
- Forward messages between chats
- Reply to specific messages
- Download photos and documents from message history
- Filter history by date range (
since/until) - Typed peer references (
user:ID,chat:ID,channel:ID) to prevent ID collisions - Lazy peer resolution — avoids
FLOOD_WAITerrors at startup - Global rate limiting at the RPC level
What you can do with it
Once connected, you can ask your AI assistant things like:
Catch up on messages
- “Check my unread Telegram messages and give me a summary”
- “What did @alice write in the last 24 hours?”
- “Show me messages from the Dev Team chat since Monday”
Reply and communicate
- “Draft a response to the last message from @bob — don’t send it yet”
- “Send ‘sounds good, let’s meet at 3pm’ to @alice”
- “Reply to message 1234 in the project chat with my feedback”
Manage your inbox
安装
npx @prgebish/mcp-telegram serve --config config.yaml配置
{
"mcpServers": {
"telegram": {
"command": "/path/to/mcp-telegram",
"args": ["serve", "--config", "/path/to/config.yaml"],
"env": {
"TG_APP_ID": "12345",
"TG_API_HASH": "your_api_hash"
}
}
}
}