Skip to main content
Glama
mcp-telegram

mcp-telegram

by beautyfree

npm version License Node

A Model Context Protocol (MCP) server that connects Claude Desktop, Codex CLI, Cursor, Claude Code, VS Code, Cline, Windsurf, Goose, and any other MCP-compatible client to a real Telegram user account via MTProto—so your agent can read, search, send, moderate, and manage Telegram chats from chat or automated tool calls instead of clicking through the Telegram UI.

Use it to: read dialogs and search messages globally · send/edit/forward/react/poll · download media and transcribe voice notes · moderate channels (ban/restrict/promote, invite links, slow-mode, admin log, forum topics) · manage stories, contacts, drafts, notifications, folders, privacy · or fall through to the raw MTProto bridge for anything else. All against a single signed-in user account—no bot required.

WARNING

This server signs in as a real Telegram user (not a bot). Sessions live in~/.telegram-agent/. Treat that directory like a password.

Prerequisites

  1. Node.js >=20

  2. Telegram API credentials from my.telegram.org/apps — api_id and api_hash

Related MCP server: telegram-mcp

Want a lighter transport?

This package is the MCP server — every tool schema (~12,700 tokens) sits in your agent's context on every turn. Good for any MCP client and for hosted runtimes that can't shell out.

If your agent is Claude Code / Codex CLI / Cursor / Gemini CLI / Cline / Windsurf, there's a companion package — telegram-agent — that ships the same Telegram surface as a universal agent skill. The agent only loads the skill instructions when your prompt mentions Telegram — ~50× lower context cost in idle. Standalone (no MCP server in the loop), but uses the same ~/.telegram-agent/ session store as this package — sign in once, use either or both.

npm i -g telegram-agent
telegram-agent login
npx skills add beautyfree/telegram-agent -a claude-code -g

Continue below for the MCP install path.

Install

Option A — automatic, all clients:

npx add-mcp mcp-telegram \
  --env TELEGRAM_API_ID=123456 \
  --env TELEGRAM_API_HASH=abc...

add-mcp (from Neon) writes the correct config for Claude Desktop, Claude Code, Cursor, VS Code, Codex, Gemini CLI, Cline, Zed, Goose, OpenCode, and others. Pick the client in the interactive prompt.

IMPORTANT

Both env vars are required. Get them frommy.telegram.org/apps.

Option B — manual config:

{
  "mcpServers": {
    "telegram": {
      "command": "npx",
      "args": ["-y", "mcp-telegram"],
      "env": {
        "TELEGRAM_API_ID": "123456",
        "TELEGRAM_API_HASH": "abc..."
      }
    }
  }
}
{
  "mcpServers": {
    "telegram": {
      "command": "npx",
      "args": ["-y", "mcp-telegram"],
      "env": {
        "TELEGRAM_API_ID": "123456",
        "TELEGRAM_API_HASH": "abc..."
      }
    }
  }
}
{
  "servers": {
    "telegram": {
      "type": "stdio",
      "command": "npx",
      "args": ["-y", "mcp-telegram"],
      "env": {
        "TELEGRAM_API_ID": "123456",
        "TELEGRAM_API_HASH": "abc..."
      }
    }
  }
}
claude mcp add telegram \
  -e TELEGRAM_API_ID=123456 \
  -e TELEGRAM_API_HASH=abc... \
  -- npx -y mcp-telegram
[mcp_servers.telegram]
command = "npx"
args = ["-y", "mcp-telegram"]
env = { TELEGRAM_API_ID = "123456", TELEGRAM_API_HASH = "abc..." }

First-time sign in

Ask your agent:

Sign in to my Telegram.

The agent calls the login tool. A browser tab opens. Enter your phone number, the SMS code, and 2FA password if you have one. The tab shows a green checkmark — you can close it. The session is now stored locally and the agent can read your Telegram.

To add another account, ask the agent to call login again.

Tools

102 tools covering the full Telegram user-account surface. Common ones below; the rest are grouped under collapsibles. Every tool accepts an optional accountId (omit when only one account is signed in). peer accepts a numeric chat id, an @username, or the literal "me" (Saved Messages).

Top of the menu:

Tool

What it does

login

Open the browser-based sign-in flow. Adds an account.

list_accounts

List signed-in accounts.

list_dialogs

