MCP Telegram is an MCP server that connects Large Language Models to Telegram using the MTProto protocol and the Telethon framework. It is used by developers and AI assistant users who want their language models to manage Telegram communications directly from clients like Claude Desktop or Cursor. The server enables AI agents to send, edit, and delete messages, retrieve conversation histories, download shared media files, and manage message drafts across individual, group, or channel chats. It also includes search capabilities to locate dialogs by name or username and fetch specific messages using direct Telegram links. By executing actions on a user's authenticated Telegram session, it allows LLMs to assist with customer support, community moderation, draft preparation, and content archiving. Operations occur locally using a saved session file, requiring users to supply their own Telegram API credentials obtained from Telegram's developer platform.
Category: Communication & Messaging
Tags: bot, chat, messaging, telegram
uv are installed on your system. 2. Install the CLI tool by running uv tool install mcp-telegram in your terminal. 3. Authenticate your Telegram account by running mcp-telegram login and entering your API ID, API Hash, phone number, and verification code. 4. Open your MCP client configuration file (e.g., Claude Desktop or Cursor) and add the server configuration: json { "mcpServers": { "mcp-telegram": { "command": "mcp-telegram", "args": ["start"], "env": { "API_ID": "<your_api_id>", "API_HASH": "<your_api_hash>" } } } } 5. Replace <your_api_id> and <your_api_hash> with your Telegram credentials and restart your client.Part of MCP Servers
You install the CLI tool using uv by running uv tool install mcp-telegram. Next, execute mcp-telegram login to authenticate using your Telegram API ID, API Hash, phone number, and code. Finally, register mcp-telegram in your MCP client configuration.
MCP Telegram allows your language model to send, edit, and delete messages, retrieve chat histories, search for dialogs, access messages via link, download media files, and manage conversation drafts on Telegram.
Any standard Model Context Protocol client works with MCP Telegram, including Claude Desktop and Cursor. You configure the server by pointing to the mcp-telegram executable with the start argument.
Yes, MCP Telegram is an open-source project licensed under the MIT License. The code and issue tracker are publicly available on GitHub.
Telethon uses an SQLite session storage file that cannot be accessed by multiple instances simultaneously. If you encounter a database is locked error, ensure only one instance runs per session file, or terminate stuck background processes.