telegram-mcp-server

telegram-mcp-server

13

The Telegram MCP Server allows AI assistants to interact with Telegram accounts through the user client API. Key features include channel listing and message retrieval. It requires Node.js and Telegram API credentials to function.

Telegram MCP Server

An MCP server that enables AI assistants to interact with your Telegram account using Telegram's user client API. The server is built with @mtproto/core and the FastMCP framework, providing several tools:

Features

  • listChannels: Lists Telegram channels accessible by the account.
  • searchChannels: Searches cached channels by name keywords.
  • getChannelMessages: Retrieves recent messages from specific channels.

Prerequisites

  • Node.js (version 18 or later)
  • Active Telegram account with 2FA enabled
  • Obtain API credentials from Telegram.

Installation

  • Clone the repository and install dependencies via npm.

Running the Server

  • Initial login requires authentication via terminal inputs. Subsequent logins will use a session file.

Troubleshooting

  • Instructions for resolving login, cache, and module issues are provided.