mcp-telegram

beepmedia/mcp-telegram

3.2

If you are the rightful owner of mcp-telegram 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.

An MCP (Model Context Protocol) server that enables AI agents to send and manage Telegram messages using the Telegram Bot API.

Tools
14
Resources
0
Prompts
0

MCP Message Server

An MCP (Model Context Protocol) server that enables AI agents to send and manage messages across multiple platforms.

Supported Platforms

  • Telegram - Send messages via Telegram Bot API
  • WhatsApp - Coming soon
  • Discord - Coming soon

Features

  • Send Messages: Send text, photos, and documents to chats, channels, and users
  • Message Management: Edit, delete, and forward messages
  • Updates/Polling: Receive incoming messages via long polling or webhooks
  • Chat Information: Get chat details and member counts
  • Multi-Transport: Supports stdio (MCP), HTTP REST API, and SSE transports

Prerequisites

Installation

# Clone the repository
git clone https://github.com/beepmedia/mcp-message.git
cd mcp-message

# Install dependencies
bun install

# Set up environment variables
cp .env.example .env
# Edit .env and add your TELEGRAM_BOT_TOKEN

Configuration

Environment Variables

VariableRequiredDescription
TELEGRAM_BOT_TOKENYesBot token from @BotFather
MCP_MESSAGE_API_KEYNoAPI key for HTTP server authentication
PORTNoHTTP server port (default: 3851)

Usage

MCP Server (Stdio Transport)

For integration with Claude Code or other MCP clients:

bun run start

Add to your Claude Code configuration (~/.claude.json):

{
  "mcpServers": {
    "mcp-message": {
      "type": "stdio",
      "command": "npx",
      "args": ["-y", "mcp-remote@latest", "https://lab.beepmedia.com/mcp/message/sse", "--header", "Authorization: Bearer YOUR_API_KEY"]
    }
  }
}

HTTP Server

For REST API access:

bun run server

Development Mode

bun run dev

Available Tools

Messaging

ToolDescription
send_messageSend a text message to a chat/channel/user
forward_messageForward a message to another chat
edit_messageEdit a previously sent message
delete_messageDelete a message

Updates & Information

ToolDescription
get_updatesGet incoming messages (long polling)
get_chatGet information about a chat
get_meGet bot information
get_agent_infoGet agent configuration

Project Structure

mcp-message/
├── src/
│   ├── index.ts        # MCP server (stdio transport)
│   ├── server.ts       # HTTP REST server
│   └── sse-server.ts   # SSE transport server
├── scripts/
│   └── test-send.ts    # Test utility
├── package.json
├── tsconfig.json
└── README.md

Building

bun run build

Output will be in the dist/ directory.

License

MIT

Related Projects

  • mcp-sms - MCP SMS server with Twilio
  • mcp-mail - MCP email server with AWS SES
  • mcp-phone - MCP phone call server with Twilio