MCP Connector

Integrate Telegram with AI Assistants

This Telegram MCP server bridges the Telegram API to AI assistants for reading, organizing, and drafting replies to dialogs.

Works with telegram

91
Spark score
out of 100
Updated 3 months ago
Source checked Sep 15, 2026
Version 0.2.1
Models
universal

Add to Favorites

Why it matters

Bridge your AI assistants with the Telegram API to manage messages, organize conversations, and send communications directly within your AI workflows.

Outcomes

What it gets done

01

Send message drafts to any Telegram conversation.

02

List and filter Telegram conversations, including unread messages.

03

Retrieve messages from specific Telegram conversations.

04

Mark Telegram conversations as read.

Source

Get it from source

Spark does not host a copy of it.

Open source

Reports

Agent outcome reports

No reports yet

Capabilities

Tools your agent gets

tg_me

Get information about the current Telegram account

tg_dialogs

List conversations with optional unread filter

tg_read

Mark a conversation as read

tg_dialog

Get messages from a specific conversation

tg_send

Send message drafts to any conversation

Overview

Telegram-Client MCP Server

telegram-mcp bridges the Telegram API to AI assistants with five tools for checking account info, listing and reading dialogs, and sending draft messages, operating under the user's own authenticated Telegram account. Use it to triage unread Telegram messages, get suggestions for organizing dialogs into folders, or draft replies directly through an AI assistant.

What it does

telegram-mcp is a bridge between the Telegram API and AI assistants, built on the Model Context Protocol. It gives an AI assistant the ability to check current account information, list dialogs with an optional unread-only filter, mark a dialog as read, retrieve messages from a specific dialog, and send draft messages to any dialog, turning routine Telegram triage and replying into natural-language requests instead of manual scrolling.

When to use - and when NOT to

Use this for message management (checking unread important messages, summarizing unread messages, preparing draft responses, reviewing non-critical unread chats), organization (analyzing dialogs to suggest a folder structure, categorizing chats by importance, grouping work-related conversations), and communication (monitoring a specific chat for updates on a topic, drafting a polite response, checking for unanswered questions). It is explicitly bound by the Telegram API Terms of Service - the project warns that any misuse of the API may result in account suspension, so this is a personal-account automation tool operated under the user's own Telegram account, not an anonymous or unauthenticated bot layer.

Inputs and outputs

Five tools cover the current capability set: tg_me (current account information), tg_dialogs (list dialogs, with an optional unread filter), tg_read (mark a dialog as read), tg_dialog (retrieve messages from a specific dialog), and tg_send (send a draft message to any dialog).

Integrations

Installable via Homebrew (brew install chaindead/tap/telegram-mcp), via npx -y @chaindead/telegram-mcp (macOS, Linux, and Windows), from prebuilt release binaries for macOS/Linux/Windows, or built from source with Go 1.24+ (go install github.com/chaindead/telegram-mcp@latest). Authorization requires a Telegram API ID and hash from my.telegram.org, used once via telegram-mcp auth --app-id ... --api-hash ... --phone ... (with --password for 2FA, or --new to override an existing session), after which Claude Desktop or Cursor is configured with the built binary and TG_APP_ID/TG_API_HASH environment variables. For MCP clients like VS Code that don't support JSON Schema Draft 2020-12, a --schema-version flag or TG_SCHEMA_VERSION environment variable can switch to Draft-07. The project is released under the MIT License.

Who it's for

Telegram users who want an AI assistant to triage unread messages, suggest how to organize dialogs, and draft replies directly against their own Telegram account, while staying within Telegram's API terms of service.

Example prompts the project documents span all three capability areas: checking for unread important messages and preparing draft responses under Message Management, suggesting a folder structure or grouping work-related chats under Organization, and monitoring a specific chat for updates on a topic under Communication - giving a concrete sense of the day-to-day triage workflow the five tools are meant to support.

telegram-mcp auth --app-id <your-api-id> --api-hash <your-api-hash> --phone <your-phone-number>
Source README



License: MIT
Visitors

Telegram MCP server

The server is a bridge between the Telegram API and the AI assistants and is based on the Model Context Protocol.

Table of Contents

What is MCP?

The Model Context Protocol (MCP) is a system that lets AI apps, like Claude Desktop or Cursor, connect to external tools and data sources. It gives a clear and safe way for AI assistants to work with local services and APIs while keeping the user in control.

What does this server do?

Capabilities

  • Get current account information (tool: tg_me)
  • List dialogs with optional unread filter (tool: tg_dialogs)
  • Mark dialog as read (tool: tg_read)
  • Retrieve messages from specific dialog (tool: tg_dialog)
  • Send draft messages to any dialog (tool: tg_send)

Prompt examples

Here are some example prompts you can use with AI assistants:

Message Management
  • "Check for any unread important messages in my Telegram"
  • "Summarize all my unread Telegram messages"
  • "Read and analyze my unread messages, prepare draft responses where needed"
  • "Check non-critical unread messages and give me a brief overview"
Organization
  • "Analyze my Telegram dialogs and suggest a folder structure"
  • "Help me categorize my Telegram chats by importance"
  • "Find all work-related conversations and suggest how to organize them"
