Telegram MCP logo

Telegram MCP

by @bstuff

Read and manage a personal Telegram account through MCP, including chats, messages, media, scheduling, polls, and reactions.

Install Telegram MCP

Pick your client, then add it in one click or paste the config.

STDIONode.js
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "bstuff-telegram-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@bstuff/telegram-mcp"
      ],
      "env": {
        "TELEGRAM_API_ID": "YOUR_VALUE_HERE",
        "TELEGRAM_API_HASH": "YOUR_VALUE_HERE"
      }
    }
  }
}

Settings → Developer → Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.

Values are written into the snippet above so you can paste it as is. They never leave your browser.

We couldn’t confirm it starts correctly

We ran the install command but it didn't respond within our test window — this can mean a slow first-time install rather than a real problem.

npx -y @bstuff/telegram-mcp

No response to initialize.

This is an experimental automated check and can have false negatives — missing environment variables, a slow cold install, etc. It doesn’t necessarily mean something’s wrong. Last checked .

Overview

@bstuff/telegram-mcp connects an MCP-compatible assistant to a personal Telegram account through MTProto, rather than using a bot account. It provides tools for browsing chats, searching and analyzing messages, sending and editing content, handling media, scheduling messages, and running polls. Chat references can use IDs, usernames, t.me links, Saved Messages, or title fragments, while time filters accept relative and timestamp formats. Reach for it when an agent needs to inspect or operate a regular Telegram account from an MCP client.

Use cases

  • Catch up on unread Telegram conversations without marking them read
  • Summarize activity and discussions in a work chat
  • Schedule messages, reminders, replies, and channel comments
  • Create polls, collect votes, and inspect final results
  • Monitor a chat for a matching message with the watch command

Key features

  • Search chats, messages, replies, members, and public Telegram entities
  • Read histories, unread items, drafts, scheduled messages, and media
  • Send, edit, delete, forward, schedule, react to, pin, and mute messages
  • Create and manage multiple-choice polls and quizzes
  • Download attachments and send local files or URLs
  • Analyze chat activity by participant, time, links, media, and reactions

Tools30

What Telegram MCP lets your agent do. Expand a tool for its parameters.

Self-reported~471 tokens of context

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked

Recent health check succeeded.

6/6 checks healthy over the last 21d

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 4d ago via OSV.dev · @bstuff/telegram-mcp (npm)

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars4Stargazers on the source repository.
npm downloads147Package downloads in the last 30 days.
Last commit2mo agoMost recent push to the default branch.
Install checkInconclusiveDidn't respond in our test window — often a slow first install.
Tools exposed30Callable tools this server registers over MCP.

How Telegram MCP works

What @bstuff/telegram-mcp does

@bstuff/telegram-mcp exposes a personal Telegram account to an MCP client through Telegram’s MTProto interface. It is intended for regular user accounts, not bot accounts, and supports much of the day-to-day activity available in a Telegram client.

The server covers both observation and account actions. An assistant can identify the signed-in account, inspect dialogs and participants, read history, search messages, review replies and reactions, summarize chat activity, retrieve drafts and scheduled messages, and inspect unread content without marking it read. It can also send, edit, delete, forward, schedule, react to, pin, mute, and mark messages as read.

Poll management includes creating multiple-choice and quiz polls, setting automatic closure, checking results, voting, and closing polls. Other account actions include sending files, downloading media, showing typing status, sending Telegram dice, and selecting a random group member.

How it works

The server runs as a TypeScript program under Node.js 22.18 or newer and communicates with the MCP client over the configured command-based connection. Telegram credentials are established with the login command, which signs in by phone number and stores the session at ~/.telegram-mcp/session with restrictive permissions. The check command verifies that the saved session still works.

Each tool accepts a chat reference in several forms: a numeric Telegram ID, an @username, a https://t.me/username link, me for Saved Messages, or part of a dialog title. Title fragments are resolved from the most recent cached dialogs; ambiguous fragments return candidates instead of selecting one. Date and scheduling parameters support values such as 7d, 36h, today, ISO-like dates, and Unix timestamps.

A separate watch CLI waits for a matching message and exits when one arrives. It can filter by chat, sender, text, regular expression, mentions, replies, count, timeout, or JSON output. It is designed to be run as a background process rather than exposed as an MCP tool.

Setup and configuration

Install and authenticate from npm with:

Terminal
npx @bstuff/telegram-mcp login
npx @bstuff/telegram-mcp check

The account requires a Telegram application ID and hash. Set TELEGRAM_API_ID and TELEGRAM_API_HASH in a checkout’s .env, in ~/.telegram-mcp/.env for an npm installation, or provide them when prompted by the login command. These values come from Telegram’s API development tools at my.telegram.org; the hash should be treated as a secret.

A standard MCP configuration launches the package with npx -y @bstuff/telegram-mcp. Claude Code can add this command with claude mcp add, and Claude Desktop can use the same command in its mcpServers configuration. Claude Desktop also supports packaging a thin launcher as a .mcpb extension, with settings for read-only mode and timezone.

Tools and capabilities

The tools are grouped around several workflows:

  • Discover chats, account identity, members, administrators, public users, groups, and channels.
  • Retrieve history, unread messages, drafts, scheduled messages, media, replies, reactions, links, and forwarded content.
  • Produce chat-period statistics covering participants, activity timing, links, media, and highly reacted messages.
  • Send text, replies, channel comments, files, forwarded messages, reactions, pins, typing indicators, and scheduled messages.
  • Edit or delete messages, clear unread state, mute chats, cancel scheduled messages, and download attachments.
  • Create, inspect, answer, and close polls, including quizzes with correct answers and explanations.

Limitations and notes

Deleting messages cannot be undone. The server uses the permissions and access available to the signed-in Telegram account. The dialog-title lookup only considers the configured recent-dialog cache, which defaults to 400 dialogs. Claude Desktop should use either the direct MCP configuration or the extension, not both, to avoid duplicate tools.

Written by AllMCPs with AI assistance from the project’s README and listing data. How we build listings

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Telegram MCP

@bstuff/telegram-mcp is an MCP server that connects an AI assistant to a personal Telegram account over MTProto. Its main tools read chats and messages, search history, send and edit messages, forward content, manage polls, handle media, schedule messages, and control read, mute, pin, and reaction state.

Install it through npm with `npx @bstuff/telegram-mcp login`, then run `npx @bstuff/telegram-mcp check` to verify the saved session. Set `TELEGRAM_API_ID` and `TELEGRAM_API_HASH` in `.env` or `~/.telegram-mcp/.env`, or enter them when prompted during login.

Add an `mcpServers` entry that launches `npx -y @bstuff/telegram-mcp`, or build and install the provided `.mcpb` extension. Use only one of these connection methods so Claude Desktop does not display duplicate tools.

No, it signs in to and operates a personal Telegram account through MTProto. The login process uses a phone number and stores the resulting session locally at `~/.telegram-mcp/session`.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewTelegram MCP AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/bstuff-telegram-mcp?style=directory)](https://allmcps.com/mcp/bstuff-telegram-mcp)
HTML Embed
<a href="https://allmcps.com/mcp/bstuff-telegram-mcp"><img src="https://allmcps.com/api/badge/bstuff-telegram-mcp?style=directory" alt="Telegram MCP on AllMCPs" /></a>