Telegram Drive MCP Server
Provides tools for managing files, messages, dialogs, and storage on Telegram, enabling AI agents to list, search, upload, download, delete, and forward files, send and edit messages, manage channels, and view storage statistics.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Telegram Drive MCP Server search for pdf files in my chats"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Telegram Drive MCP Server
MCP server for AI assistants to interact with Telegram files. Connects directly to Telegram via MTProto using teleproto.
Features
File Management - List, search, upload, download, delete, forward files
Message Operations - Send, edit, search messages
Dialog Management - List, join, leave channels
Storage Overview - Get file counts and sizes per dialog
Related MCP server: Telegram MCP Server
Setup
1. Get Telegram API Credentials
Go to my.telegram.org
Login with your phone number
Click "API development tools"
Create an application (fill app title and short name)
Copy your
api_idandapi_hash
2. Install
npm install
npm run build3. Configure
Create .env file:
TG_API_ID=your_api_id
TG_API_HASH=your_api_hash4. First Login
npm run devOn first run, you'll be prompted:
Enter your phone number
Enter the SMS code you received
(If 2FA is enabled) Enter your password
After login, you'll see a session string. Copy it to your .env:
TG_SESSION=your_session_string_here5. Claude Desktop Integration
Add to your Claude Desktop config (claude_desktop_config.json):
{
"mcpServers": {
"telegram-drive": {
"command": "node",
"args": ["C:\\path\\to\\telegram-drive-mcp\\dist\\index.js"],
"env": {
"TG_API_ID": "your_api_id",
"TG_API_HASH": "your_api_hash",
"TG_SESSION": "your_session_string"
}
}
}
}Available Tools
File Operations
Tool | Description |
| List files in a dialog |
| Search files by name |
| Get file details |
| Upload local file |
| Download to local path |
| Delete a file |
| Forward/copy to another dialog |
| Delete multiple files |
| Forward multiple files |
Message Operations
Tool | Description |
| Send text message |
| Edit message |
| Delete messages |
| Search in chat |
| Get chat history |
Dialog Management
Tool | Description |
| List all chats/channels |
| Join a channel |
| Leave a channel |
Storage
Tool | Description |
| Storage stats per dialog |
| Media details (duration, resolution) |
Session Security
The session string gives full access to your Telegram account. Treat it like a password:
Never commit it to git
Never share it publicly
Store it in environment variables or a secret manager
Requirements
Node.js >= 18.0.0
Telegram account with api_id/api_hash
License
MIT
Available Tools
19 toolstd_bulk_deleteC
Delete multiple files at once
Inputs: dialog (required), messageIds (required), revoke.
td_bulk_forwardB
Forward multiple files to another dialog
Inputs: toDialog (required), fromDialog (required), messageIds (required).
td_delete_fileB
Delete a file (message) from a dialog
Inputs: dialog (required), messageId (required), revoke.
td_delete_messagesC
Delete multiple messages at once
Inputs: dialog (required), messageIds (required), revoke.
td_download_fileB
Download a file from Telegram to a local path
Inputs: dialog (required), messageId (required), outputPath (required).
td_edit_messageC
Edit an existing message
Inputs: dialog (required), message (required), messageId (required).
td_forward_fileC
Copy/forward a file from one dialog to another
Inputs: toDialog (required), messageId (required), fromDialog (required).
td_get_file_infoC
Get detailed info about a specific file (message with media)
Inputs: dialog (required), messageId (required).
td_get_media_infoB
Get detailed media info (duration, resolution, file type)
Inputs: dialog (required), messageId (required).
td_get_message_historyC
Get message history from a dialog
Inputs: dialog (required), limit, offsetId.
td_join_channelA
Join a public Telegram channel or via invite link
Inputs: channel (required).
td_leave_channelB
Leave a Telegram channel
Inputs: channel (required).
td_list_dialogsA
List all Telegram dialogs (chats, channels, saved messages)
Inputs: limit, search.
td_list_filesC
List files in a Telegram dialog (Saved Messages, channel, etc.)
Inputs: dialog (required), limit, search, offsetId.
td_search_filesA
Search for files by filename in a dialog
Inputs: query (required), limit, dialog.
td_search_messagesB
Search for messages in a dialog
Inputs: query (required), dialog (required), limit.
td_send_messageB
Send a text message to a dialog
Inputs: dialog (required), message (required).
td_storage_overviewA
Get storage overview: file counts and sizes per dialog
Inputs: limit.
td_upload_fileB
Upload a local file to a Telegram dialog
Inputs: dialog (required), filePath (required), caption.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 19 tools
Several tools have overlapping boundaries: delete_file vs delete_messages, get_file_info vs get_media_info, and search_files vs search_messages could easily be confused. Bulk variants also blur the line with their singular counterparts.
Tools consistently use a td_ prefix with a snake_case verb_noun pattern like list_files, upload_file, and join_channel. Minor deviations like bulk_delete, bulk_forward, and storage_overview weaken the pattern slightly.
19 tools is on the heavy side, though most serve distinct file or message operations. The bulk and message-management additions push it into the borderline range for a Telegram Drive server.
Core file lifecycle operations are covered: upload, download, list, search, info, delete, forward, and storage overview. Minor gaps like caption editing, renaming, or file link generation exist but are workable.
Maintenance
Related MCP Connectors
Multi-tenant Telegram gateway for AI agents — HTTP+stdio, 8 tools, MTProto User API
Let AI assistants post to your Telegram chats, groups and channels. Not affiliated with Telegram.
Your Telegram, WhatsApp, Instagram, mail and calendar in Claude or ChatGPT. Never sends messages.
- DNS-DATA RemoteDeprecatedcom.dns-data
Connect AI assistants to authorized Windows and macOS devices for files, commands, and management.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceEnables AI agents to interact with a user's Telegram account: list chats, read history, search, and send messages through Telegram's MTProto API.2MIT
- AlicenseNot gradedqualityCmaintenanceEnables AI assistants to control a personal Telegram account for sending/reading messages, media, group management, and more via the MTProto API.MIT
- FlicenseNot gradedqualityDmaintenanceEnables AI assistants to interact with a personal Telegram account via MTProto, offering messaging, search, media handling, and other tools, particularly suited for finding and applying to remote jobs.-
- FlicenseNot gradedqualityBmaintenanceEnables AI assistants to read Telegram conversations, search messages, retrieve chat context, resolve recipients, and send messages with delivery status.1-