Telegram MCP Server logo

Telegram MCP Server

by MCP-Mirror

This project provides a Telegram client library and an MCP server, enabling AI assistants to interact with Telegram. It allows searching channels, retrieving messages, and filtering content.

View on GitHub

Last updated: N/A

What is Telegram MCP Server?

The project consists of a Telegram client library and an MCP (Model Context Protocol) server. The Telegram client handles authentication, session management, and data retrieval from Telegram. The MCP server exposes this functionality to AI assistants, allowing them to interact with Telegram channels and messages.

How to use Telegram MCP Server?

  1. Configure your Telegram API credentials in a .env file. 2. Install dependencies using npm install. 3. Start the MCP server with npm start. 4. Connect your AI assistant (e.g., Claude) to the MCP server using the provided URL (http://localhost:3000/mcp). 5. Use the assistant to search channels, retrieve messages, or filter messages by pattern.

Key features of Telegram MCP Server

  • Telegram Authentication with 2FA support

  • Session Management

  • Search channels by keywords

  • Filter messages by pattern

Use cases of Telegram MCP Server

  • Enabling AI assistants to monitor Telegram channels for specific information

  • Building chatbots that can respond to messages in Telegram channels

  • Integrating Telegram data into AI-powered workflows

  • Automating tasks related to Telegram channels and messages

FAQ from Telegram MCP Server

What is the purpose of the Telegram Client Library?

The Telegram Client Library handles the communication with the Telegram API, including authentication, session management, and data retrieval.

What is the purpose of the MCP Server?

The MCP Server exposes the functionality of the Telegram Client Library to AI assistants through the Model Context Protocol.

How do I configure the Telegram API credentials?

You need to create a .env file with your Telegram API ID, API Hash, and phone number.

How do I start the MCP server?

You can start the MCP server by running the command npm start in the project directory.

How do I connect my AI assistant to the MCP server?

You need to connect your AI assistant to the MCP server using the provided URL (http://localhost:3000/mcp). The exact method depends on the AI assistant you are using.