Skip to main content
Glama
telegram-mcp

telegram-mcp

by adsqwui

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
api_idYesTelegram API ID for your Telegram application.
MCP_HOSTNoHTTP mode listen address.127.0.0.1
MCP_PORTNoHTTP mode listen port.8765
api_hashYesTelegram API hash for your Telegram application.
TG_TIMEZONENoTimezone used for today and timestamps in responses.Europe/Moscow
TG_READ_ONLYNoWhen true, disables sending messages and creating chats.false
MCP_BEARER_TOKENNoBearer token for HTTP mode. Generated automatically by the installation script.
TG_ALLOWED_ROOTSNoColon-separated folders from which local files may be sent.files
TG_MAX_INLINE_MBNoFiles larger than this are stored on the server but not embedded in the response.10
TG_WHISPER_MODELNoWhisper model to use: tiny, base, small, medium, or large-v3.small
TG_MIN_ACTION_GAPNoPause between sends, in seconds.1.0
TG_WHISPER_LANGUAGENoOptional language code for transcription, e.g. ru. If unset, language detection is automatic.auto
TG_TRANSCRIBE_MAX_SECONDSNoMaximum voice message length transcribed automatically; longer messages require tg_get_media.600

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

A Telegram user account. chat accepts a numeric id from tg_list_chats (most reliable), @username, a t.me link, 'me' for Saved Messages, or the exact chat title. Read with tg_read_messages (date='today' or a date for one day, before_id to page back through the whole history). Voice messages come transcribed; tg_get_media returns images, transcripts and file contents. Messages you send go out from the user's real account: send only what the task asks for. Never press buttons that pay, confirm an order or top up a balance.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{
  "listChanged": false
}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}

Tools

Functions exposed to the LLM to take actions

NameDescription
tg_statusB

Which account the server uses and how it is configured. Call it first if anything fails.

tg_list_chatsA

List dialogs in Telegram's order (pinned first, then newest activity): id, title, type, unread count, last message.

kind filters by type ("private" includes Saved Messages). query matches the title or @username.
tg_chat_infoA

Details of a chat, group, channel, user or bot: description, members, your rights, invite link, bot commands.

tg_read_messagesA

Read messages of any chat, group or channel, oldest first.

date: one day, "today", "yesterday", "2026-11-24" or "24.11.2026" (in TG_TIMEZONE).
since / until: a range instead of date, a day or "2026-11-24 14:00".
limit: up to 500 per call. To read the whole history, repeat the call with before_id set to the
smallest id from the previous page until no more pages are reported. after_id returns only newer messages.
search: only messages containing this text. from_user: only messages from this person.
transcribe_voice: voice and round video messages come with a text transcript.
include_images: photos are attached as images (at most 10 per call).
mark_read: mark the chat as read up to the newest returned message.
tg_get_mediaA

Download the media of up to 10 messages and return it in a usable form.

Photos and images come back as images, video as a thumbnail plus transcript, voice/audio as a
transcript, text and PDF files as their text. Every file is saved on the server and its path is
returned (it can be sent again with tg_send_file). embed_file also attaches the raw file bytes.
tg_send_messageA

Send a text message to a private chat, group, channel (you must be allowed to post) or bot.

format "markdown": **bold**, __italic__, `code`, [text](https://link). reply_to: message id to reply to.
silent: no notification sound. wait_reply: seconds to wait and return incoming replies (useful for bots).
tg_send_fileA

Send a photo, voice message, video or any file. Give exactly one source:

path: a file on the server (from tg_get_media or inside TG_ALLOWED_ROOTS);
url: a public http(s) link that Telegram downloads itself;
content_base64 + filename: the file bytes, for clients that are not on the server.
send_as: auto picks by type, document keeps the original file, voice needs .ogg (opus) audio.
caption supports the same markdown as tg_send_message.
tg_clickA

Press an inline or keyboard button on a message (usually a bot's) and return what changed.

row and col come from the "[row,col]" list under the message. Link and mini app buttons are not
opened, their URL is returned instead.
tg_create_groupB

Create a group (supergroup) owned by this account. members: ids or @usernames to add right away. Returns the new chat id and an invite link.

tg_create_channelA

Create a channel owned by this account. username makes it public (t.me/username), otherwise it is private. members: ids or @usernames to add as subscribers. Returns the new chat id and an invite link.

tg_add_membersB

Add people to a group or channel where this account may invite. members: ids or @usernames.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

A3.7/5.0

Scored across 11 tools

Disambiguation4/5

Each tool targets a distinct action/resource: read vs send vs media download vs chat metadata vs creation vs membership vs button clicks. The only soft overlap is tg_read_messages carrying include_images/transcribe_voice options that partly duplicate tg_get_media's purpose, and tg_create_channel vs tg_create_group, but descriptions make the boundary clear enough.

Naming Consistency4/5

All tools share a consistent tg_ prefix with a predictable verb_noun shape (tg_list_chats, tg_send_file, tg_create_group, tg_add_members). Minor deviations like tg_status (noun only) and tg_click (bare verb) break the pattern slightly but remain obvious in context.

Tool Count5/5

11 tools is a well-scoped surface for a Telegram client: coverage of status, chats, messages, media, sending, bot interactions and chat administration without redundancy. Every tool earns its place and none feel like padding.

Completeness4/5

The core lifecycle (list/inspect chats, read history with pagination/search, send text and files, download media, interact with bot buttons, create channels/groups, add members) is well covered. Notable gaps remain around message edit/delete/forward and leaving or managing existing chats, which agents cannot work around with the current surface.

Maintenance

ActivityMaintained
ResponsivenessNo recent community issues