Docsmcp
Telegram MCP Server
Send messages and documents via Telegram Bot API from workflows
The Telegram MCP server lets your workflows send text messages, documents, and formatted reports through a Telegram bot.
Setup
1. Create a Bot
- Open Telegram and search for @BotFather.
- Send
/newbotand follow the prompts to name your bot. - BotFather will reply with a bot token (looks like
123456:ABC-DEF1234ghIkl-zyx57W2v1u123ew11). - Copy this token.
2. Get Your Chat ID
To find the chat ID where the bot should send messages:
- Send any message to your new bot in Telegram.
- Open this URL in a browser (replace
YOUR_BOT_TOKENwith the actual token):https://api.telegram.org/botYOUR_BOT_TOKEN/getUpdates - Look for
"chat":{"id":in the JSON response. That number is your chat ID.
For group chats, add the bot to the group first, then send a message in the group and check /getUpdates again. Group chat IDs are negative numbers.
3. Add to FlowTrux
- Go to Settings > MCP Servers > Add Server.
- Select Telegram.
- Paste the Bot Token.
- Enter the Chat ID (this becomes the default recipient).
- Click Save.
Tools
send_message
Send a text message to a Telegram chat.
| Parameter | Type | Required | Description |
|---|---|---|---|
text | string | Yes | Message text (supports Markdown and HTML) |
chat_id | string | No | Recipient chat ID (defaults to configured Chat ID) |
parse_mode | string | No | Markdown, MarkdownV2, or HTML (default: HTML) |
disable_notification | boolean | No | Send silently without notification sound |
send_document
Send a document or file via URL.
| Parameter | Type | Required | Description |
|---|---|---|---|
document_url | string | Yes | URL of the document to send |
chat_id | string | No | Recipient chat ID |
caption | string | No | Caption for the document |
filename | string | No | Custom filename |
send_formatted_report
Send a styled report with key-value metrics.
| Parameter | Type | Required | Description |
|---|---|---|---|
title | string | Yes | Report title |
metrics | object | Yes | Key-value pairs of metrics to display |
chat_id | string | No | Recipient chat ID |
summary | string | No | Additional summary text (sent as a separate message if provided) |
Long summaries are automatically split into multiple messages to respect Telegram's 4096-character limit.
get_updates
Get recent messages and updates from the bot. Useful for testing the connection.
| Parameter | Type | Required | Description |
|---|---|---|---|
limit | number | No | Maximum updates to retrieve (default: 10) |
Example Workflow
A monitoring and notification pattern:
- Trigger -- Cron schedule (every 30 minutes)
- Action -- HTTP request to check a service health endpoint
- Logic -- If-else: check if status is not healthy
- Agent -- Compose an alert message, tools:
telegram:send_message - The agent sends an alert to the configured Telegram chat when the service is down.