Telegram MCP
Telegram MCP server maintained in Jiyuu. Reads and manages chats, messages, contacts, folders, and media through your Telegram user account.
Maintained by Unique Divine
Install
Needs Python >= 3.10. The commands run the latest release. This page lists the tools in version 2.0.5.
Each snippet has a <NAME> placeholder for every credential or required variable. Replace them with your own values in your client config, and drop optional ones you don't use. To get the credentials, see the Telegram MCP sign-in instructions ↗ .
Claude Code
claude mcp add telegram -e 'TELEGRAM_API_ID=<TELEGRAM_API_ID>' -e 'TELEGRAM_API_HASH=<TELEGRAM_API_HASH>' -e 'TELEGRAM_SESSION_STRING=<TELEGRAM_SESSION_STRING>' -- uvx uniquedivine-telegram-mcp@latest Codex
Add this entry to file ~/.codex/config.toml:
[mcp_servers.telegram]
command = "uvx"
args = ["uniquedivine-telegram-mcp@latest"]
env = { TELEGRAM_API_ID = "<TELEGRAM_API_ID>", TELEGRAM_API_HASH = "<TELEGRAM_API_HASH>", TELEGRAM_SESSION_STRING = "<TELEGRAM_SESSION_STRING>" }
Cursor
Add this entry to file ~/.cursor/mcp.json, or to file .cursor/mcp.json in a project:
{
"mcpServers": {
"telegram": {
"command": "uvx",
"args": [
"uniquedivine-telegram-mcp@latest"
],
"env": {
"TELEGRAM_API_ID": "<TELEGRAM_API_ID>",
"TELEGRAM_API_HASH": "<TELEGRAM_API_HASH>",
"TELEGRAM_SESSION_STRING": "<TELEGRAM_SESSION_STRING>"
}
}
}
}
Environment Variables
Names only. Set values in your shell or your client's server entry, never in a prompt.
| Name | Required | Secret | Notes |
|---|---|---|---|
TELEGRAM_API_ID | Yes | Yes | |
TELEGRAM_API_HASH | Yes | Yes | |
TELEGRAM_SESSION_STRING | No | Yes | Set this or TELEGRAM_SESSION_NAME. For several accounts, set TELEGRAM_SESSION_STRING_<LABEL> or TELEGRAM_SESSION_NAME_<LABEL> per account instead. |
TELEGRAM_SESSION_NAME | No | No | Name of a local session file, used instead of TELEGRAM_SESSION_STRING. The session file itself is a credential. |
TELEGRAM_EXPOSED_TOOLS | No | No | |
JIYUU_MCP_NO_UPDATE_CHECK | No | No |
Safety
- 50 of 117 tools only read. The other 67 can change state under your account or bot.
- 65 tools are marked destructive. They show as destructive in the table; keep your client's approval prompt on for them.
- To learn the version, where the server runs from, or whether an update exists, use the
mcp_infotool. Never have an agent read MCP client config files for this; they hold secrets.
Tools
117 tools. Tools tagged read change nothing.
| Tool | Access | Description | Parameters |
|---|---|---|---|
list_accounts List Accounts | read | List all configured Telegram accounts with profile info. | None |
list_contacts List Contacts | read | List all contacts in your Telegram account. | account |
search_contacts Search Contacts | read | Search for contacts by name, username, or phone number using Telethon's SearchRequest. | query*, account |
get_contact_ids Get Contact Ids | read | Get all contact IDs in your Telegram account. | account |
get_direct_chat_by_contact Get Direct Chat By Contact | read | Find a direct chat with a specific contact by name, username, or phone. | contact_query*, account |
get_contact_chats Get Contact Chats | read | List all chats involving a specific contact. | contact_id*, account |
get_last_interaction Get Last Interaction | read | Get the most recent message with a contact. | contact_id*, account |
add_contact Add Contact | destructive | Add a new contact to your Telegram account. | account, phone, first_name, last_name, username |
delete_contact Delete Contact | destructive | Delete a contact by user ID. | user_id*, account |
block_user Block User | destructive | Block a user by user ID. | user_id*, account |
unblock_user Unblock User | destructive | Unblock a user by user ID. | user_id*, account |
import_contacts Import Contacts | destructive | Import a list of contacts. Each contact should be a dict with phone, first_name, last_name. | contacts*, account |
export_contacts Export Contacts | read | Export all contacts as a JSON string. | account |
get_blocked_users Get Blocked Users | read | Get a list of blocked users. | account |
send_contact Send Contact | destructive | Send a contact to a chat. | chat_id*, phone_number*, first_name*, last_name, vcard, account |
get_chats Get Chats | read | Get a paginated list of chats, including their latest message ID and date. | account, page, page_size |
subscribe_public_channel Subscribe Public Channel | destructive | Subscribe (join) to a public channel or supergroup by username or ID. | channel*, account |
list_topics List Topics | read | Retrieve forum topics from a supergroup with the forum feature enabled. | chat_id*, limit, offset_topic, search_query, account |
enable_forum_topics Enable Forum Topics | destructive | Enable Telegram forum topics for a supergroup. | chat_id*, tabs, account |
create_forum_topic Create Forum Topic | destructive | Create a Telegram forum topic in a forum-enabled supergroup. | chat_id*, title*, icon_color, icon_emoji_id, account |
list_chats List Chats | read | List available chats with metadata. | chat_type, limit, unread_only, unmuted_only, archived, with_about, account |
get_chat Get Chat | read | Get detailed information about a specific chat. | chat_id*, account |
search_public_chats Search Public Chats | read | Search for public chats, channels, or bots by username or title. | query*, limit, account |
resolve_username Resolve Username | read | Resolve a username to a user or chat ID. | username*, account |
get_full_chat Get Full Chat | read | Get full info of a channel or group including description/about text. | chat_id*, account |
mute_chat Mute Chat | destructive | Mute notifications for a chat. | chat_id*, account |
unmute_chat Unmute Chat | destructive | Unmute notifications for a chat. | chat_id*, account |
archive_chat Archive Chat | destructive | Archive a chat. | chat_id*, account |
unarchive_chat Unarchive Chat | destructive | Unarchive a chat. | chat_id*, account |
get_common_chats Get Common Chats | read | List chats shared with a specific user. | user_id*, limit, max_id, account |
get_message_read_by Get Message Read By | read | List user IDs who have read a specific message. | chat_id*, message_id*, account |
get_message_link Get Message Link | read | Export a t.me/... link for a specific message. | chat_id*, message_id*, thread, account |
get_messages Get Messages | read | Get paginated messages from a specific chat. | chat_id*, page, page_size, account |
send_message Send Message | destructive | Send a message to a specific chat. | chat_id*, message*, parse_mode, account |
send_scheduled_message Send Scheduled Message | destructive | Schedule a message to be sent at a future time. | chat_id*, message*, schedule_date*, account |
get_scheduled_messages Get Scheduled Messages | read | List all scheduled (pending) messages in a chat. | chat_id*, account |
delete_scheduled_message Delete Scheduled Message | destructive | Delete one or more scheduled (pending) messages from a chat. | chat_id*, message_ids*, account |
list_inline_buttons List Inline Buttons | read | Inspect inline buttons on a recent message to discover their indices/text/URLs. | chat_id*, message_id, limit, account |
press_inline_button Press Inline Button | destructive | Press an inline button (callback) in a chat message. | chat_id*, message_id, button_text, button_index, account |
list_messages List Messages | read | Retrieve messages with optional filters. | chat_id*, limit, search_query, from_date, to_date, account |
get_message_context Get Message Context | read | Retrieve context around a specific message. | chat_id*, message_id*, context_size, account |
forward_message Forward Message | destructive | Forward a message (or several) from a source chat to a destination chat. | from_chat_id*, message_id*, to_chat_id*, account, expand_album |
forward_messages Forward Messages (batch) | destructive | Forward a BATCH of messages from a source chat to a destination chat in a single atomic call. | from_chat_id*, message_ids*, to_chat_id*, account |
edit_message Edit Message | destructive | Edit a message you sent. | chat_id*, message_id*, new_text*, account |
delete_message Delete Message | destructive | Delete a message by ID. | chat_id*, message_id*, account |
delete_chat_history Delete Chat History | destructive | Clear the full message history of a chat. | chat_id*, max_id, revoke, account |
delete_messages_bulk Delete Messages Bulk | destructive | Delete multiple messages in a single call. | chat_id*, message_ids*, revoke, account |
pin_message Pin Message | destructive | Pin a message in a chat. | chat_id*, message_id*, account |
unpin_message Unpin Message | destructive | Unpin a message in a chat. | chat_id*, message_id*, account |
unpin_all_messages Unpin All Messages | destructive | Unpin all pinned messages in a chat. | chat_id*, account |
mark_as_read Mark As Read | destructive | Mark all messages as read in a chat. | chat_id*, account |
reply_to_message Reply To Message | destructive | Reply to a specific message in a chat. | chat_id*, message_id*, text*, parse_mode, account |
search_messages Search Messages | read | Search for messages in a chat by text. | chat_id*, query*, limit, account |
search_global Search Global Messages | read | Search for messages across all public chats and channels by text content. | query*, page, page_size, account |
get_history Get History | read | Get full chat history (up to limit). | chat_id*, limit, account |
get_pinned_messages Get Pinned Messages | read | Get all pinned messages in a chat. | chat_id*, account |
create_poll Create Poll | destructive | Create a poll in a chat using Telegram's native poll feature. | chat_id*, question*, options*, multiple_choice, quiz_mode, public_votes, close_date, account |
send_reaction Send Reaction | write | Send a reaction to a message. | chat_id*, message_id*, emoji*, big, account |
remove_reaction Remove Reaction | destructive | Remove your reaction from a message. | chat_id*, message_id*, account |
get_message_reactions Get Message Reactions | read | Get the list of reactions on a message. | chat_id*, message_id*, limit, account |
save_draft Save Draft | write | Save a draft message to a chat or channel. The draft will appear in the Telegram app's input field when you open that chat, allowing you to review and send it manually. | chat_id*, message*, reply_to_msg_id, no_webpage, account |
get_drafts Get Drafts | read | Get all draft messages across all chats. Returns a list of drafts with their chat info and message content. | account |
clear_draft Clear Draft | destructive | Clear/delete a draft from a specific chat. | chat_id*, account |
create_group Create Group | destructive | Create a new group or supergroup and add users. | title*, user_ids*, account |
invite_to_group Invite To Group | destructive | Invite users to a group or channel. | group_id*, user_ids*, history_messages, account |
leave_chat Leave Chat | destructive | Leave a group or channel by chat ID. | chat_id*, account |
get_participants Get Participants | read | List participants in a group or channel with pagination. | chat_id*, page, page_size, account |
create_channel Create Channel | destructive | Create a new channel or supergroup. | title*, about, megagroup, account |
edit_chat_title Edit Chat Title | destructive | Edit the title of a chat, group, or channel. | chat_id*, title*, account |
edit_chat_photo Edit Chat Photo | destructive | Edit the photo of a chat, group, or channel. Requires a file path to an image. | chat_id*, file_path*, account |
edit_chat_about Edit Chat About | destructive | Edit the description ("About") of a chat, group, or channel. | chat_id*, about*, account |
delete_chat_photo Delete Chat Photo | destructive | Delete the photo of a chat, group, or channel. | chat_id*, account |
promote_admin Promote Admin | destructive | Promote a user to admin in a group/channel. | group_id*, user_id*, rights, account |
demote_admin Demote Admin | destructive | Demote a user from admin in a group/channel. | group_id*, user_id*, account |
ban_user Ban User | destructive | Ban a user from a group or channel. | chat_id*, user_id*, account |
unban_user Unban User | destructive | Unban a user from a group or channel. | chat_id*, user_id*, account |
set_default_chat_permissions Set Default Chat Permissions | destructive | Set default member permissions for a group, supergroup, or channel. | chat_id*, send_messages, send_media, send_stickers, send_gifs, send_games, send_inline, embed_links, send_polls, change_info, invite_users, pin_messages, until_date, account |
toggle_slow_mode Toggle Slow Mode | destructive | Enable or disable slow mode for a supergroup. | chat_id*, seconds, account |
edit_admin_rights Edit Admin Rights | destructive | Set granular admin rights for a user in a supergroup or channel. | chat_id*, user_id*, rank, change_info, post_messages, edit_messages, delete_messages, ban_users, invite_users, pin_messages, add_admins, anonymous, manage_call, manage_topics, other, account |
get_admins Get Admins | read | Get all admins in a group or channel. | chat_id*, account |
get_banned_users Get Banned Users | read | Get all banned users in a group or channel. | chat_id*, account |
get_invite_link Get Invite Link | read | Get the invite link for a group or channel. | chat_id*, account |
join_chat_by_link Join Chat By Link | destructive | Join a chat by invite link. | link*, account |
export_chat_invite Export Chat Invite | read | Export a chat invite link. | chat_id*, account |
import_chat_invite Import Chat Invite | destructive | Import a chat invite by hash. | hash*, account |
get_recent_actions Get Recent Actions | read | Get recent admin actions (admin log) in a group or channel. | chat_id*, account |
send_file Send File | destructive | Send a file to a chat. | chat_id*, file_path*, caption, account |
send_album Send Album | destructive | Send multiple photos/videos as one Telegram media group (album). | chat_id*, file_paths*, caption, account |
download_media Download Media | destructive | Download media from a message in a chat. | chat_id*, message_id*, file_path, account |
send_voice Send Voice | destructive | Send a voice message to a chat. File must be an OGG/OPUS voice note. | chat_id*, file_path*, account |
upload_file Upload File | destructive | Upload a local file to Telegram and return upload metadata. | file_path*, account |
get_media_info Get Media Info | read | Get info about media in a message. | chat_id*, message_id*, account |
get_sticker_sets Get Sticker Sets | read | Get all sticker sets. | account |
send_sticker Send Sticker | destructive | Send a sticker to a chat. File must be a valid .webp sticker file. | chat_id*, file_path*, account |
get_gif_search Get Gif Search | read | Search for GIFs by query. Returns a list of Telegram document IDs (not file paths). | query*, limit, account |
send_gif Send Gif | destructive | Send a GIF document ID from a recent get_gif_search on this account. | chat_id*, gif_id*, account |
get_me Get Me | read | Get your own user information. | account |
update_profile Update Profile | destructive | Update your profile information (name, bio). | account, first_name, last_name, about |
set_profile_photo Set Profile Photo | destructive | Set a new profile photo. | file_path*, account |
delete_profile_photo Delete Profile Photo | destructive | Delete your current profile photo. | account |
get_privacy_settings Get Privacy Settings | read | Get your privacy settings for last seen status. | account |
set_privacy_settings Set Privacy Settings | destructive | Set privacy settings (e.g., last seen, phone, etc.). | key*, allow_users, disallow_users, account |
get_full_user Get Full User | read | Get full profile info of a Telegram user including bio/about text, personal channel link, and other profile details. | username*, account |
get_bot_info Get Bot Info | read | Get information about a bot by username. | bot_username*, account |
set_bot_commands Set Bot Commands | destructive | Set bot commands for a bot you own. | bot_username*, commands*, account |
get_user_photos Get User Photos | read | Get profile photos of a user. | user_id*, limit, account |
get_user_status Get User Status | read | Get the online status of a user. | user_id*, account |
list_folders List Folders | read | Get all dialog folders (filters) with their IDs, names, and emoji. Returns a list of folders that can be used with other folder tools. | account |
get_folder Get Folder | read | Get detailed information about a specific folder including all included chats. | folder_id*, account |
create_folder Create Folder | destructive | Create a new dialog folder. | title*, emoticon, chat_ids, contacts, non_contacts, groups, broadcasts, bots, exclude_muted, exclude_read, exclude_archived, account |
add_chat_to_folder Add Chat to Folder | destructive | Add a chat to an existing folder. | folder_id*, chat_id*, pinned, account |
remove_chat_from_folder Remove Chat from Folder | destructive | Remove a chat from a folder. | folder_id*, chat_id*, account |
delete_folder Delete Folder | destructive | Delete a folder. Chats in the folder are preserved, only the folder is removed. | folder_id*, account |
reorder_folders Reorder Folders | destructive | Change the order of folders in the folder list. | folder_ids*, account |
wait_for_new_message Wait For New Message | read | Block until a new incoming private message from a non-bot user arrives, then return immediately with the list of chats that currently have pending (unprocessed) incoming messages. If nothing arrives within `timeout` seconds, returns {"event": false, "reason": "timeout"}. Lets the agent react to events instead of polling. Does NOT consume the pending set — use wait_for_settled_message to consume a debounced burst. | timeout |
wait_for_settled_message Wait For Settled Message | read | Event-driven, DEBOUNCED wait. Blocks until some private user chat has received one or more incoming messages AND then gone quiet for `settle_ms` — so a client who types several messages (or sends file + text) in a row is delivered as ONE settled burst instead of waking the agent on every message. Returns that chat's burst summary and removes it from the pending set, so the next call returns the next settled chat. If no chat settles within `max_wait_ms`, returns {"event": false, "reason": "timeout"} (caller should simply call again). | settle_ms, max_wait_ms |
mcp_info MCP Info | read | Report this server's version, install provenance and update status. | None |
No matching tools.
* Required parameter.
More MCP Servers by Unique Divine
- npm v1.3.11
Discord MCP
Discord MCP server maintained in Jiyuu. Manages channels, forums, messages, reactions, roles, and webhooks through a Discord bot.
44 tools · 13 read-only · 31 write
Setup, safety, and toolsbunx @uniquedivine/mcp-discord@latest - GitHub Releases v0.14.8
Mori
Query a local code graph for callers, dependencies, and links between repositories.
17 tools · 13 read-only · 4 write
Download the native binary Setup, safety, and tools - npm v4.5.4
Slack MCP
Slack MCP server by Unique Divine. Reads and writes Slack through your browser session.
26 tools · 16 read-only · 10 write
Setup, safety, and toolsbunx @uniquedivine/mcp-slack@latest
Unique Divine