MCP server for Telegram messaging via MTProto
## Telegram MCP Server: Messaging Automation The **Telegram MCP Server** integrates Telegram's messaging platform into Google Antigravity. This enables building bots, sending notifications, and automating messaging workflows for personal and business communication. ### Why Telegram MCP? Telegram excels at automation: - **Bot API**: Powerful bot capabilities - **No Rate Limits**: High volume messaging - **Groups & Channels**: Broadcast to many users - **Rich Media**: Images, files, stickers - **Cross-Platform**: Works everywhere ### Key Features #### 1. Send Messages ```python from telegram import Bot bot = Bot(token="your-token") # Send text message await bot.send_message( chat_id=123456, text="Deployment completed! :rocket:", parse_mode="Markdown" ) # Send with buttons from telegram import InlineKeyboardButton, InlineKeyboardMarkup keyboard = [[ InlineKeyboardButton("View Logs", url="https://logs.example.com"), InlineKeyboardButton("Rollback", callback_data="rollback") ]] await bot.send_message( chat_id=chat_id, text="Deploy successful", reply_markup=InlineKeyboardMarkup(keyboard) ) ``` #### 2. Bot Commands ```python from telegram.ext import Application, CommandHandler async def status(update, context): await update.message.reply_text("All systems operational!") async def deploy(update, context): env = context.args[0] if context.args else "staging" await update.message.reply_text(f"Deploying to {env}...") app = Application.builder().token("your-token").build() app.add_handler(CommandHandler("status", status)) app.add_handler(CommandHandler("deploy", deploy)) ``` #### 3. File Sharing ```python # Send documents await bot.send_document( chat_id=chat_id, document=open("report.pdf", "rb"), caption="Weekly Report" ) # Send photos await bot.send_photo( chat_id=chat_id, photo=open("screenshot.png", "rb") ) ``` ### Configuration ```json { "mcpServers": { "telegram": { "command": "npx", "args": ["-y", "@anthropic/mcp-telegram"], "env": { "TELEGRAM_BOT_TOKEN": "your-bot-token" } } } } ``` ### Use Cases **Alert Bots**: Send monitoring alerts to team channels. **Deployment Bots**: Trigger and monitor deployments via chat. **Status Updates**: Automated status notifications. The Telegram MCP Server brings Telegram automation to Antigravity.
{
"mcpServers": {
"telegram": {
"mcpServers": {
"telegram": {
"env": {
"TELEGRAM_PHONE": "+1234567890",
"TELEGRAM_API_ID": "YOUR_API_ID",
"TELEGRAM_API_HASH": "YOUR_API_HASH"
},
"args": [
"mcp-telegram"
],
"command": "uvx"
}
}
}
}
}