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
- Bun runtime
- Telegram Bot Token (get from @BotFather)
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
| Variable | Required | Description |
|---|---|---|
TELEGRAM_BOT_TOKEN | Yes | Bot token from @BotFather |
MCP_MESSAGE_API_KEY | No | API key for HTTP server authentication |
PORT | No | HTTP 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
| Tool | Description |
|---|---|
send_message | Send a text message to a chat/channel/user |
forward_message | Forward a message to another chat |
edit_message | Edit a previously sent message |
delete_message | Delete a message |
Updates & Information
| Tool | Description |
|---|---|
get_updates | Get incoming messages (long polling) |
get_chat | Get information about a chat |
get_me | Get bot information |
get_agent_info | Get 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