List dialogs/chats/channels. Filters: unread, archived, ignorePinned, folder, limit.

list_messages

List messages in a dialog. Newest first.

search_messages

Search inside one dialog: query, filter (photos/videos/url/voice/...), fromUser, date range.

search_global

Search across every chat you have.

search_dialogs

Find dialogs by name/title/username substring.

send_message

Send text. Supports replyTo, topMsgId, parseMode, schedule, silent.

send_file

Send a file (local path or https:// URL). Pass an array for an album.

download_media

Save the media on a message to disk.

transcribe_message

Transcribe a voice/video note (Premium).

invoke_mtproto

Call any raw MTProto method by name. Auto-resolves peer/channel/user strings.

These are local-only: they manage which Telegram sessions live in ~/.telegram-agent/ and the settings UI. No Telegram API call beyond the sign-in flow itself.

Tool

What it does

list_accounts

List signed-in accounts.

login

Browser-based sign-in. Adds an account.

logout

Drop a local session and revoke it on Telegram.

open_settings

Open the local settings page (tool surface + read-only).

Tool

What it does

get_me

Return the profile of the authenticated user.

update_profile

Change own first/last name and bio.

update_my_username

Set or clear own @username.

set_birthday

Set the account birthday.

set_profile_photo

Upload a new avatar (local path or URL).

Tool

What it does

list_dialogs

List dialogs. Filters: unread, archived, ignorePinned, folder, limit.

search_dialogs

Find dialogs by name/title/username substring.

resolve_username

Resolve @username to a user/channel/chat entity.

list_folders

List custom dialog folders (chat filters).

list_contacts

List contacts.

Tool

What it does

list_messages

List messages in a dialog.

search_messages

Search inside one dialog (text, type filter, sender, date range).

search_global

Search across every chat.

get_message

Fetch one or more messages by id.

get_message_reactions

Get reactions on messages.

mark_as_read

Mark messages read up to an id.

Tool

What it does

send_message

Send text.

edit_message

Edit a previously sent message.

delete_messages

Delete by id (optionally revoke for all).

forward_messages

Forward messages between dialogs.

pin_message / unpin_message

Pin / unpin in a dialog.

send_reaction

Set reactions on a message.

send_message_to_phone

Send to a phone number, auto-creates a temporary contact.

Tool

What it does

send_file

Send a file (path or URL). Albums via array.

download_media

Save a message's media to disk.

download_profile_photo

Save a peer's avatar to disk.

transcribe_message

Transcribe voice/video (Premium).

Tool

What it does

send_poll

Send a poll. Supports quiz, multiple-choice, anonymous, close period.

vote_poll

Cast a vote.

close_poll

Finalize a poll.

get_poll_results

Fetch tally.

Tool

What it does

send_reaction

Set emoji reactions on a message.

get_message_reactions

Read reactions.

set_default_reaction

Set account-wide default.

Tool

What it does

list_stories

Feed of contacts' stories.

get_peer_stories

One peer's stories.

send_story

Post a story (photo or video).

delete_story

Delete own stories.

view_story

Mark stories viewed.

get_story_viewers

List who viewed your story.

Tool

What it does

ban_user

Full ban (optional untilDate).

unban_user

Lift restrictions.

restrict_user

Apply a custom rights mask.

promote_admin

Grant admin rights (with rank).

demote_admin

Strip admin rights.

invite_user

Add users to a channel/supergroup.

kick_participant

Kick from chat/channel.

get_participant

Single participant info.

list_participants

Members with filter (admins/banned/bots/...) and substring search.

delete_user_history

Remove every message by a user.

get_admin_log

Recent admin events with event-type filter.

Tool

What it does

edit_title

Change title (works for channels, supergroups, and basic groups).

edit_about

Change description.

edit_photo

Change avatar (path or URL).

update_username

Set/clear public @username.

check_username

Check availability.

set_slow_mode

Set slow-mode seconds.

toggle_signatures

Author signatures on channel posts.

toggle_pre_history_hidden

Hide history from new members.

toggle_join_request

Require admin approval to join.

leave_channel

Leave a channel/supergroup.

get_channel_info

Extended info (about, counts, linked chat, slow-mode).

get_user_info

Extended user info (bio, common chats).

Tool

What it does

create_channel

New broadcast channel or supergroup (optional forum mode).

delete_channel

Permanently delete.

migrate_chat

Basic group → supergroup.

transfer_ownership

Hand over creator rights (requires 2FA password).

Tool

What it does

create_invite_link

New link with optional expiry, usage cap, join-request gate.

list_invite_links

List active or revoked links.

revoke_invite_link

Revoke a specific link.

list_invite_joiners

List users that joined via a link.

Tool

What it does

list_topics

List forum topics.

create_topic

Create a new topic.

edit_topic

Rename, re-icon, close, hide.

Tool

What it does

save_draft

Save a draft for a dialog.

clear_draft

Drop the draft for a dialog.

list_drafts

List all dialog drafts.

Tool

What it does

mute_peer

Mute a chat (optional untilDate).

unmute_peer

Unmute.

get_notify_settings

Read settings.

set_notify_settings

Update mute, previews, sound, story-mute.

Tool

What it does

create_folder

New folder with include/exclude rules.

edit_folder

Replace folder rules.

delete_folder

Remove a folder.

reorder_folders

Set display order.

Tool

What it does

list_contacts

All contacts.

add_contact

Add a user to contacts.

delete_contact

Remove users from contacts.

search_contacts

Search contacts + global directory.

Tool

What it does

block_user / unblock_user

Block / unblock.

list_blocked

Block list.

get_privacy

Read a privacy key.

set_privacy

Update a privacy key (mode + allow/disallow lists).

Tool

What it does

get_my_stickers

Installed sticker sets.

install_sticker_set

Install by short name.

add_recent_sticker

Pin a sticker to recent.

Tool

What it does

get_my_boosts

List your boost slots.

apply_boost

Apply slots to a channel.

Tool

What it does

get_inline_bot_results

Run an inline bot query.

invoke_mtproto

Call any MTProto method by qualified name (e.g. messages.SendMessage, stories.GetAllStories). String values for peer/channel/user/fromPeer/toPeer/bot/chat are auto-resolved to InputPeer / InputUser.

Gating which tools are exposed

Three env vars, applied in order:

Variable

Effect

MCP_TELEGRAM_READONLY=1

Hide every destructive / mutating tool.

MCP_TELEGRAM_TOOLS=name1,name2,prefix*

Strict allowlist — only these tools register.

MCP_TELEGRAM_DISABLE=name1,prefix*

Blocklist applied after the allowlist.

Examples:

MCP_TELEGRAM_READONLY=1                                    # read-only agent
MCP_TELEGRAM_TOOLS='login,list*,search*,get*'              # discovery-only
MCP_TELEGRAM_DISABLE='delete*,ban*,kick*,create_channel,delete_channel,transfer_ownership,invokeMtproto'  # safer write set

Environment

Variable

Required

Default

Notes

TELEGRAM_API_ID

yes

—

From my.telegram.org/apps. If unset, the auth page prompts for it and saves to state.json.

TELEGRAM_API_HASH

yes

—

Same as above.

TELEGRAM_AGENT_HOME

no

~/.telegram-agent

State + per-account session storage. Legacy MCP_TELEGRAM_HOME still accepted. If only ~/.mcp-telegram exists from a previous install, it's used automatically.

TELEGRAM_AGENT_DOWNLOADS

no

$TELEGRAM_AGENT_HOME/downloads

Where download_media / download_profile_photo save files. Legacy MCP_TELEGRAM_DOWNLOADS still accepted.

MCP_TELEGRAM_READONLY

no

—

Set to 1/true/yes to hide every destructive tool.

MCP_TELEGRAM_TOOLS

no

—

Strict allowlist. Comma-separated tool names; supports prefix* wildcards. If set, anything not matched is hidden.

MCP_TELEGRAM_DISABLE

no

—

Blocklist applied after the allowlist. Same syntax.

LOG_LEVEL

no

info

debug for verbose stderr.

Choosing which tools the agent sees

The three gating vars stack — MCP_TELEGRAM_READONLY → MCP_TELEGRAM_TOOLS → MCP_TELEGRAM_DISABLE.

# Read-only agent — every mutating tool is hidden
MCP_TELEGRAM_READONLY=1

# Discovery-only — only login + the list/search/get tools
MCP_TELEGRAM_TOOLS='login,list*,search*,get*,resolveUsername'

# Allow writes but keep destructive ones away from the agent
MCP_TELEGRAM_DISABLE='delete*,ban*,kick*,create_channel,delete_channel,transfer_ownership,invokeMtproto'

# Specific surface: read + send/edit only
MCP_TELEGRAM_TOOLS='login,list_accounts,list_dialogs,list_messages,search_messages,search_global,send_message,editMessage'

In an MCP client config, drop these into the same env block as TELEGRAM_API_ID/TELEGRAM_API_HASH. To verify, re-open your client — the tools the server advertises are exactly the ones registered after the gates run.

Data layout

~/.telegram-agent/
├── state.json          known accounts (no secrets in here)
└── sessions/
    └── <account_id>/   per-account MTProto session

If a Telegram session is invalidated server-side (logged out from another device, password rotated, etc.), the next tool call returns an error telling the agent to call login to re-authorize.

Development

git clone https://github.com/beautyfree/mcp-telegram
cd mcp-telegram
npm install
echo "TELEGRAM_API_ID=...\nTELEGRAM_API_HASH=..." > .env
npm run dev

Layout:

src/
├── index.ts           bin entry — stdio MCP server, tool registrations
├── telegram.ts        MTProto client + login state machine
├── auth-browser.ts    ephemeral HTTP server that drives the browser flow
├── auth-page.ts       inline HTML for the auth page
├── state.ts           persistent state in ~/.telegram-agent/
└── logger.ts

License

MIT — see LICENSE.


Telegram MCP · MCP Telegram · Telegram MCP server · Telegram for Claude · Telegram for Cursor · Telegram for Claude Code · Telegram for VS Code · Telegram for Codex · Telegram for Cline · Telegram for Windsurf · Telegram for AI agents · Telegram MTProto MCP · Telegram user-account MCP · Telegram automation MCP · Model Context Protocol Telegram · MCP server Telegram · gramjs MCP

Available Tools

111 tools
add_contactAdd a contactC
Idempotent

Add a user to your contacts.

Inputs: user (required), firstName (required), phone, lastName, +2 more.

add_recent_stickerAdd a sticker to recentB
Idempotent

Pin a sticker to the recently used list. Use unsave: true to remove it.

Inputs: accessHash (required), documentId (required), unsave, accountId.

apply_boostApply boost slots to a channelC

Apply one or more boost slots to a channel.

Inputs: peer (required), slots (required), accountId.

ban_userBan a user from a channel/supergroupB
Destructive

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

Inputs: peer (required), user (required), accountId, untilDate.

block_userBlock a userC
Idempotent

Block a user from contacting you.

Inputs: user (required), accountId.

check_usernameCheck if a username is availableA
Read-only

Verify whether a desired channel/supergroup username is free.

Inputs: peer (required), username (required), accountId.

clear_draftClear a draftA
Idempotent

Equivalent to save_draft with an empty text.

Inputs: peer (required), accountId.

close_pollClose an active pollA
Idempotent

Finalize a poll so no further votes are accepted.

Inputs: peer (required), messageId (required), accountId.

create_channelCreate a channel or supergroupB

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

Inputs: title (required), about, forum, accountId, +2 more.

create_folderCreate a dialog folderA

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

Inputs: title (required), excludeRead, includeBots, pinnedPeers, +8 more.

create_topicCreate a forum topicA

Create a new topic in a forum-enabled supergroup.

Inputs: peer (required), title (required), accountId, iconColor, +1 more.

delete_channelDelete a channel or supergroupA
Destructive

Permanently delete the channel. Creator only.

Inputs: peer (required), accountId.

delete_contactDelete contactsC
Destructive

Remove one or more users from the contact book.

Inputs: users (required), accountId.

delete_folderDelete a dialog folderB
Destructive

Remove a folder by id.

Inputs: id (required), accountId.

delete_messagesDelete messagesA
Destructive

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

Inputs: peer (required), messageIds (required), revoke, accountId.

delete_saved_historyDelete a Saved sub-dialog historyA
Destructive

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

Inputs: peer (required), maxId, maxDate, minDate, +1 more.

delete_storyDelete one or more storiesC
Destructive

Remove stories you previously posted.

Inputs: storyIds (required), peer, accountId.

delete_user_historyDelete all messages by a user in a chatA
Destructive

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

Inputs: peer (required), user (required), accountId.

demote_adminStrip admin rightsB
Idempotent

Remove all admin rights from a user.

Inputs: peer (required), user (required), accountId.

download_mediaDownload media from a messageA
Read-only

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

Inputs: peer (required), messageId (required), accountId.

download_profile_photoDownload a profile photoA
Read-only

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

Inputs: peer (required), accountId.

edit_aboutChange the description / about textA
Idempotent

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

Inputs: peer (required), about (required), accountId.

edit_folderEdit a dialog folderC
Idempotent

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

Inputs: id (required), title (required), excludeRead, includeBots, +9 more.

edit_messageEdit a messageB
Idempotent

Edit the text of a previously sent message.

Inputs: peer (required), text (required), messageId (required), accountId, +2 more.

edit_photoChange chat / channel avatarB
Idempotent

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

Inputs: path (required), peer (required), accountId.

edit_titleChange the title of a chat/channelA
Idempotent

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

Inputs: peer (required), title (required), accountId.

edit_topicEdit a forum topicB
Idempotent

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

Inputs: peer (required), topicId (required), title, closed, +3 more.

forward_messagesForward messagesB

Forward messages from one dialog to another.

Inputs: toPeer (required), fromPeer (required), messageIds (required), silent, +2 more.

get_admin_logGet the admin action logA
Read-only

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

Inputs: peer (required), limit, query, events, +1 more.

get_channel_infoGet full channel/supergroup infoA
Read-only

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

Inputs: channel (required), accountId.

get_default_tag_reactionsList default Saved-tag reactionsC
Read-only

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

Inputs: accountId.

get_inline_bot_resultsQuery an inline botB
Read-only

Run an inline bot query (the @bot query form) and return the results.

Inputs: bot (required), query (required), peer, offset, +1 more.

get_meGet current userA
Read-only

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

Inputs: accountId.

get_messageGet message by idA
Read-only

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

Inputs: ids (required), peer (required), accountId.

get_message_reactionsGet reactions on messagesA
Read-only

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

Inputs: peer (required), messageIds (required), accountId.

get_my_boostsGet own boost slotsB
Read-only

Return the current boost slots the user has available across channels.

Inputs: accountId.

get_my_stickersList installed sticker setsB
Read-only

Return the user's installed sticker sets.

Inputs: accountId.

get_notify_settingsGet notification settingsC
Read-only

Return notification settings for a peer.

Inputs: peer (required), accountId.

get_participantGet a single participantA
Read-only

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

Inputs: peer (required), user (required), accountId.

get_peer_storiesGet a peer's storiesB
Read-only

Return active stories posted by one peer.

Inputs: peer (required), accountId.

get_poll_resultsGet poll resultsA
Read-only

Fetch the current vote tally for a poll message.

Inputs: peer (required), messageId (required), accountId.

get_privacyGet a privacy settingA
Read-only

Return current rules for one privacy key.

Inputs: key (required), accountId.

get_saved_dialogsList Saved-Messages sub-dialogsA
Read-only

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

Inputs: limit, accountId, excludePinned.

get_saved_historyList messages in a Saved sub-dialogA
Read-only

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

Inputs: peer (required), limit, offsetId, accountId.

get_saved_reaction_tagsList Saved-Messages reaction tagsA
Read-only

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.

Inputs: peer, accountId.

get_story_viewersList viewers of a storyB
Read-only

Show who has viewed a story you posted.

Inputs: storyId (required), peer, limit, query, +1 more.

get_user_infoGet full user infoB
Read-only

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

Inputs: user (required), accountId.

install_sticker_setInstall a sticker setA
Idempotent

Install a sticker set by its short name (e.g. "AnimatedEmojies").

Inputs: shortName (required), archived, accountId.

invite_userInvite a user to a channel/supergroupB
Idempotent

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

Inputs: peer (required), users (required), accountId.

invoke_mtprotoInvoke a raw MTProto methodA
Destructive

Call any Telegram API method by its qualified name (e.g. messages.SendMessage, channels.GetFullChannel, stories.GetAllStories). String values for fields named peer/channel/user/fromPeer/toPeer/bot/chat are auto-resolved to InputPeer/InputUser. Use this only when no dedicated tool fits — the API surface is huge and there are no per-method safety checks.

Inputs: method (required), params, accountId.

kick_participantKick a participantA
Destructive

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

Inputs: peer (required), user (required), accountId.

leave_channelLeave a channel/supergroupA
Destructive

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

Inputs: peer (required), accountId.

list_accountsList Telegram accountsA
Read-only

Return the Telegram accounts currently signed in on this machine.

Inputs: no named parameters.

list_blockedList blocked usersB
Read-only

List users currently on the block list.

Inputs: limit, accountId.

list_contactsList own contactsB
Read-only

List all users in the contact book.

Inputs: accountId.

list_dialogsList dialogsA
Read-only

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

Inputs: limit, folder, unread, archived, +2 more.

list_draftsList all draftsB
Read-only

Return all dialog drafts the user has across chats.

Inputs: accountId.

list_foldersList custom dialog foldersB
Read-only

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

Inputs: accountId.

list_invite_joinersList users that joined via an invite linkB
Read-only

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

Inputs: peer (required), link, limit, accountId, +1 more.

list_messagesList messagesB
Read-only

List messages in a dialog. Newest first.

Inputs: peer (required), limit, accountId.

list_participantsList participants of a group or channelA
Read-only

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

Inputs: peer (required), limit, filter, search, +1 more.

list_storiesList active stories from contactsB
Read-only

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

Inputs: hidden, accountId.

list_topicsList forum topicsA
Read-only

List topics in a supergroup with forum mode enabled.

Inputs: peer (required), limit, query, accountId.

loginSign in to TelegramA

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.

Inputs: no named parameters.

logoutSign out of TelegramA
Destructive

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

Inputs: accountId (required).

mark_as_readMark dialog as readA
Idempotent

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

Inputs: peer (required), maxId, accountId.

migrate_chatMigrate a basic group to a supergroupA
Destructive

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

Inputs: chatId (required), accountId.

mute_peerMute a peerA
Idempotent

Mute a chat. Without untilDate, mutes forever.

Inputs: peer (required), accountId, untilDate.

open_settingsOpen the mcp-telegram settings pageA

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.

Inputs: no named parameters.

pin_messagePin a messageC
Idempotent

Pin a message in the dialog.

Inputs: peer (required), messageId (required), silent, accountId, +1 more.

promote_adminPromote a user to adminA
Idempotent

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

Inputs: peer (required), user (required), rights (required), rank, +1 more.

reorder_foldersReorder dialog foldersA
Idempotent

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

Inputs: order (required), accountId.

resolve_usernameResolve a Telegram usernameA
Read-only

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

Inputs: username (required), accountId.

restrict_userRestrict a user with a custom rights maskB
Destructive

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

Inputs: peer (required), user (required), rights (required), accountId.

save_draftSave a message draftA
Idempotent

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

Inputs: peer (required), text (required), replyTo, topMsgId, +2 more.

search_contactsSearch contacts and global directoryA
Read-only

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

Inputs: query (required), limit, accountId.

search_dialogsSearch dialogsA
Read-only

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

Inputs: query (required), limit, accountId.

search_globalSearch messages across all dialogsA
Read-only

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

Inputs: query (required), limit, filter, maxDate, +2 more.

search_messagesSearch messages in a dialogA
Read-only

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

Inputs: peer (required), limit, query, filter, +5 more.

search_saved_messagesSearch Saved Messages (with tag filter)A
Read-only

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

Inputs: limit, query, maxDate, minDate, +4 more.

send_fileSend a 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.

Inputs: path (required), peer (required), silent, asPhoto, +5 more.

send_messageSend a messageA

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

Inputs: peer (required), text (required), silent, replyTo, +5 more.

send_message_to_phoneSend a message to a phone numberA

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).

