TelegramConnection

•

Connects to Telegram channels, groups, and private chats to read messages, download media, and send messages or files.

TelegramConnection is a versatile Python library and MCP (Model Context Protocol) server designed to bridge AI agents with Telegram. It enables comprehensive interaction with Telegram channels, groups, and private chats, allowing users to read conversations, filter messages by date or keyword, search for channels, download various media types, and send text messages or files. Its hybrid architecture supports direct integration into Python programs or seamless operation as an MCP tool for AI agents like Claude Code, facilitating advanced automation and data management on the Telegram platform.

主要功能

01Search subscribed and public Telegram channels globally.
02Download single or batch media, automatically organizing files by channel and date.
03Send text messages and files, supporting direct paths, outbox folders, and album-style multi-file transfers.
04Simultaneously provide read conversations for AI consumption and store them as JSON files.
050 GitHub stars
06Read Telegram conversations with filters for date range, keywords, and media types.

使用案例

01Integrate Telegram interaction capabilities directly into Python applications.
02Enable AI agents (e.g., Claude Code, Claude Desktop) to programmatically interact with Telegram chats.
03Automate Telegram data collection, message sending, and content management for personal or professional workflows.