MCP Telergam server for Telegram interaction

MCP Telergam server for Telegram interaction

mcp-telegram•bydryeab

An MCP server built with Telethon that lets AI agents interact with Telegram accounts through MTProto, including messaging, search, draft management, and media downloads.

License: MIT License•Runtime: Awaiting documentation review•Category: communication social

WHAT IT DOES

  • •Sends text messages or files to users, groups, or channels, and edits or deletes previously sent messages.
  • •Retrieves message history with filtering and accesses specific messages via Telegram links.
  • •Searches users, groups, and channels by name or username.
  • •Views and sets message drafts and downloads photos, videos, and documents from messages.

BEST FOR

  • •Connecting an LLM client to a Telegram account so an agent can send, edit, and delete messages.
  • •Letting an AI agent search Telegram chats and navigate to specific linked messages.
  • •Automating retrieval of Telegram message history or downloading media from messages through an MCP client.

ABOUT MCP-TELEGRAM

MCP Telergam server for Telegram interaction is cataloged as an MCP server attributed to dryeab. An MCP server built with Telethon that lets AI agents interact with Telegram accounts through MTProto, including messaging, search, draft management, and media downloads. It is categorized under communication social. See the capability inspector for recorded interfaces and their independent review status; consult upstream documentation for the current interface.

HOW TO INSTALL

Installation configuration is not reviewed. No executable setup is offered for this entry; inspect the source repository before proceeding.

LICENSE

Catalog license label: MIT License. Check the source repository's current license and terms before using, modifying or distributing this software.

能力检查器

能力定义尚未审核。未核验的采集内容不会作为可信接口展示。

