🔌

Telegram MCP

Communication520

Send and receive Telegram messages via bot API.

Claude DesktopCursorWindsurf

Overview

Send and receive Telegram messages via bot API.

Setup

Run with npx:

npx -y @modelcontextprotocol/server-telegram

Configuration

TELEGRAM_BOT_TOKEN environment variable

Documentation

Telegram MCP

Overview

The Telegram MCP server enables AI agents to send and receive messages via the Telegram Bot API. Perfect for building AI-powered chatbots, notification systems, and communication assistants.

Features

  • Send Messages: Send text, photos, and documents to chats
  • Receive Messages: Get messages from chats (via webhook or polling)
  • Manage Chats: List and manage chat conversations
  • File Uploads: Send files and media
  • Keyboard Buttons: Create interactive buttons

Installation

npx -y @modelcontextprotocol/server-telegram

Configuration

{
  "mcpServers": {
    "telegram": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-telegram"],
      "env": {
        "TELEGRAM_BOT_TOKEN": "your-bot-token"
      }
    }
  }
}

Bot Setup

  1. Talk to BotFather on Telegram
  2. Create a new bot with /newbot
  3. Get the bot token
  4. Set the TELEGRAM_BOT_TOKEN environment variable

Available Tools

ToolDescription
send_messageSend a text message
send_photoSend a photo
send_documentSend a file
get_updatesGet recent messages
get_chat_infoGet chat details
get_chat_historyGet message history

Usage Examples

Send a Notification

Send a message to my personal chat saying "Task completed!"

Create a Bot Response

Set up the bot to respond to "hello" with a friendly greeting.

Get Chat History

Show me the last 10 messages from the #general chat.

Pros

  • ✅ Easy bot setup via BotFather
  • ✅ Rich message types (text, media, files)
  • ✅ Interactive keyboard buttons
  • ✅ Good for notifications and alerts

Cons

  • ❌ Requires bot token
  • ❌ Limited to Telegram ecosystem
  • ❌ Webhook setup needed for real-time

Resources