
Telegram CLI (tgcli)
by virat-mankali
Interact with Telegram as a real user via MTProto. Sync history, search offline, and send messages via MCP.
What it does
Connects an AI agent to a real Telegram user account using the MTProto protocol. Unlike bot-based integrations, tgcli allows the agent to act as the user, enabling it to sync message history, search through a local SQLite database, and send messages or media to any contact, group, or channel.
Tools
list_chats: Lists recent Telegram chats and dialogs.search_messages: Performs full-text offline search across synced messages.send_message: Sends text messages or media files to a specified recipient.sync_messages: Verifies the session and synchronizes incoming messages.
Installation
Add the following to your claude_desktop_config.json:
{
"mcpServers": {
"tgcli": {
"command": "tgcli",
"args": ["serve"],
"env": {
"TGCLI_APP_ID": "your_api_id",
"TGCLI_APP_HASH": "your_api_hash"
}
}
}
}
Supported hosts
Claude, Cursor, Kiro
Quick install
brew install virat-mankali/tap/tgcliInformation
- Pricing
- free
- Published
- 5/2/2026
- stars