Inputs: text (required), phone (required), silent, lastName, +4 more.

send_pollSend a pollB

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

Inputs: peer (required), answers (required), question (required), quiz, +8 more.

send_reactionReact to a messageA
Idempotent

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

Inputs: peer (required), messageId (required), big, emoji, +3 more.

send_storyPost a storyB

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

Inputs: path (required), peer, period, pinned, +3 more.

set_birthdaySet birthday on profileC
Idempotent

Set the account birthday. Year is optional.

Inputs: day (required), month (required), year, accountId.

set_default_reactionSet the account-wide default reactionC
Idempotent

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

Inputs: emoji, accountId, customEmojiId.

set_notify_settingsUpdate notification settingsC
Idempotent

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

Inputs: peer (required), silent, accountId, muteUntil, +2 more.

set_privacySet a privacy settingA
Idempotent

Replace the privacy rules for a key. mode chooses the base policy; allowUsers/disallowUsers add user-id exceptions.

Inputs: key (required), mode (required), accountId, allowUsers, +1 more.

set_profile_photoSet own profile photoB
Idempotent

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

Inputs: path (required), accountId.

set_slow_modeSet slow-mode delayA
Idempotent

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

Inputs: peer (required), seconds (required), accountId.

toggle_join_requestToggle join-request requirementA
Idempotent

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

