Alexander Tsai/mcp-telegram
Built by Metorial, the integration platform for agentic AI.
Alexander Tsai/mcp-telegram
Server Summary
Get a list of chats
Send a message to a chat
Get unread messages from a chat
Mark messages as read
Retrieve past conversation context for replies
Connect Claude to your Telegram account to read and send messages.
get_chats - List your Telegram chats
get_messages - Read messages from a specific chat
mark_messages_read - Mark all unread messages in a chat as read
send_message - Send messages to any chat
get_conversation_context - Analyze chat style for natural responses
convostyle.txt
# Clone the repository
git clone https://github.com/alexandertsai/mcp-telegram
cd mcp-telegram
# Set up Python environment
pip install uv
uv venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate
uv sync
# Copy the example file
cp .env.example .env
# Edit .env and add your API credentials:
# TELEGRAM_API_ID=your_api_id_here
# TELEGRAM_API_HASH=your_api_hash_here
cd src/mcp_telegram
python telethon_auth.py
Follow the prompts:
Find your Claude Desktop config file:
~/Library/Application Support/Claude/claude_desktop_config.json
%APPDATA%\Claude\claude_desktop_config.json
Add this configuration:
{
"mcpServers": {
"telegram": {
"command": "/path/to/python",
"args": ["/path/to/mcp-telegram/src/mcp_telegram/main.py"]
}
}
}
To find paths:
which python
(Mac) or where.exe python
(Windows)Restart Claude Desktop.
After setup, you can ask Claude to:
Create src/mcp_telegram/convostyle.txt
to help Claude match your texting style:
I text casually with friends, formally with work contacts.
I use emojis sparingly and prefer short messages.
If authentication fails:
.env
.env
python telethon_auth.py
again.env
file or credentialsApache 2.0