Tgcli
Telegram CLI for reading/searching messages, syncing archives, and sending or downloading files. Use when the user asks about Telegram chats, messages, contacts, groups, or files.
Install on your platform
We auto-selected Claude Code based on this skill’s supported platforms.
Run in terminal (recommended)
claude mcp add tgcli npx -- -y @trustedskills/tgcli
Or manually add to ~/.claude/settings.json
{
"mcpServers": {
"tgcli": {
"command": "npx",
"args": [
"-y",
"@trustedskills/tgcli"
]
}
}
}Requires Claude Code (claude CLI). Run claude --version to verify your install.
About This Skill
What it does
tgcli is a command-line interface for interacting with Telegram using your personal account (MTProto protocol), not the bot API. It allows you to synchronize messages, search through conversations, send text and files, and optionally run a background sync service (MCP) for persistent connectivity. The tool supports archiving backfill and real-time message synchronization.
When to use it
- Archiving Telegram Conversations: Retrieve and store old messages from specific channels or chats for backup or analysis.
- Searching for Specific Content: Quickly find messages containing certain keywords within a channel or conversation archive.
- Sending Messages Programmatically: Automate sending text messages to contacts or channels, useful for notifications or reminders.
- Managing Telegram Data Offline: Access and manage your Telegram data even with intermittent internet connectivity by utilizing the optional MCP server.
Key capabilities
- Authentication using
api_idandapi_hashcredentials from my.telegram.org. - Message synchronization (backfill and real-time).
- Searching messages within chats and channels.
- Sending text messages to contacts or channels.
- Downloading media files.
- Optional MCP server for persistent background sync.
- Configuration options via
tgcli config.
Example prompts
tgcli messages list --chat @username --limit 10: Lists the last 10 messages from a specific chat.tgcli send text --to @username --message "Hello, this is automated!": Sends a message to a contact.tgcli sync --follow --chat @channel: Synchronizes messages for a specified channel and continues syncing in real-time.
Tips & gotchas
- You'll need to obtain your
api_idandapi_hashfrom my.telegram.org/apps before using the tool. - The configuration store is located in your OS app-data directory; use the
TGCLI_STOREenvironment variable to override its location if needed.
Tags
TrustedSkills Verification
Unlike other registries that point to live repositories, TrustedSkills pins every skill to a verified commit hash. This protects you from malicious updates — what you install today is exactly what was reviewed and verified.
Installing this skill downloads the exact code at commit 493a3e7f, not the current state of the repository. This prevents supply-chain attacks from unauthorized updates.
Security Audits
| Gen Agent Trust Hub | Pass |
| Socket | Pass |
| Snyk | Pass |
Details
- Version
- v2.0.8
- License
- MIT
- Author
- kfastov
- Installs
- 0
- Updated
- Feb 2, 2026
- Published
- Mar 19, 2025
🔓 Unverified
Not yet reviewed. Use with caution.
Install command fetches the verified snapshot, not the live repository.