Skip to main content
Glama
beautyfree

mcp-telegram

by beautyfree

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
LOG_LEVELNoLog level (e.g., debug, info, warn, error).info
TELEGRAM_API_IDYesYour Telegram API ID from my.telegram.org/apps.
TELEGRAM_API_HASHYesYour Telegram API hash from my.telegram.org/apps.
MCP_TELEGRAM_TOOLSNoComma-separated allowlist of tool names, supports wildcards.
TELEGRAM_AGENT_HOMENoDirectory for state and session storage.~/.telegram-agent
MCP_TELEGRAM_DISABLENoComma-separated blocklist of tool names, supports wildcards.
MCP_TELEGRAM_READONLYNoSet to '1', 'true', or 'yes' to hide destructive tools.
TELEGRAM_AGENT_DOWNLOADSNoDirectory for downloaded media.$TELEGRAM_AGENT_HOME/downloads

Instructions

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

This server publishes no instructions, or was last inspected before Glama recorded them.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{
  "listChanged": true
}

Tools

Functions exposed to the LLM to take actions

NameDescription
list_accountsA

Return the Telegram accounts currently signed in on this machine.

loginA

Open a browser window where the user signs in to Telegram (phone → code → 2FA). Resolves once the user finishes. Use this when no account is signed in or to add another one.

logoutA

Drop the local session for an account and revoke it on the Telegram side.

get_meA

Return the profile of the authenticated user for the chosen account.

open_settingsA

Open a local browser tab where the user can toggle read-only mode and edit the tool allowlist / blocklist. Resolves when the user closes the tab. Changes are persisted to ~/.telegram-agent/state.json; the MCP client must be restarted to pick them up. Env vars (MCP_TELEGRAM_READONLY / TOOLS / DISABLE) override stored values and are shown as locked in the UI.

update_profileA

Change own first name, last name, or about. Omitted fields are left untouched.

update_my_usernameA

Set or clear (empty string) own public username.

set_birthdayC

Set the account birthday. Year is optional.

set_profile_photoB

Upload a new profile photo from a local path or URL.

list_dialogsA

List available Telegram dialogs, chats and channels for the chosen account.

search_dialogsA

Find dialogs by a substring against their name/title/username.

resolve_usernameA

Look up a user, channel, or chat by @username.

list_foldersB

Return the user-defined folders (a.k.a. chat filters) with their inclusion rules.

list_messagesB

List messages in a dialog. Newest first.

search_messagesA

Search messages within one dialog. Supports text substring, type filter (photos/links/etc), sender filter, and date range. Newest first unless reverse=true.

search_globalA

Search messages across every chat the user is in. Useful for "find that link about X".

get_messageA

Fetch one or several messages from a dialog by their ids.

mark_as_readA

Mark a dialog (and optionally up to a specific message id) as read.

send_messageA

Send a text message to a dialog. Supports reply, forum topic, silent, scheduled delivery, and parse mode.

edit_messageB

Edit the text of a previously sent message.

delete_messagesA

Delete messages by id. revoke (default true) deletes for all participants where possible.

forward_messagesB

Forward messages from one dialog to another.

pin_messageC

Pin a message in the dialog.

unpin_messageA

Unpin a specific message, or pass no id to unpin everything in the dialog.

send_message_to_phoneA

Send a Telegram message to someone identified only by their phone number. The phone is briefly added to contacts (Telegram requires this), the message is sent, then the contact entry is removed by default. Phone must include country code (e.g. +12025550123).

get_saved_reaction_tagsA

Return all reaction-tags the user has set on Saved Messages, with their custom titles and per-tag message counts. Premium feature; works only on the me peer.

update_saved_reaction_tagA

Set or clear the custom title of a Saved-Messages reaction-tag. Pass title to rename, omit to clear. Premium feature.

get_default_tag_reactionsC

Server-suggested default emoji set for Saved-Messages tagging.

search_saved_messagesA

Search inside Saved Messages (me). Combine free-text query with tagEmoji and/or tagCustomEmojiIds to filter by reaction-tag. Newest first.

get_saved_dialogsA

List the forum-style sub-dialogs inside Saved Messages — each grouping forwards from one origin peer.

get_saved_historyA

Fetch messages inside one Saved-Messages sub-dialog (filtered by original sender peer).

delete_saved_historyA

Wipe all messages in one Saved-Messages sub-dialog (forwards from a single origin peer). Irreversible.

toggle_saved_dialog_pinA

Pin/unpin one of the forum-style sub-dialogs inside Saved Messages.

send_fileA

Upload and send one or more files. Each path may be an absolute local path or an https:// URL. Passing multiple paths sends them as an album.

download_mediaA

Download the media attached to a message. Files land in /root/.telegram-agent/downloads (override with MCP_TELEGRAM_DOWNLOADS env). Returns the absolute path.

download_profile_photoA

Download the profile photo of a user/chat/channel. Saved under /root/.telegram-agent/downloads.

