telegram-mcp
Allows sending notifications to a Telegram chat and receiving user responses.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@telegram-mcp Send a high urgency notification to ask if I should proceed with the deployment."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Telegram MCP Server
A Model Context Protocol (MCP) server that enables LLMs to send notifications via Telegram and receive user responses.
Features
Send text notifications to a Telegram chat with customizable urgency levels
Wait for and retrieve user responses
Integrates with Cline and other MCP-compatible LLM applications
Related MCP server: Telegram MCP Server
Prerequisites
Node.js 16 or higher
A Telegram bot token (obtained from @BotFather)
Your Telegram chat ID
Installation
From npm (recommended)
npm install -g telegram-mcpFrom GitHub
git clone https://github.com/CHarrisTech/telegram-mcp.git
cd telegram-mcp
npm install
npm run buildConfiguration
The server requires two environment variables:
TELEGRAM_BOT_TOKEN: Your Telegram bot tokenTELEGRAM_CHAT_ID: Your Telegram chat ID
Getting a Telegram Bot Token
Start a chat with @BotFather on Telegram
Send the command
/newbotFollow the instructions to create a new bot
BotFather will provide you with a token for your new bot
Finding Your Chat ID
Start a chat with your new bot
Send a message to the bot
Visit
https://api.telegram.org/bot<YOUR_BOT_TOKEN>/getUpdatesLook for the
chatobject in the response and note theidfield
Usage
Running Standalone
# Set environment variables
export TELEGRAM_BOT_TOKEN="your_bot_token"
export TELEGRAM_CHAT_ID="your_chat_id"
# Run the server
telegram-mcpIntegrating with Cline
Add the following to your Cline MCP settings file:
{
"mcpServers": {
"telegram-mcp": {
"command": "node",
"args": ["path/to/telegram-mcp/build/index.js"],
"env": {
"TELEGRAM_BOT_TOKEN": "your_bot_token",
"TELEGRAM_CHAT_ID": "your_chat_id"
},
"disabled": false,
"autoApprove": []
}
}
}Integrating with Claude Desktop
Add the following to your Claude Desktop config file:
{
"mcpServers": {
"telegram-mcp": {
"command": "node",
"args": ["path/to/telegram-mcp/build/index.js"],
"env": {
"TELEGRAM_BOT_TOKEN": "your_bot_token",
"TELEGRAM_CHAT_ID": "your_chat_id"
},
"disabled": false,
"autoApprove": []
}
}
}Available Tools
send_notification
Sends a notification message to the configured Telegram chat.
Parameters:
message(required): The message to send to the userproject(required): The name of the project the LLM is working onurgency(optional): The urgency level ("low", "medium", or "high")
check_notification_response
Checks if the user has responded to a previously sent notification.
Parameters:
message_id(required): The ID of the message to check for responsestimeout_seconds(optional): How long to wait for a response before giving up (default: 30)
Development
# Clone the repository
git clone https://github.com/CHarrisTech/telegram-mcp.git
cd telegram-mcp
# Install dependencies
npm install
# Build the project
npm run build
# Watch for changes during development
npm run watch
# Test with the MCP Inspector
npm run inspectorTesting Locally
The repository includes scripts to help you test the server locally:
Windows
# Set environment variables
set TELEGRAM_BOT_TOKEN=your_bot_token
set TELEGRAM_CHAT_ID=your_chat_id
# Run the test script
test-server.batmacOS/Linux
# Set environment variables
export TELEGRAM_BOT_TOKEN=your_bot_token
export TELEGRAM_CHAT_ID=your_chat_id
# Make the script executable (first time only)
chmod +x test-server.sh
# Run the test script
./test-server.shExamples
The examples directory contains sample code demonstrating how to use the Telegram MCP server:
programmatic-usage.js: Shows how to use the server programmatically in your own Node.js applications
To run an example:
# Set required environment variables
export TELEGRAM_BOT_TOKEN="your_bot_token"
export TELEGRAM_CHAT_ID="your_chat_id"
# Run the example
node examples/programmatic-usage.jsLicense
MIT
Available Tools
2 toolscheck_notification_responseB
Check if the user has responded to a notification. Use this to wait for and retrieve user responses to previous notifications.
Inputs: message_id (required), timeout_seconds.
send_notificationC
Send a text message notification to the user. Supports Markdown formatting for messages. Use backticks for code blocks and inline code. Use square brackets for placeholders.
Inputs: message (required), project (required), urgency.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 2 tools
The two tools represent clearly distinct halves of an async round trip: send_notification pushes a message, check_notification_response polls for a reply. There is no realistic way to mistake one for the other, and the descriptions reinforce the send-then-poll workflow.
Both names are snake_case with a leading verb (send_/check_) followed by the object (notification/notification_response). The pattern is predictable and readable, and no competing conventions are mixed in.
Two tools is thin even for a deliberately notification-only scope; it sits at the borderline between a focused minimal surface and an under-built one. A messaging-domain server would typically expose at least a few more operations (targets/chats, status, cancellation), so the tight scope is defensible but limiting.
Send plus check covers the basic lifecycle, but there is no notification identifier, timeout/wait semantics, or delivery status, so correlating responses to specific notifications when more than one is outstanding is ambiguous. Minor additions (message ID, status, or cancel) would close the loop properly.
Related MCP Connectors
Telegram bridge for your MCP-compatible agent. Bidirectional, no LLM in our stack.
Send AI results to Telegram as private notifications or channel posts. No copy-pasting - connect your Telegram account and publish directly from AI assistants.
Let AI assistants post to your Telegram chats, groups and channels. Not affiliated with Telegram.
Run a Telegram channel from your AI agent. Posts go out through your own bot, not your account.
Related MCP Servers
- AlicenseAqualityDmaintenanceEnables AI agents to send and receive messages, media, and files on Telegram, and manage chats via a bot token.1769 PyPIMIT
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to interact with the Telegram Bot API, allowing them to send messages, forward messages, get bot information, and receive updates.3MIT
- AlicenseBqualityDmaintenanceEnables AI agents to send notifications and media (text, photos, documents, videos) via a Telegram bot.4346 npm4Do What The F*ck You Want To Public
- FlicenseNot gradedqualityNot gradedmaintenanceEnables LLM clients to send messages, read recent messages, and retrieve chat information through the Telegram Bot API.-