Communication
  • "Monitor specific chat for updates about [topic]"
  • "Draft a polite response to the last message in [chat]"
  • "Check if there are any unanswered questions in my chats"

Installation

Homebrew

You can install a binary release on macOS/Linux using brew:

# Install
brew install chaindead/tap/telegram-mcp

# Update
brew upgrade chaindead/tap/telegram-mcp

NPX

You can run the latest version directly using npx (supports macOS, Linux, and Windows):

npx -y @chaindead/telegram-mcp

When using NPX, modify the standard commands and configuration as follows:

npx -y @chaindead/telegram-mcp auth ...
{
  "mcpServers": {
    "telegram": {
      "command": "npx",
      "args": ["-y", "@chaindead/telegram-mcp"],
      "env": {
        "TG_APP_ID": "<your-api-id>",
        "TG_API_HASH": "<your-api-hash>"
      }
    }
  }
}

For complete setup instructions, see Authorization and Client Configuration.

From Releases

MacOS

Note: The commands below install to /usr/local/bin. To install elsewhere, replace /usr/local/bin with your preferred directory in your PATH.

First, download the archive for your architecture:

# For Intel Mac (x86_64)
curl -L -o telegram-mcp.tar.gz https://github.com/chaindead/telegram-mcp/releases/latest/download/telegram-mcp_Darwin_x86_64.tar.gz

# For Apple Silicon (M1/M2)
curl -L -o telegram-mcp.tar.gz https://github.com/chaindead/telegram-mcp/releases/latest/download/telegram-mcp_Darwin_arm64.tar.gz

Then install the binary:

# Extract the binary
sudo tar xzf telegram-mcp.tar.gz -C /usr/local/bin

# Make it executable
sudo chmod +x /usr/local/bin/telegram-mcp

# Clean up
rm telegram-mcp.tar.gz
Linux

Note: The commands below install to /usr/local/bin. To install elsewhere, replace /usr/local/bin with your preferred directory in your PATH.

First, download the archive for your architecture:

# For x86_64 (64-bit)
curl -L -o telegram-mcp.tar.gz https://github.com/chaindead/telegram-mcp/releases/latest/download/telegram-mcp_Linux_x86_64.tar.gz

# For ARM64
curl -L -o telegram-mcp.tar.gz https://github.com/chaindead/telegram-mcp/releases/latest/download/telegram-mcp_Linux_arm64.tar.gz

Then install the binary:

# Extract the binary
sudo tar xzf telegram-mcp.tar.gz -C /usr/local/bin

# Make it executable
sudo chmod +x /usr/local/bin/telegram-mcp

# Clean up
rm telegram-mcp.tar.gz
Windows
Windows
  1. Download the latest release for your architecture:
  2. Extract the .zip file
  3. Add the extracted directory to your PATH or move telegram-mcp.exe to a directory in your PATH

From Source

Requirements:

  • Go 1.24 or later
  • GOBIN in PATH
go install github.com/chaindead/telegram-mcp@latest

Configuration

Authorization

Before you can use the server, you need to connect to the Telegram API.

  1. Get the API ID and hash from Telegram API

  2. Run the following command:

    Note:
    If you have 2FA enabled: add --password <2fa_password>

    Note:
    If you want to override existing session: add --new

    telegram-mcp auth --app-id <your-api-id> --api-hash <your-api-hash> --phone <your-phone-number>
    

    📩 Enter the code you received from Telegram to connect to the API.

  3. Done! Please give this project a ⭐️ to support its development.

Client Configuration

Example of Configuring Claude Desktop to recognize the Telegram MCP server.

  1. Open the Claude Desktop configuration file:

    • in MacOS, the configuration file is located at ~/Library/Application Support/Claude/claude_desktop_config.json
    • in Windows, the configuration file is located at %APPDATA%\Claude\claude_desktop_config.json

    Note:
    You can also find claude_desktop_config.json inside the settings of Claude Desktop app

  2. Add the server configuration

    for Claude desktop:

     {
       "mcpServers": {
         "telegram": {
           "command": "telegram-mcp",
           "env": {
             "TG_APP_ID": "<your-app-id>",
             "TG_API_HASH": "<your-api-hash>",
             "PATH": "<path_to_telegram-mcp_binary_dir>",
             "HOME": "<path_to_your_home_directory"
           }
         }
       }
     }
    

    for Cursor:

    {
      "mcpServers": {
        "telegram-mcp": {
          "command": "telegram-mcp",
          "env": {
            "TG_APP_ID": "<your-app-id>",
            "TG_API_HASH": "<your-api-hash>"
          }
        }
      }
    }
    

JSON Schema Version

Some MCP clients (e.g. VS Code) do not support JSON Schema Draft 2020-12 and will reject tools that use it. You can override the JSON Schema version by setting the --schema-version flag or the TG_SCHEMA_VERSION environment variable.

Common values:

Version URL
Draft-07 (recommended for VS Code) https://json-schema.org/draft-07/schema#
Draft 2020-12 (default) https://json-schema.org/draft/2020-12/schema

Star History

Star History Chart

FAQ

Common questions

Discussion

Questions & comments · 0

Sign In Sign in to leave a comment.