ttm-telegram
Allows reading messages from Telegram groups using your own Telegram account, including listing allowed groups, retrieving group messages within a date range, and searching group messages by keyword. Access is restricted to groups configured in ALLOWED_GROUP_IDS.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
ttm-telegram
MCP server đọc tin nhắn nhóm Telegram bằng tài khoản Telegram của chính bạn. Chạy trên máy bạn. Dữ liệu đi thẳng từ máy bạn tới Telegram, không qua dịch vụ nào khác.
Công cụ (3 tool)
Tool | Làm gì |
| Liệt kê nhóm được phép đọc (theo |
| Đọc tin nhắn chữ của một nhóm trong khoảng ngày ( |
| Tìm tin nhắn trong nhóm theo từ khóa, tối đa 200 kết quả |
Related MCP server: Telegram OSINT
Trước khi cài
Lấy API id và API hash tại https://my.telegram.org, đăng nhập bằng số điện thoại Telegram của bạn, mục API development tools.
Cài nhanh (khuyến nghị, không cần Python)
macOS / Linux
curl -fsSL https://raw.githubusercontent.com/toantranmei/ttm-telegram/main/install.sh | shWindows (PowerShell)
irm https://raw.githubusercontent.com/toantranmei/ttm-telegram/main/install.ps1 | iexBước 1 – Đăng nhập một lần để tạo session
Trên macOS/Linux:
TELEGRAM_API_ID=<id> TELEGRAM_API_HASH=<hash> "$HOME/.local/bin/ttm-telegram" loginTrên Windows:
$env:TELEGRAM_API_ID="<id>"; $env:TELEGRAM_API_HASH="<hash>"; & "$env:LOCALAPPDATA\ttm\bin\ttm-telegram.exe" loginLần đầu Telegram sẽ gửi mã xác nhận tới bạn. Sau khi đăng nhập, lệnh in ra danh sách nhóm kèm Group ID. Ghi lại ID các nhóm bạn muốn cho phép đọc.
Session lưu tại ~/.ttm-telegram/session.session (trên Windows là %USERPROFILE%\.ttm-telegram\). Đây là chìa khóa tài khoản của bạn: không chia sẻ, không commit.
Bước 2 – Đăng ký với Claude Code
claude mcp add ttm-telegram \
-e TELEGRAM_API_ID=<id> \
-e TELEGRAM_API_HASH=<hash> \
-e ALLOWED_GROUP_IDS=-1001234567890 \
-- "$HOME/.local/bin/ttm-telegram"Claude Desktop (không dùng terminal)
Tải file ttm-telegram-*.mcpb mới nhất ở trang Releases, nhấp đúp để cài, rồi điền API id, API hash và group_id được phép đọc trong giao diện. Bước đăng nhập một lần (Bước 1 ở trên) vẫn cần chạy trong terminal một lần.
Cài bằng Python (tùy chọn)
Nếu bạn đã có uv: uvx ttm-telegram (sau khi có gói PyPI). Bước đăng nhập: uvx --from ttm-telegram ttm-telegram login.
Biến môi trường
Biến | Bắt buộc | Mặc định | Mô tả |
| có | — | API id từ my.telegram.org |
| có | — | API hash từ my.telegram.org |
| không |
| Đường dẫn file session (không kèm |
| không | (trống) |
|
| không |
| Múi giờ để tính khoảng ngày và hiển thị thời gian |
Quyền riêng tư và trách nhiệm
Server chỉ đọc các nhóm nằm trong
ALLOWED_GROUP_IDS. Mặc định không đọc nhóm nào.Tin nhắn được trả về cho AI client bạn đang dùng. Cân nhắc trước khi cho AI đọc nhóm có thông tin nhạy cảm.
Tài khoản Telegram là của bạn. Bạn tự chịu trách nhiệm tuân thủ điều khoản của Telegram và quyền riêng tư của thành viên nhóm.
Không có chế độ http, không mở cổng mạng.
Phát triển
git clone https://github.com/toantranmei/ttm-telegram && cd ttm-telegram
uv run --with-editable . ttm-telegram # chạy stdio
packaging/build.sh ttm-telegram darwin-arm64 # dựng binary + archive trong dist/release/Phát hành: đẩy tag v* để GitHub Actions dựng binary cho 4 nền tảng, đóng gói .mcpb và tạo Release.
Giấy phép
MIT. Xem LICENSE.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Your personal Telegram account for AI: read, search and sum up chats. QR login, no API key.
Search 1.7M+ Telegram channels, 250k+ chats, 228k+ bots, and what chats ask for. No key, no install.
Multi-tenant Telegram gateway for AI agents — HTTP+stdio, 8 tools, MTProto User API
I use your linked Telegram MTProto session (Integrations → Telegram) to list groups, members, and s…
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceA read-only Telegram MCP server that only exposes a user-defined allowlist of chats, providing tools to list chats, fetch messages, search, and get context while stripping untrusted text and with no write capabilities.MIT
- AlicenseAqualityBmaintenanceEnables an AI assistant to read and search the user's own Telegram account chats through a local server with no write operations. It also runs a background watcher that pre-filters incoming messages with substring, word, or regex rules and, optionally, has Claude judge each hit against plain-language criteria to surface only the alerts that matter.20MIT
- AlicenseBqualityCmaintenanceLets coding agents browse a personal Telegram account locally, retrieving per-chat text history and conversations or outgoing messages by date via QR login, read-only unless message sending is explicitly enabled. API credentials from Telegram are required, and access can be restricted to specific numeric chat IDs.3MIT
- AlicenseAqualityBmaintenanceRead chats, search messages and check members on your own Telegram account over MTProto. Any change is a typed plan a person applies from the terminal; no tool sends by itself.21MIT