Telegram

by alexandertsai

4 stars
Not rated
GitHub

About

Enables Claude to monitor and respond to Telegram messages by accessing chat lists, reading conversations, and sending replies that match the user's texting style through Telethon API integration.

Details

Author
alexandertsai
Repository
alexandertsai/mcp-telegram
GitHub stars
4
License
Apache License 2.0
Categories
Communication, Other, Community, Design, Developer Tools, AI, Infrastructure, API
Tags
#integration

Most chats, users, and groups can be referenced by numeric id, @username,
phone number, t.me link, or the literal "me" — the server resolves them for
you (and warms Telethon's entity cache automatically so raw ids work too).

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name Telegram
    Command (node, npx, python, etc.) uv
    Arguments
    • Argument 1 --directory
    • Argument 2 /path/to/mcp-telegram
    • Argument 3 run
    • Argument 4 telegram-mcp

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

After setup, you can ask Claude to:
- "Check my Telegram messages"
- "Send a message to [contact name]"
- "What are my unread chats?"
- "Reply to the last message from [contact name]"


pip install uv
uv venv
source .venv/bin/activate  # On Windows: .venv\Scripts\activate
uv sync

``bash

If authentication fails:
1. Check your API credentials in
.env
2. Remove the TELEGRAM_SESSION_STRING line from
.env
3. Run
uv run telegram-auth` again

get_me

Info about the authenticated account

get_chats

Paginated list of chats (names, ids, unread counts, pinned state); supports archived chats

get_messages

Paginated message history for a chat (marks it read); includes media and reaction info

search_messages

Search by text, globally or within a single chat

get_pinned_messages

List pinned messages in a chat

get_entity_info

Look up a user/group/channel by id, username, phone, or link

get_participants

List members of a group or channel

send_message

Send text (Markdown), optionally as a reply

edit_message

Edit a message you sent

delete_messages

Delete messages (for everyone or just you)

forward_messages

Forward messages between chats

send_reaction

Add or clear an emoji reaction

pin_message

Pin a message

unpin_message

Unpin a message

mark_messages_read

Mark a chat's unread messages as read

send_file

Send a photo, video, document, or voice note from disk

download_media

Download a message's attached media to disk

get_contacts

List saved contacts

add_contact

Manage contacts by adding a new one

delete_contact

Manage contacts by deleting an existing one

block_user

Block a user

unblock_user

Unblock a user

create_group

Create a basic group

create_channel

Create a channel or supergroup

join_chat

Join a chat by username or invite link

leave_chat

Leave a chat

archive_chat

Archive or unarchive a chat

mute_chat

Mute or unmute notifications for a chat

get_conversation_context

Recent messages + your `convostyle.txt` guide so Claude can match your texting style

Reading

- get_me – Info about the authenticated account
- get_chats – Paginated list of chats (names, ids, unread counts, pinned state); supports archived chats
- get_messages – Paginated message history for a chat (marks it read); includes media and reaction info
- search_messages – Search by text, globally or within a single chat
- get_pinned_messages – List pinned messages in a chat
- get_entity_info – Look up a user/group/channel by id, username, phone, or link
- get_participants – List members of a group or channel

Sending & editing

- send_message – Send text (Markdown), optionally as a reply
- edit_message – Edit a message you sent
- delete_messages – Delete messages (for everyone or just you)
- forward_messages – Forward messages between chats
- send_reaction – Add or clear an emoji reaction
- pin_message / unpin_message – Pin or unpin messages
- mark_messages_read – Mark a chat's unread messages as read

Media

- send_file – Send a photo, video, document, or voice note from disk
- download_media – Download a message's attached media to disk

Contacts & users

- get_contacts – List saved contacts
- add_contact / delete_contact – Manage contacts
- block_user / unblock_user – Block management

Chat & channel management

- create_group – Create a basic group
- create_channel – Create a channel or supergroup
- join_chat / leave_chat – Join (by username or invite link) or leave
- archive_chat – Archive / unarchive a chat
- mute_chat – Mute / unmute notifications

Style-aware drafting

- get_conversation_context – Recent messages + your convostyle.txt guide so Claude can match your texting style

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

{
    "mcpServers": {
        "telegram": {
            "command": "uv",
            "args": [
                "--directory",
                "/path/to/mcp-telegram",
                "run",
                "telegram-mcp"
            ],
            "env": {},
            "cwd": null,
            "shell": false
        }
    }
}

Macos

{
    "command": "uv",
    "args": [
        "--directory",
        "/path/to/mcp-telegram",
        "run",
        "telegram-mcp"
    ],
    "env": [],
    "cwd": null,
    "shell": false
}

Windows

{
    "command": "uv",
    "args": [
        "--directory",
        "/path/to/mcp-telegram",
        "run",
        "telegram-mcp"
    ],
    "env": [],
    "cwd": null,
    "shell": false
}

Linux

{
    "command": "uv",
    "args": [
        "--directory",
        "/path/to/mcp-telegram",
        "run",
        "telegram-mcp"
    ],
    "env": [],
    "cwd": null,
    "shell": false
}

Telegram MCP Server

Connect Claude to your Telegram account to read and send messages.

Features

Most chats, users, and groups can be referenced by numeric id, @username,
phone number, t.me link, or the literal "me" — the server resolves them for
you (and warms Telethon's entity cache automatically so raw ids work too).

Available Tools

Reading

- get_me – Info about the authenticated account
- get_chats – Paginated list of chats (names, ids, unread counts, pinned state); supports archived chats
- get_messages – Paginated message history for a chat (marks it read); includes media and reaction info
- search_messages – Search by text, globally or within a single chat
- get_pinned_messages – List pinned messages in a chat
- get_entity_info – Look up a user/group/channel by id, username, phone, or link
- get_participants – List members of a group or channel

Sending & editing

- send_message – Send text (Markdown), optionally as a reply
- edit_message – Edit a message you sent
- delete_messages – Delete messages (for everyone or just you)
- forward_messages – Forward messages between chats
- send_reaction – Add or clear an emoji reaction
- pin_message / unpin_message – Pin or unpin messages
- mark_messages_read – Mark a chat's unread messages as read

Media

- send_file – Send a photo, video, document, or voice note from disk
- download_media – Download a message's attached media to disk

Contacts & users

- get_contacts – List saved contacts
- add_contact / delete_contact – Manage contacts
- block_user / unblock_user – Block management

Chat & channel management

- create_group – Create a basic group
- create_channel – Create a channel or supergroup
- join_chat / leave_chat – Join (by username or invite link) or leave
- archive_chat – Archive / unarchive a chat
- mute_chat – Mute / unmute notifications

Style-aware drafting

- get_conversation_context – Recent messages + your convostyle.txt guide so Claude can match your texting style

Setup Guide

Step 1: Get Telegram API Credentials

1. Go to https://my.telegram.org/apps
2. Log in and create an application
3. Save your API ID and API Hash

Step 2: Install

```bash

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.