Telegram MCP Skill
Control Telegram via mcporter and the telegram-mcp server.
Quick Reference
# List all available tools
mcporter list telegram-mcp --schema
# Call a tool
mcporter call telegram-mcp.<tool_name> param1=value1 param2=value2
Setup
1. Clone and Install
cd ~/.mcp-servers
git clone https://github.com/6Kmfi6HP/telegram-mcp.git
cd telegram-mcp
uv sync
2. Get Telegram API Credentials
- Go to https://my.telegram.org/apps
- Create an application
- Note your
api_idandapi_hash
3. Generate Session String
cd ~/.mcp-servers/telegram-mcp
uv run session_string_generator.py
Follow prompts to authenticate. Save the session string.
4. Configure Environment
Create ~/.mcp-servers/telegram-mcp/.env:
TELEGRAM_API_ID=your_api_id
TELEGRAM_API_HASH=your_api_hash
TELEGRAM_SESSION_STRING=your_session_string
5. Add to mcporter Config
mcporter config add telegram-mcp --command "uv --directory ~/.mcp-servers/telegram-mcp run main.py"
Or manually edit ~/.config/mcporter/mcporter.json:
{
"mcpServers": {
"telegram-mcp": {
"command": "uv",
"args": ["--directory", "~/.mcp-servers/telegram-mcp", "run", "main.py"]
}
}
}
Common Operations
List Chats
mcporter call telegram-mcp.get_chats page=1 page_size=20
mcporter call telegram-mcp.list_chats limit=50
Send Message
mcporter call telegram-mcp.send_message chat_id=123456789 message="Hello!"
mcporter call telegram-mcp.reply_to_message chat_id=123456789 message_id=42 text="Reply text"
Search
mcporter call telegram-mcp.search_messages chat_id=123456789 query="keyword" limit=20
mcporter call telegram-mcp.search_public_chats query="news"
Contacts
mcporter call telegram-mcp.list_contacts
mcporter call telegram-mcp.add_contact phone="+1234567890" first_name="John" last_name="Doe"
Groups & Channels
mcporter call telegram-mcp.create_group title="My Group" user_ids='[111,222]'
mcporter call telegram-mcp.join_chat_by_link link="https://t.me/+AbCdEfGh"
mcporter call telegram-mcp.subscribe_public_channel channel="@channel_name"
Reactions & Polls
mcporter call telegram-mcp.send_reaction chat_id=123 message_id=42 emoji="👍"
mcporter call telegram-mcp.create_poll chat_id=123 question="Vote?" options='["Yes","No"]'
All Available Tools
See references/tools.md for complete tool list with parameters.
Categories:
- Chat & Group Management (20+ tools)
- Messaging (20+ tools)
- Contact Management (12+ tools)
- User & Profile (5 tools)
- Search & Discovery (4 tools)
- Stickers & Bots (3 tools)
- Privacy & Settings (7 tools)
- Drafts (3 tools)
Input Formats
All chat_id and user_id parameters accept:
- Integer ID:
123456789or-1001234567890 - String ID:
"123456789" - Username:
"@username"or"username"
Notes
- Session string = full account access. Keep it secure!
- File upload/download tools removed due to MCP limitations
- Use
--output jsonfor machine-readable results