Inputs: peer (required), enabled (required), accountId.

toggle_pre_history_hiddenHide / show history for new membersA
Idempotent

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

Inputs: peer (required), enabled (required), accountId.

toggle_saved_dialog_pinPin or unpin a Saved sub-dialogA

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

Inputs: peer (required), pinned, accountId.

toggle_signaturesToggle author signatures on channel postsC
Idempotent

Broadcast channels only.

Inputs: peer (required), enabled (required), accountId.

transcribe_messageTranscribe a voice/video messageA
Read-only

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.

Inputs: peer (required), messageId (required), accountId.

transfer_ownershipTransfer channel ownershipA
Destructive

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

Inputs: peer (required), newOwner (required), password (required), accountId.

unban_userLift a ban / restrictionB
Idempotent

Remove all restrictions for a user.

Inputs: peer (required), user (required), accountId.

unblock_userUnblock a userB
Idempotent

Lift a previous block.

Inputs: user (required), accountId.

unmute_peerUnmute a peerB
Idempotent

Clear a mute on a chat.

Inputs: peer (required), accountId.

unpin_messageUnpin a messageA
Idempotent

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

Inputs: peer (required), accountId, messageId.

update_my_usernameUpdate own @usernameA
Idempotent

Set or clear (empty string) own public username.

