javarool/mcp-telegram-bot
3.1
If you are the rightful owner of mcp-telegram-bot and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to dayong@mcphub.com.
This is a Telegram Bot MCP Server designed for sending messages and asking questions through a Telegram bot.
Telegram Bot MCP Server
MCP server for sending messages and asking questions through Telegram bot.
Features
- ask(questionText) - Send question to Telegram chat and wait for user response (accepts text messages, captions, or returns description of media files)
- send(textMessage) - Send message to Telegram chat
- sendFile(path) - Send file to Telegram chat
Setup
-
Get Chat ID:
TELEGRAM_BOT_TOKEN=your_token npm run get-chat-idSend message to your bot/group and copy the Chat ID from console.
-
Test server:
npm run dev
MCP Configuration
Add to your MCP client configuration:
{
"mcpServers": {
"telegram-bot": {
"command": "npx",
"args": ["tsx", "/home/user/mcp-servers/mcp-telegram-bot/src/server.ts", "--timeout", "10"],
"env": {
"TELEGRAM_BOT_TOKEN": "your_bot_token_here",
"TELEGRAM_CHAT_ID": "your_chat_id_here"
}
}
}
}
Command Line Arguments
--timeout <minutes>- Timeout in minutes for waiting user response (default: 10)
Environment Variables
TELEGRAM_BOT_TOKEN- Your Telegram bot token from @BotFatherTELEGRAM_CHAT_ID- Target chat ID where messages will be sent