telegram-mcp

telegram-mcp

156

The Telegram MCP Server provides automated interaction with Telegram via the Model Context Protocol, leveraging Telethon's full suite of API features for seamless integration. It supports message handling, chat management, and profile updates programmatically through clients like Claude and Cursor.

Telegram MCP Server

A full-featured Telegram integration for Claude, Cursor, and any MCP-compatible client, powered by Telethon and Model Context Protocol (MCP). This project allows programmatic interactions with your Telegram account, automating messaging, group management, and more.

Features & Tools

  • Telegram/Telethon tool integration for chat, group, and contact management.
  • Messaging capabilities including sending, editing, deleting, and forwarding messages.
  • User profile and privacy settings management.
  • Collaboration with MCP clients for seamless Telegram integration.

Installation & Setup

  1. Fork and clone the repository.
  2. Create a virtual environment and install dependencies.
  3. Generate a session string and configure the .env file with Telegram API credentials.

Running with Docker

  • Build the Docker image and run the server using Docker or Docker Compose for simplified management.

Usage Examples

  • Manage chats and contacts, send messages, search public chats, and join via invite links seamlessly through MCP-compatible clients.

Error Handling & Robustness

  • Robust error handling, fallback strategies, and user-friendly messages enhance reliability and user experience.