Docker image for running MCP-proxy with Telegram integration. Based on mcp-proxy and telegram-mcp. The main goal is to enable simultaneous interaction with multiple agents via the Telegram API.
- 🚀 Quick start MCP server with Telegram support
- 🔄 Automatic session initialization on first run
- 📦 Ready-to-use image with pre-installed dependencies
- 🤖 Multi-agent support - can serve multiple AI agents simultaneously
Before starting, you need to get your API credentials:
- Go to my.telegram.org
- Log in with your phone number
- Navigate to "API Development Tools"
- Create a new application (if you haven't already)
- Copy your
api_idandapi_hash
Run the container in interactive mode to create your Telegram session:
docker run --rm -it \
-e TELEGRAM_API_ID=your_api_id \
-e TELEGRAM_API_HASH=your_api_hash \
-v ./session.session:/session.session \
meteozond/telegram-mcp-sse:latestYou will be prompted to:
- Enter your phone number (with country code, e.g., +1234567890)
- Enter the confirmation code sent to your Telegram
- Enter your 2FA password (if enabled)
- Exit the container after successful authentication
After successful authentication, the session will be saved to session.session file.
When session is created, run with port mapping:
docker run \
-e TELEGRAM_API_ID=your_api_id \
-e TELEGRAM_API_HASH=your_api_hash \
-v ./session.session:/session.session \
-p 8080:8080 \
meteozond/telegram-mcp-sse:latestAfter starting, if session.session exists the server will be available at
http://localhost:8080 and ready to serve multiple AI agents.
| Variable | Default Value | Description |
|---|---|---|
TELEGRAM_API_ID |
- | Telegram API ID (required) |
TELEGRAM_API_HASH |
- | Telegram API Hash (required) |
TELEGRAM_SESSION_NAME |
session |
Session file name |
TELEGRAM_SESSION_STRING |
- | Session string (alternative to file) |
MCP_PROXY_HOST |
0.0.0.0 |
MCP proxy host |
MCP_PROXY_PORT |
8080 |
MCP proxy port |
After startup, server is available at: http://localhost:8080/sse
{
"servers": {
"telegram": {
"url": "http://127.0.0.1:8080/sse"
}
}
}MCP proxy provides access to all telegram-mcp methods:
- Chats and Messages:
list_chats,get_messages,send_message,edit_message,delete_message - Contacts:
list_contacts,search_contacts,add_contact,delete_contact - Groups and Channels:
create_group,create_channel,invite_to_group,get_participants - Media:
send_file,download_media,send_voice,send_sticker,send_gif - Administration:
promote_admin,ban_user,unban_user,get_admins - Profile:
get_me,update_profile,set_profile_photo,get_privacy_settings - And much more...
For complete method list, see telegram-mcp documentation.
If you have session issues:
- Delete
session.sessionfile - Restart in interactive mode to create new session
- telegram-mcp - MCP server for Telegram
- mcp-proxy - HTTP proxy for MCP
- Telegram API - Telegram API documentation
- My Telegram - Get API credentials
MIT License
See LICENSE in the project root.