whatisgithub

What is telegram-mcp-server?

piat0n/telegram-mcp-server — explained in plain English

Analysis updated 2026-05-18

5PythonAudience · developerComplexity · 3/5Setup · moderate

In one sentence

A Model Context Protocol server giving AI agents secure, encrypted access to Telegram group chats, including audio and video parsing.

Mindmap

mindmap
  root((repo))
    What it does
      Telegram access for AI agents
      Audio and video conversion
      Encrypted session storage
    Tech stack
      Python
      ffmpeg
      SQLite
    Use cases
      Let an AI read Telegram groups
      Convert voice notes for AI models
      Wait for new messages in real time
    Audience
      Developers
      MCP client users
    Setup
      Python 3.9 or later
      Telegram API ID and hash
      Run encrypt_setup.py with a PIN

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Give an AI agent like Claude secure read and search access to your Telegram group chats.

USE CASE 2

Let an AI model natively process Telegram voice notes and video messages.

USE CASE 3

Have an AI wait efficiently for a new Telegram message instead of polling.

USE CASE 4

Let an AI draft Telegram replies for you to review and send manually.

What is it built with?

PythonffmpegSQLiteasyncio

How does it compare?

piat0n/telegram-mcp-server1ncendium/aibusteraaronmayeux/ha-hurricane-tracker
Stars555
LanguagePythonPythonPython
Setup difficultymoderatemoderateeasy
Complexity3/53/52/5
Audiencedeveloperops devopsgeneral

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · moderate Time to first run · 30min

Requires a Telegram API ID and hash, plus running an interactive PIN-based encryption setup script.

No license information is stated in the README.

So what is it?

This project is a Model Context Protocol server that gives AI agents like Claude or Gemini secure, real time access to a Telegram account. It is built specifically for privacy, cross platform stability, and handling audio and video content, distinguishing it from other Telegram MCP projects the author has seen. One notable feature is native handling of audio and video messages. Telegram voice notes and video messages come in formats AI models cannot easily process, so the server uses a bundled ffmpeg tool to convert them into standard mp4 files on the fly, letting multimodal AI models listen to and watch these files directly rather than relying on separate transcription services. Telegram API keys and session data are also encrypted in memory using AES-256, derived from a four digit PIN you set during setup, so plain text credentials never sit on disk. The server refuses to access private direct messages or bot conversations, only allowing group and supergroup chats, and it supports saving AI composed replies as drafts for a human to review before sending. A radar mode lets the AI wait efficiently for a new message rather than repeatedly polling, and incoming messages are cached locally in SQLite so searches do not need to hit Telegram's servers every time. To set it up, you need Python 3.9 or later on macOS, Linux, or Windows, plus a Telegram API ID and hash obtained from Telegram's own developer site. After cloning the repository and installing the Python dependencies, you copy an example environment file, fill in your Telegram credentials, and run a setup script that logs you into Telegram and asks you to create a four digit PIN to encrypt your session. Linux users without a desktop environment need the tkinter library and a display available for that PIN entry window, or they can modify the code to use a plain text prompt instead. Once set up, the server can be added to an MCP client such as Claude Desktop or Cursor by pointing it at the project's main Python file, and launching it will prompt for your PIN before it starts serving tools. Those tools include listing and searching your chats, fetching message history around a specific point, downloading and converting media files, sending messages, saving drafts, and waiting for new messages to arrive.

Copy-paste prompts

Prompt 1
Walk me through setting up this Telegram MCP server with encrypt_setup.py and a PIN.
Prompt 2
Explain how this server converts Telegram voice notes into a format AI models can process.
Prompt 3
Show me how to add this MCP server's main.py to my Claude Desktop configuration.
Prompt 4
What tools does this server expose for searching and fetching Telegram chat messages?

Frequently asked questions

What is telegram-mcp-server?

A Model Context Protocol server giving AI agents secure, encrypted access to Telegram group chats, including audio and video parsing.

What language is telegram-mcp-server written in?

Mainly Python. The stack also includes Python, ffmpeg, SQLite.

What license does telegram-mcp-server use?

No license information is stated in the README.

How hard is telegram-mcp-server to set up?

Setup difficulty is rated moderate, with roughly 30min to a first successful run.

Who is telegram-mcp-server for?

Mainly developer.

Open on GitHub → Ask about another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.