Skip to main content
Glama
Telegram Drive MCP Server

Telegram Drive MCP Server

by daffaroffi

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

  1. Go to my.telegram.org

  2. Login with your phone number

  3. Click "API development tools"

  4. Create an application (fill app title and short name)

  5. Copy your api_id and api_hash

2. Install

npm install
npm run build

3. Configure

Create .env file:

TG_API_ID=your_api_id
TG_API_HASH=your_api_hash

4. First Login

npm run dev

On first run, you'll be prompted:

  1. Enter your phone number

  2. Enter the SMS code you received

  3. (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_here

5. 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

td_list_files

List files in a dialog

td_search_files

Search files by name

td_get_file_info

Get file details

td_upload_file

Upload local file

td_download_file

Download to local path

td_delete_file

Delete a file

td_forward_file

Forward/copy to another dialog

td_bulk_delete

Delete multiple files

td_bulk_forward

Forward multiple files

Message Operations

Tool

Description

td_send_message

Send text message

td_edit_message

Edit message

td_delete_messages

Delete messages

td_search_messages

Search in chat

td_get_message_history

Get chat history

Dialog Management

Tool

Description

td_list_dialogs

List all chats/channels

td_join_channel

Join a channel

td_leave_channel

Leave a channel

Storage

Tool

Description

td_storage_overview

Storage stats per dialog

td_get_media_info

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 tools
td_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

    B3.1/5.0

    Scored across 19 tools

    Disambiguation2/5

    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.

    Naming Consistency4/5

    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.

    Tool Count3/5

    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.

    Completeness4/5

    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

    ActivityStale
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables AI agents to interact with a user's Telegram account: list chats, read history, search, and send messages through Telegram's MTProto API.
      2
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables AI assistants to control a personal Telegram account for sending/reading messages, media, group management, and more via the MTProto API.
      MIT
    • F
      license
      Not graded
      quality
      D
      maintenance
      Enables 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.
      -
    • F
      license
      Not graded
      quality
      B
      maintenance
      Enables AI assistants to read Telegram conversations, search messages, retrieve chat context, resolve recipients, and send messages with delivery status.
      1
      -