telegram-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| api_id | Yes | Telegram API ID for your Telegram application. | |
| MCP_HOST | No | HTTP mode listen address. | 127.0.0.1 |
| MCP_PORT | No | HTTP mode listen port. | 8765 |
| api_hash | Yes | Telegram API hash for your Telegram application. | |
| TG_TIMEZONE | No | Timezone used for today and timestamps in responses. | Europe/Moscow |
| TG_READ_ONLY | No | When true, disables sending messages and creating chats. | false |
| MCP_BEARER_TOKEN | No | Bearer token for HTTP mode. Generated automatically by the installation script. | |
| TG_ALLOWED_ROOTS | No | Colon-separated folders from which local files may be sent. | files |
| TG_MAX_INLINE_MB | No | Files larger than this are stored on the server but not embedded in the response. | 10 |
| TG_WHISPER_MODEL | No | Whisper model to use: tiny, base, small, medium, or large-v3. | small |
| TG_MIN_ACTION_GAP | No | Pause between sends, in seconds. | 1.0 |
| TG_WHISPER_LANGUAGE | No | Optional language code for transcription, e.g. ru. If unset, language detection is automatic. | auto |
| TG_TRANSCRIBE_MAX_SECONDS | No | Maximum 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
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| 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. |
| 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. |
| tg_get_mediaA | Download the media of up to 10 messages and return it in a usable form. |
| tg_send_messageA | Send a text message to a private chat, group, channel (you must be allowed to post) or bot. |
| tg_send_fileA | Send a photo, voice message, video or any file. Give exactly one source: |
| tg_clickA | Press an inline or keyboard button on a message (usually a bot's) and return what changed. |
| 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
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 11 tools
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.
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.
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.
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.