telegram-mcp

v0.1.2
io.github.jgalea/telegram-mcp Checked 1 day ago Published 5 months ago

Telegram MCP server: read, send, and search messages and manage chats via your account.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

list_chats

List all dialogs (groups, channels, DMs) with unread counts

ParameterTypeDescription
limitintegerMax chats to return (default 50)

get_chat_info

Get details for a specific chat

ParameterTypeDescription
chat_id *integer | stringChat ID or @username

create_group

Create a new group

ParameterTypeDescription
title *string
users *array

create_channel

Create a new channel

ParameterTypeDescription
title *string
aboutstring

archive_chat

Archive or unarchive a chat

ParameterTypeDescription
chat_id *integer | string
archiveboolean

mute_chat

Mute or unmute notifications for a chat

ParameterTypeDescription
chat_id *integer | string
muteboolean

leave_chat

Leave a group or channel (DESTRUCTIVE: requires confirm=true)

ParameterTypeDescription
chat_id *integer | string
confirmbooleanMust be true to execute this destructive action. Without it, returns a warning.

delete_chat

Delete a chat (DESTRUCTIVE: requires confirm=true)

ParameterTypeDescription
chat_id *integer | string
confirmbooleanMust be true to execute this destructive action. Without it, returns a warning.

mark_read

Mark a chat as read. For forum supergroups, pass topic_id (1 for the General topic) to also clear the per-topic unread cursor.

ParameterTypeDescription
chat_id *integer | string
topic_idintegerForum topic root message ID. Pass 1 for the General topic. Required to clear the topic badge in forum supergroups.

read_messages

Get recent messages from a chat. For forum supergroups, pass topic_id to scope to a single topic (use 1 for the General topic).

ParameterTypeDescription
chat_id *integer | string
from_userinteger | string
limitinteger
offset_datestringISO date to read before
topic_idintegerForum topic root message ID. Use 1 for General.

search_messages

Search messages by keyword, optionally in a specific chat or chat type

ParameterTypeDescription
query *string
chat_idinteger | string
chat_typestringFilter search to only this chat type
limitinteger

search_regex

Search cached messages using a regex pattern (runs locally, not against Telegram API)

ParameterTypeDescription
pattern *stringPython regex pattern
afterstringISO datetime — only messages after this time
beforestringISO datetime — only messages before this time
chat_idinteger | stringOptional: search only this chat
limitinteger

get_message

Get a single message by ID

ParameterTypeDescription
chat_id *integer | string
message_id *integer

get_message_replies

Get replies/thread for a message

ParameterTypeDescription
chat_id *integer | string
message_id *integer
limitinteger

get_scheduled_messages

List scheduled messages in a chat

ParameterTypeDescription
chat_id *integer | string

send_message

Send a message to a chat. For forum supergroups, pass topic_id to post into a specific topic (1 for the General topic). Combine with reply_to to reply to a specific message within that topic.

ParameterTypeDescription
chat_id *integer | string
text *string
parse_modestringMessage formatting: 'md' for Markdown, 'html' for HTML
reply_tointegerReply to a specific message ID.
topic_idintegerForum topic root message ID. Use 1 for General. Required to target a specific topic in a forum supergroup.

edit_message

Edit a sent message

ParameterTypeDescription
chat_id *integer | string
message_id *integer
text *string
parse_modestringMessage formatting: 'md' for Markdown, 'html' for HTML

delete_message

Delete messages (DESTRUCTIVE: requires confirm=true)

ParameterTypeDescription
chat_id *integer | string
message_ids *array
confirmbooleanMust be true to execute this destructive action. Without it, returns a warning.

forward_message

Forward messages to another chat (DESTRUCTIVE: requires confirm=true)

ParameterTypeDescription
from_chat *integer | string
message_ids *array
to_chat *integer | string
confirmbooleanMust be true to execute this destructive action. Without it, returns a warning.

schedule_message

Send a message at a future time

ParameterTypeDescription
chat_id *integer | string
schedule_date *stringISO datetime
text *string
reply_tointeger

send_reaction

React to a message with an emoji

ParameterTypeDescription
chat_id *integer | string
emoji *string
message_id *integer

pin_message

Pin a message in a chat

ParameterTypeDescription
chat_id *integer | string
message_id *integer

unpin_message

Unpin a message in a chat

ParameterTypeDescription
chat_id *integer | string
message_id *integer

download_media

Download a photo, video, or document from a message

ParameterTypeDescription
chat_id *integer | string
message_id *integer