transcribe_messageA

Request a transcription of a voice note or video message. Requires a Telegram Premium account. The response may be pending — re-call to poll, passing the same message id.

send_reactionA

Set one or more reactions on a message. Pass an empty reaction list to remove existing reactions.

get_message_reactionsA

Fetch the current reactions for one or more messages in a dialog.

set_default_reactionC

Set the quick reaction emoji shown on long-press in clients.

send_pollB

Send a poll. For a quiz, set quiz: true and correctAnswerIndex (0-based). Use closePeriod (seconds) or closeDate (unix seconds) to auto-close.

vote_pollC

Cast a vote on a poll by the index(es) of the chosen options.

close_pollA

Finalize a poll so no further votes are accepted.

get_poll_resultsA

Fetch the current vote tally for a poll message.

list_storiesB

Return the stories feed (other users' active stories).

get_peer_storiesB

Return active stories posted by one peer.

send_storyB

Publish a story (photo or video) on the chosen peer. Visibility defaults to "everyone".

delete_storyC

Remove stories you previously posted.

view_storyC

Increment view counters for the given stories.

get_story_viewersB

Show who has viewed a story you posted.

ban_userB

Fully ban a user. Pass untilDate (unix seconds) to time-limit the ban; default is forever.

unban_userB

Remove all restrictions for a user.

restrict_userB

Set specific restrictions. true for a field means the user CANNOT do that action.

promote_adminA

Grant admin rights. Pass only the fields you want enabled; omitted fields default to false.

demote_adminB

Remove all admin rights from a user.

invite_userB

Add a user (or list of users) to a channel or supergroup.

get_participantA

Return role, rights, and join date for one user in a channel/supergroup.

list_participantsA

List members of a group, supergroup, or channel. Optional filter (admins/kicked/banned/bots) and substring search.

delete_user_historyA

Wipe every message a given user has posted in the channel/supergroup.

kick_participantA

Remove a user from a chat/channel. Requires admin rights.

get_admin_logA

Return recent admin events. Set fields in events to true to include those categories; leave empty to include everything.

edit_titleA

Set a new title. Works for channels, supergroups, and basic groups.

edit_aboutA

Set the description of a channel/supergroup. Max 255 chars.

edit_photoB

Upload a new avatar photo from a local path or URL.

update_usernameA

Assign a new public username. Pass an empty string to clear it.

check_usernameA

Verify whether a desired channel/supergroup username is free.

set_slow_modeA

Limit how often non-admins can post. Allowed values: 0 (off), 10, 30, 60, 300, 900, 3600 seconds.

toggle_signaturesC

Broadcast channels only.

toggle_pre_history_hiddenA

Supergroups only. When enabled, new members cannot see history before they joined.

toggle_join_requestA

When enabled, new members must be approved by an admin.

leave_channelA

Leave the channel. Use delete_channel to also remove it (creator only).

get_channel_infoA

Return extended info for a channel or supergroup (about, participants count, linked chat, slow mode).

get_user_infoB

Return extended profile info (bio, common chats count, etc.) for a user.

create_channelB

Create a broadcast channel (broadcast: true) or a supergroup (megagroup: true).

delete_channelA

Permanently delete the channel. Creator only.

migrate_chatA

One-way migration. Returns the new supergroup id in the resulting updates.

transfer_ownershipA

Transfer creator rights to another user. Requires the account 2FA password (Telegram enforces this).

create_invite_linkB

Generate a new invite link with optional expiry, usage cap, and join-request gate.

list_invite_linksA

List all invite links the current user can see in a chat.

revoke_invite_linkB

Permanently revoke a previously generated invite link.

list_invite_joinersB

List users that joined a chat through a specific invite link.

list_topicsA

List topics in a supergroup with forum mode enabled.

create_topicA

Create a new topic in a forum-enabled supergroup.

edit_topicB

Rename / re-icon / close / hide a topic.

save_draftA

Save a draft for a dialog. Pass empty text to clear it.

clear_draftA

Equivalent to save_draft with an empty text.

list_draftsB

Return all dialog drafts the user has across chats.

mute_peerA

Mute a chat. Without untilDate, mutes forever.

unmute_peerB

Clear a mute on a chat.

get_notify_settingsC

Return notification settings for a peer.

set_notify_settingsC

Update notify settings for a peer (sound, show preview, mute, story mute).

create_folderA

Create a new dialog folder (chat filter). id is auto-assigned to the next free slot 2..255.

edit_folderC

Replace the rules of an existing folder. id is required.

delete_folderB

Remove a folder by id.

reorder_foldersA

Set the display order of folders by passing the list of ids in the desired sequence.

list_contactsB

List all users in the contact book.

add_contactC

Add a user to your contacts.

delete_contactC

Remove one or more users from the contact book.

search_contactsA

Search users/chats/channels by a query (matches name, username, and indexed text).

block_userC

Block a user from contacting you.

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/beautyfree/mcp-telegram'

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