Telegram
The Telegram connector uses the Telegram Bot API to let AI agents receive updates, send messages and media, manage chat pins, and configure webhooks. Unlike OAuth connectors, Telegram authenticates with a Bot Token — paste your token from @BotFather into the API Key field when connecting.
Authentication#
Telegram uses Bot Token authentication. To connect:
- Open Telegram and search for
@BotFather - Send
/newbotand follow the prompts to create a new bot - Copy the bot token provided by BotFather (format:
123456789:ABC-...) - Paste it into the API Key field in MCPGate's connector setup form
Note
Tool reference#
The Telegram connector exposes 10 tools: 3 read, 6 write, and 1 delete. Use the MCP Apps page to enable or disable individual tools per app, and the Guardrails page to add fine-grained rules on top.
| Tool | Category | Description |
|---|---|---|
| telegram_get_updates | read | Get updates (incoming messages and events) for the bot |
| telegram_get_chat | read | Get information about a chat by ID |
| telegram_list_chat_members | read | List members of a chat or group |
| telegram_send_message | write | Send a text message to a chat |
| telegram_send_photo | write | Send a photo to a chat |
| telegram_send_document | write | Send a document/file to a chat |
| telegram_edit_message | write | Edit a previously sent message |
| telegram_pin_message | write | Pin a message in a chat |
| telegram_set_webhook | write | Set the webhook URL for receiving bot updates |
| telegram_delete_message | delete | Delete a message from a chat |
Common guardrail recipes#
Send-only access#
Enable read tools plus telegram_send_message, telegram_send_photo, and telegram_send_document. Deny telegram_edit_message, telegram_pin_message, telegram_set_webhook, and telegram_delete_message. This is the safest configuration for notification bots that should only send — not manage — messages.
Restrict to specific chats#
Apply the allow_values template to all send tools targeting the chat_id field. Provide a list of chat IDs the agent is permitted to message. Requests to any other chat are denied before the API call is made.
Block webhook changes#
Deny telegram_set_webhookin all apps that don't explicitly need to change bot routing. An AI that can modify the webhook URL could redirect bot traffic to an attacker-controlled endpoint.
Troubleshooting#
- Bot cannot send to a private chat — The bot must receive at least one message from the user before it can initiate a conversation. Ask the user to send
/startto the bot first. - get_updates returns empty — If a webhook is configured,
telegram_get_updateswill not receive updates (Telegram sends them to the webhook URL instead). Usetelegram_set_webhookwith an empty URL to disable the webhook and switch back to polling. - Photo or document fails —
telegram_send_photoandtelegram_send_documentaccept either a public URL or a base64-encoded file. Ensure the URL is publicly accessible from Telegram's servers.