Skip to main content
Glama
raidenyn

Telegram MCP Server

by raidenyn

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
DATA_DIRNoThe directory where downloaded chat data and media files will be stored.
TELEGRAM_API_IDYesThe API ID for your Telegram application, obtained from my.telegram.org.
TELEGRAM_API_HASHYesThe API hash for your Telegram application, obtained from my.telegram.org.
TELEGRAM_SESSION_PATHNoThe file path where the telegram.session file is located or should be saved.

Capabilities

Features and capabilities supported by this server

CapabilityDetails
tools
{
  "listChanged": true
}

Tools

Functions exposed to the LLM to take actions

NameDescription
telegram_list_chats

List your Telegram dialogs (chats, groups, channels). Returns chat ID, title, type, and username. Use this to find the chat_id needed for other tools.

telegram_find_chat

Search for a specific chat by name, username, or ID. Returns the matching chat info or null if not found.

telegram_get_history

Fetch messages from a Telegram chat. Returns message text, sender, date, and media info. Does NOT download media files — use telegram_sync_chat for that. Useful for previewing chat contents before a full sync.

telegram_sync_chat

Full sync: downloads all messages and media files from a chat to local storage. Supports incremental sync — on subsequent runs, only fetches new messages. Files are saved to data/raw/{chat_id}/. This is the main tool for extracting chat data including photos and documents. Use since_date to limit the sync range, or omit for full/incremental sync.

telegram_download_media

Download media from a specific message. Use this for targeted downloads instead of a full sync. Returns file path and metadata.

telegram_sync_status

Check the sync status for a chat: last sync date, total synced messages, last message ID. Useful before deciding whether to run a new sync.

telegram_list_media

List all media files that have been downloaded for a chat. Requires a previous telegram_sync_chat run. Filter by type: photo, document, video, voice, or all.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/raidenyn/telegram-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server