Telegram Bot MCP Server
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| TELEGRAM_BOT_TOKEN | Yes | Your Telegram bot token obtained from @BotFather |
Capabilities
Features and capabilities supported by this server
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
| experimental | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| telegram_publish_messageA | Publish a message to a Telegram channel. Use this tool to post new messages to a Telegram channel where the bot is an admin. The bot must have permission to post messages in the channel. Args: channel_id: Channel username (e.g., '@mychannel') or numeric chat ID (e.g., '-1001234567890'). Use '@' prefix for public channels with username. text: The message text to publish. Supports Markdown or HTML formatting based on parse_mode. parse_mode: Text formatting mode. Options: 'Markdown', 'HTML', or 'None' for plain text. Default is 'Markdown'. disable_web_page_preview: If True, disables link preview for URLs in the message. Default is False. disable_notification: If True, sends the message silently (no notification to users). Default is False. response_format: Response format. Options: 'json' for structured data, 'markdown' for human-readable text. Default is 'markdown'. Returns: A dictionary containing message_id, chat_id, date, text, and link. If response_format='markdown', returns formatted text content. |
| telegram_publish_photoA | Publish a photo to a Telegram channel with an optional caption. Use this tool to post photos to a Telegram channel where the bot is an admin. The photo can include a text caption with formatting. The bot must have permission to post messages in the channel. Args: channel_id: Channel username (e.g., '@mychannel') or numeric chat ID. photo: Photo to send. Can be: - File path to a local image file (e.g., '/path/to/image.jpg') - URL to a remote image (e.g., 'https://example.com/image.png') - Telegram file_id of a photo that exists on Telegram servers caption: Optional text caption for the photo. Supports Markdown or HTML formatting based on parse_mode. Maximum 1024 characters. parse_mode: Caption formatting mode. Options: 'Markdown', 'HTML', or 'None' for plain text. Default is 'Markdown'. disable_notification: If True, sends the photo silently (no notification to users). Default is False. response_format: Response format. Options: 'json' for structured data, 'markdown' for human-readable text. Default is 'markdown'. Returns: A dictionary containing message_id, chat_id, date, caption, photo info, and link. If response_format='markdown', returns formatted text content. |
| telegram_publish_photo_albumA | Publish multiple photos as an album (media group) to a Telegram channel. Use this tool to post 2-10 photos in a single message as an album/gallery. Users can swipe through the photos. Each photo can have its own caption. The bot must have permission to post messages in the channel. Args: channel_id: Channel username (e.g., '@mychannel') or numeric chat ID. photos: List of photo objects (2-10 items). Each photo object must contain: - photo (required): Photo to send. Can be: - File path to a local image file (e.g., '/path/to/image.jpg') - URL to a remote image (e.g., 'https://example.com/image.png') - Telegram file_id of a photo that exists on Telegram servers - caption (optional): Text caption for this specific photo. Maximum 1024 characters. - parse_mode (optional): Caption formatting mode ('Markdown', 'HTML', or 'None'). Default is 'Markdown' if not specified. disable_notification: If True, sends the album silently (no notification to users). Default is False. response_format: Response format. Options: 'json' for structured data, 'markdown' for human-readable text. Default is 'markdown'. Returns: A dictionary containing: - album_id: Unique identifier for the media group - message_count: Number of photos in the album - messages: List of message details for each photo (message_id, caption, photo info, link) - first_message_id: ID of the first message in the album - chat_id: Channel chat ID If response_format='markdown', returns formatted text content. Example: photos = [ { "photo": "https://example.com/photo1.jpg", "caption": "First photo caption", "parse_mode": "Markdown" }, { "photo": "/path/to/photo2.jpg", "caption": "Second photo caption" }, { "photo": "AgACAgIAAxkBAAIC...", # Telegram file_id "caption": "Third photo" } ] |
| telegram_edit_messageA | Edit an existing TEXT message in a Telegram channel. Use this tool to modify the content of a previously published TEXT message. IMPORTANT: This only works for text messages. If the message contains a photo, use edit_message_caption instead. The bot must be the original sender of the message and have edit permissions. Args: channel_id: Channel username (e.g., '@mychannel') or numeric chat ID. Must be the same channel where the original message was sent. message_id: The unique identifier of the message to edit. This is returned when you publish a message. new_text: The new text to replace the existing message content. Supports formatting based on parse_mode. parse_mode: Text formatting mode. Options: 'Markdown', 'HTML', or 'None'. Default is 'Markdown'. response_format: Response format. Options: 'json' for structured data, 'markdown' for human-readable text. Default is 'markdown'. Returns: A dictionary containing message_id, chat_id, date, edit_date, text, and link. If response_format='markdown', returns formatted text content. |
| telegram_edit_message_captionA | Edit the caption of an existing photo message in a Telegram channel. Use this tool to modify the caption text of a previously published photo message. This only works for messages that contain media (photos, videos, etc.). You cannot change the photo itself, only the caption text. The bot must be the original sender of the message and have edit permissions. Args: channel_id: Channel username (e.g., '@mychannel') or numeric chat ID. Must be the same channel where the original message was sent. message_id: The unique identifier of the photo message to edit. This is returned when you publish a photo. new_caption: The new caption text to replace the existing caption. Supports formatting based on parse_mode. Maximum 1024 characters. parse_mode: Caption formatting mode. Options: 'Markdown', 'HTML', or 'None'. Default is 'Markdown'. response_format: Response format. Options: 'json' for structured data, 'markdown' for human-readable text. Default is 'markdown'. Returns: A dictionary containing message_id, chat_id, date, edit_date, caption, photo info, and link. If response_format='markdown', returns formatted text content. |
| telegram_delete_messageA | Delete a message from a Telegram channel. Use this tool to permanently remove a message from a channel. The bot must have delete message permissions in the channel. Args: channel_id: Channel username (e.g., '@mychannel') or numeric chat ID. message_id: The unique identifier of the message to delete. response_format: Response format. Options: 'json' for structured data, 'markdown' for human-readable text. Default is 'markdown'. Returns: A dictionary containing success status, message_id, and operation status. If response_format='markdown', returns formatted text content. |
| telegram_search_messagesA | Search for messages in a Telegram channel (from local cache ONLY). ⚠️ CRITICAL LIMITATIONS - READ CAREFULLY:
Args: channel_id: Channel username (e.g., '@mychannel') or numeric chat ID to search in. query: Search query string. Performs case-insensitive search in message text/caption. If None or empty, returns all cached messages for the channel. limit: Maximum number of results to return. Default is 10. Results are sorted by date (newest first). offset: Number of results to skip. Use for pagination. Default is 0. response_format: Response format. Options: 'json' for structured data, 'markdown' for human-readable text. Default is 'markdown'. Returns: A dictionary containing: - messages: List of matching messages (may be empty if nothing cached) - count: Number of messages returned in this page - total: Total number of matching messages in cache - offset: Current offset value - limit: Current limit value - has_more: Boolean indicating if more results are available - next_offset: Offset value for the next page (if has_more is True) - query: The search query used - channel_id: The channel searched - status: Operation status If response_format='markdown', returns formatted text content. Note: If you need to work with older messages, you must keep track of message_id values returned when publishing. There is no way to retrieve message_id for historical messages through the Telegram Bot API. |
| telegram_get_channel_infoA | Get detailed information about a Telegram channel. Use this tool to retrieve metadata and statistics about a channel where the bot is a member or admin. Args: channel_id: Channel username (e.g., '@mychannel') or numeric chat ID. response_format: Response format. Options: 'json' for structured data, 'markdown' for human-readable text. Default is 'markdown'. Returns: A dictionary containing id, title, username, type, description, invite_link, and member_count. If response_format='markdown', returns formatted text content. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
| telegram_bot_instructions | Comprehensive instructions for using the Telegram Bot MCP server. This prompt provides AI assistants with detailed guidance on how to effectively use the Telegram Bot MCP server tools to interact with Telegram channels. |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
| get_server_info | Get server version and capability information. This resource provides metadata about the Telegram Bot MCP server, including version, capabilities, and configuration details. |
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/aggeentik/telegram-bot-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server