Inputs: username (required), accountId.

update_profileUpdate own profile (name, bio)A
Idempotent

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

Inputs: about, lastName, accountId, firstName.

update_saved_reaction_tagRename a Saved-Messages reaction tagA

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

Inputs: emoji, title, accountId, customEmojiId.

update_usernameSet / change channel public @usernameA
Idempotent

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

Inputs: peer (required), username (required), accountId.

view_storyMark stories as viewedC
Idempotent

Increment view counters for the given stories.

Inputs: peer (required), storyIds (required), accountId.

vote_pollVote in a pollC

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

Inputs: peer (required), messageId (required), answerIndexes (required), accountId.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.4/5.0

    Scored across 111 tools

    Disambiguation4/5

    Each tool targets a distinct resource and action, with specific names like send_story vs send_file. Some overlap exists between similar admin tools (ban_user vs restrict_user vs kick_participant), but descriptions clarify the differences. Overall, the boundaries are clear.

    Naming Consistency5/5

    All tools use snake_case with a consistent verb_noun pattern (list, send, get, create, delete, edit, toggle). There are no mixed conventions or camelCase. Some verbs like 'get' vs 'list' are used interchangeably, but the pattern is uniform.

    Tool Count1/5

    111 tools is far beyond the 15-tool sweet spot and in the extreme range. Even for a comprehensive Telegram client, this is an overwhelming surface that likely requires heavy filtering to be usable.

    Completeness5/5

    The tool set covers nearly every major Telegram feature: messaging, media, stories, admin, channels, folders, contacts, privacy, stickers, and more. The raw invoke_mtproto fallback fills any gaps, making the surface effectively complete.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      An MCP server that enables interaction with Telegram to send, read, and search messages across chats and dialogs. It supports waiting for incoming messages and retrieving conversation history through natural language commands.
      31 npm
      3
      MIT
    • F
      license
      Not graded
      quality
      D
      maintenance
      Enables AI agents to control a real Telegram user account via MTProto, allowing message sending, chat reading/searching, and message management through MCP tools.
      34 npm
      -
    • F
      license
      Not graded
      quality
      D
      maintenance
      MCP server that gives LLMs access to Telegram Bot API, enabling them to read recent messages and reply to users via persistent local storage and MCP tools.
      -
    • A
      license
      Not graded
      quality
      D
      maintenance
      An MCP server that automates a single Telegram user account via the Telegram user API, enabling chat listing, reading/sending messages, searching, and additional actions through natural language.
      10 npm
      MIT

    Appeared in Searches