Tools (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

Resources (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

Prompts (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

NEWSLETTER - COMING LATER

Newsletter subscriptions are not open yet

Email delivery is not connected. This page does not collect email addresses or create subscriptions.

Browse the registry for current listings instead.

Community Reviews

Coming later

Reviews for MCP Telergam server for Telegram interaction are not available yet

Review publishing and storage are not connected. This page does not collect or publish ratings or comments, including after sign-in.

FREQUENTLY ASKED QUESTIONS

Does mcp-telegram require my Telegram API credentials?

Yes. You obtain an API ID and API Hash from my.telegram.org/apps, and they are supplied to the MCP server through the API_ID and API_HASH environment variables.

Can multiple mcp-telegram instances share the same session file?

No. Running multiple instances with the same session file can cause database is locked errors because of Telethon's SQLite session storage, so only one instance should use a session file at a time.

How do I remove stored Telegram session data?

Use the clear-session command to remove all stored session data, or logout to end the current session.

上游原版 README

在 GitHub 查看同一版本原文

README.md · 653a1ed43c49 · 采集于 2026-11-13 09:34:58 UTC

保留上游原文,不做 AI 改写。为安全起见过滤脚本、表单和不安全链接。

当前显示最后一次成功采集的文档快照,请以来源页面为准。

MCP Telegram Logo

Enable LLMs to control your Telegram

GitHub stars PyPI version Twitter Follow

Connect Large Language Models to Telegram via the Model Context Protocol (MCP).

Built with Telethon, this server allows AI agents to interact with Telegram, enabling features like sending/editing/deleting messages, searching chats, managing drafts, downloading media, and more using the MTProto.


Table of Contents

🚀 Getting Started

Prerequisites

Installation

Install the mcp-telegram CLI tool:

uv tool install mcp-telegram

⚙️ Usage

[!IMPORTANT] Please ensure you have read and understood Telegram's ToS before using this tool. Misuse of this tool may result in account restrictions.

The mcp-telegram command-line tool is your entry point.

mcp-telegram --help # See all commands

Login

First, authenticate with your Telegram account:

mcp-telegram login

This interactive command will prompt you for:

  • API ID & API Hash: Obtain these from my.telegram.org/apps.
  • Phone Number: Your Telegram-registered phone number (international format, e.g., +1234567890).
  • Verification Code: Sent to your Telegram account upon first login.
  • 2FA Password: If you have Two-Factor Authentication enabled.

Your credentials are securely stored in the session file for future use.

[!WARNING] Keep your API credentials private and never share them publicly

[!NOTE] Use mcp-telegram logout to logout from current session or mcp-telegram clear-session to remove all stored session data.

Connect to the MCP server

To use MCP Telegram with MCP clients like Claude Desktop or Cursor, you'll need to configure the MCP server. The configuration process varies by client and operating system.

For detailed setup instructions, please refer to:

The configuration file should contain:

{
  "mcpServers": {
    "mcp-telegram": {
      "command": "mcp-telegram" /* Use full path if client can't find the command (e.g. "/usr/local/bin/mcp-telegram"). See IMPORTANT section below for full path instructions. */,
      "args": ["start"],
      "env": {
        "API_ID": "<your_api_id>",
        "API_HASH": "<your_api_hash>"
      }
    }
  }
}

[!Note] Configuration paths vary by OS and client. For example:

  • macOS: ~/Library/Application Support/Claude/ or ~/.cursor/
  • Windows: %APPDATA%\Claude\ or %APPDATA%\Cursor\

[!IMPORTANT] If your client cannot execute mcp-telegram despite it being accessible in the terminal, try using the full path to the executable. You can find this by running which mcp-telegram (macOS/Linux) or where mcp-telegram (Windows) in your terminal. Replace the command value in the configuration with the full path.

After saving the configuration file, restart your application.

🧰 Available Tools

Here's a comprehensive list of tools you can use to interact with Telegram through MCP:

📨 Messaging Tools

ToolDescription
send_message✉️ Send text messages or files to any user, group, or channel
edit_message✏️ Modify content of previously sent messages
delete_message🗑️ Remove one or multiple messages
get_messages📜 Retrieve message history with advanced filtering options

🔍 Search & Navigation

ToolDescription
search_dialogs🔎 Find users, groups, and channels by name or username
message_from_link🔗 Access specific messages using Telegram links

📝 Draft Management

ToolDescription
get_draft📋 View current message draft for any chat
set_draft✍️ Create or clear message drafts

📂 Media Handling

ToolDescription
media_download📸 Download photos, videos, and documents from messages

[!Note] For detailed parameter information and example use cases, run mcp-telegram tools in your terminal.

🛠️ Troubleshooting

Database Locked Errors

Running multiple mcp-telegram instances using the same session file can cause database is locked errors due to Telethon's SQLite session storage. Ensure only one instance uses a session file at a time.

Force-Stopping Existing Processes

If you need to stop potentially stuck processes:

  • macOS / Linux: pkill -f "mcp-telegram"
  • Windows: taskkill /F /IM mcp-telegram.exe /T (Check Task Manager for the exact process name)

🤝 Contributing

We welcome contributions! If you'd like to help improve MCP Telegram, please feel free to submit issues, feature requests, or pull requests. Your feedback and contributions help make this project better for everyone.

📝 License

This project is licensed under the MIT License - see the LICENSE file for details.


Made with ❤️ by Yeabsira Driba

Install configuration

Are you the maintainer?

Claim this server with your GitHub account to request manual ownership verification.

README Embed Badge
Markdown

Link to the catalog listing for MCP Telergam server for Telegram interaction from your README. This badge does not certify ownership, compatibility or security.

[![MCP catalog listing](https://img.shields.io/badge/MCP-awesome--mcp-orange?style=flat-square)](https://awesome-mcp.com/servers/mcp-telegram)

REPOSITORY STATS

GitHub StarsUnavailable
ForksUnavailable

Public repository statistics could not be verified. Check the configured source address; unavailable counts are not zero.

下载与拉取统计

来源、范围和时段分别列出;不相加,不代表安装人数、活跃用户或安全审核。

尚无已审核的包 / 镜像标识,暂不展示下载统计。

Related communication social MCP Servers

Alternative and complementary servers in the same category

View all in communication social →

An AI receptionist platform with an MCP server for accessing business calls, contacts and appointments from AI assistants.

52
Communication

Pidgeon provides an MCP server and an email inbox API that gives AI agents their own addresses for sending, awaiting, and replying to email.

Repository stats unavailable
Communication