download_chat_media

Download media files (photos, documents) from a chat in bulk

ParameterTypeDescription
chat_id *integer | stringChat to download from
limitintegerMax files to download (max 200)
media_typestringType of media to download
output_dirstringOutput directory (defaults to ~/.telegram-mcp/downloads/)

send_file

Send a file or photo to a chat. For forum supergroups, pass topic_id to post into a specific topic (1 for the General topic). Combine with reply_to to reply to a specific message within that topic.

ParameterTypeDescription
chat_id *integer | string
file_path *string
captionstring
reply_tointegerReply to a specific message ID.
topic_idintegerForum topic root message ID. Use 1 for General. Required to target a specific topic in a forum supergroup.

send_voice

Send a voice message

ParameterTypeDescription
chat_id *integer | string
file_path *string

send_location

Send a location

ParameterTypeDescription
chat_id *integer | string
lat *number
lon *number

get_sticker_sets

List available sticker packs

list_contacts

List all contacts

get_contact

Get contact details

ParameterTypeDescription
user_id *integer | string

get_user

Get user profile info

ParameterTypeDescription
user_id *integer | string

block_user

Block a user (DESTRUCTIVE: requires confirm=true)

ParameterTypeDescription
user_id *integer | string
confirmbooleanMust be true to execute this destructive action. Without it, returns a warning.

unblock_user

Unblock a user

ParameterTypeDescription
user_id *integer | string

get_participants

List members of a group or channel

ParameterTypeDescription
chat_id *integer | string
limitinteger

add_participant

Add a user to a group or channel

ParameterTypeDescription
chat_id *integer | string
user_id *integer | string

remove_participant

Remove a user from a group or channel (DESTRUCTIVE: requires confirm=true)

ParameterTypeDescription
chat_id *integer | string
user_id *integer | string
confirmbooleanMust be true to execute this destructive action. Without it, returns a warning.

set_chat_title

Change a chat's title

ParameterTypeDescription
chat_id *integer | string
title *string

set_chat_description

Change a chat's description

ParameterTypeDescription
chat_id *integer | string
description *string

set_chat_photo

Change a chat's photo

ParameterTypeDescription
chat_id *integer | string
file_path *string

list_forum_topics

List topics in a forum supergroup (e.g. GLC). Returns id, title, unread_count, and flags per topic. The General topic is always id 1.

ParameterTypeDescription
chat_id *integer | string
limitintegerMax topics (cap 100)
querystringOptional title substring filter.

get_admin_log

Get admin action history for a group or channel

ParameterTypeDescription
chat_id *integer | string
limitinteger

get_me

Get current account info

get_status

Get connection status and session health

get_dialogs_stats

Get unread counts and chat activity summary

export_chat

Export messages from a chat as JSON (max 1000 per call)

ParameterTypeDescription
chat_id *integer | string
limitinteger

clear_cache

Wipe the local message cache

sync_messages

Sync messages from all chats (or a specific chat) into the local SQLite cache for fast offline search and analytics

ParameterTypeDescription
chat_idinteger | stringOptional: sync only this chat. Omit to sync all.
limitintegerMax messages per chat (default 1000, max 5000)
max_chatsintegerMax chats to sync when syncing all (default 50)

get_new_messages

Get messages newer than a timestamp (polling pattern for real-time awareness)

ParameterTypeDescription
since *stringISO datetime — only return messages after this time
chat_idinteger | stringOptional: scope to a specific chat
limitinteger

chat_analytics

Get analytics from cached messages: top senders by message count

ParameterTypeDescription
afterstringISO datetime — only count messages after this time
beforestringISO datetime — only count messages before this time
chat_idinteger | stringOptional: scope to a specific chat
limitintegerMax senders to return

message_timeline

Get message counts grouped by time period (hour or day) from the local cache

ParameterTypeDescription
afterstringISO datetime — only messages after this time
beforestringISO datetime — only messages before this time
chat_idinteger | stringOptional: scope to a specific chat
granularitystringGroup by hour or day (default: day)

today_messages

Get all messages from today (UTC) from the local cache

ParameterTypeDescription
chat_idinteger | stringOptional: scope to a specific chat
limitintegerMax messages to return

export_cached_messages

Export messages from the local cache as JSON or CSV, with optional filters

ParameterTypeDescription
afterstringISO datetime — only messages after this time
beforestringISO datetime — only messages before this time
chat_idinteger | stringOptional: export only this chat
formatstringExport format (default: json)
limitinteger