Termgram logo

Termgram

by liagha

Connects MCP clients to Telegram over MTProto with messaging, search, account tools, and pushed message notifications.

Install Termgram

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

No confirmed install command yet

We only publish a config when the install details come from the project itself — its README, its docs, or a verified owner. We haven’t found those for liagha/termgram, and we’d rather show nothing than a guess you’d paste into your client.

Open setup steps on GitHub

Overview

liagha/termgram MCP server exposes a Telegram account over MCP using the native MTProto protocol and stdio transport. Every termgram CLI command is available as an MCP tool, including sending messages and media, searching chats, managing contacts, and handling administrative actions. Reach for it when an agent needs to read or act on Telegram conversations, or receive new-message notifications without polling.

Use cases

  • Send Telegram messages and media from an AI workflow
  • Search synchronized Telegram chats for prior messages
  • Monitor selected chats for incoming-message notifications
  • Manage contacts, drafts, reactions, and chat administration
  • Export or restore termgram account data

Key features

  • Telegram MTProto connectivity
  • stdio MCP transport
  • CLI commands exposed as MCP tools
  • Local chat search mirror
  • Server-to-client message notifications
  • Per-chat notification filtering

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.

12/12 checks healthy over the last 44d

Adoption & maintenance

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

Last commit22d agoMost recent push to the default branch.
Directory activity1 viewsConfig copies, upvotes, and views on AllMCPs.

How Termgram works

What liagha/termgram does

The liagha/termgram MCP server connects an MCP client to a Telegram account through MTProto, using the same account session as the termgram command-line client. It is not based on Telegram’s Bot API and does not require an external service. The server exposes the CLI’s command surface to an agent, covering chat access, messaging, search, account data, and selected administration tasks.

Its notification path is also part of the MCP server. New incoming messages can be sent to the connected client as custom server-to-client notifications. Notifications include fields such as chat ID, message ID, timestamp, sender, text, outgoing status, and detected media type.

How it works

The server communicates over stdio, so an MCP client starts termgram-mcp as a local process. A single Telegram login is shared by the CLI, MCP server, and notification service. Telegram connectivity is maintained through the account’s MTProto session rather than through polling commands.

Push notifications are disabled initially. An agent can use the notify tool to enable messages for one chat, enable them for all chats, or turn them off. The server can therefore wait for account activity while keeping notification scope under tool control.

Setup and configuration

Create a Telegram application at my.telegram.org/apps to obtain an API ID and API hash. Put those values in ~/.config/termgram/config.toml, then run the login flow with termgram login and the verification code. The resulting session is stored in ~/.config/termgram/session.db and is reused by the MCP process.

Build the workspace with Cargo and place termgram-mcp on the executable path, or install the MCP crate with Cargo. Register its local executable using the command field in the MCP client configuration. The --catalog option starts a discovery-only mode that does not connect to Telegram or require credentials.

Tools and capabilities

Because every CLI command is exposed, the available surface includes:

  • Send, edit, delete, forward, reply to, schedule, and cancel messages.
  • Send text with plain, Markdown, or HTML formatting, plus photos, documents, voice notes, albums, polls, and forum-topic messages.
  • Read dialogs and messages, mark chats read, watch chats, and retrieve profiles or online status.
  • Search the local mirror or use chat-specific and global Telegram search; missing chats can be synchronized automatically.
  • Work with drafts, reactions, pins, contacts, folders, members, and administrative actions such as kick, ban, unban, and promote.
  • Export, import, or wipe the local account data exposed by termgram.

Limitations and notes

The MCP server requires a configured Telegram API ID, API hash, and authenticated session. It is a local stdio process, not a hosted HTTP MCP endpoint. Its notification stream represents the account’s incoming events, but activity occurring on another live termgram session may remain associated with that session instead of appearing in the current stream.

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 Termgram

liagha/termgram is an MCP server that connects an authenticated Telegram account to AI clients over MTProto and stdio. Its main tools expose termgram’s CLI commands for sending messages and media, searching chats, managing account data, and controlling pushed notifications for new incoming messages.

Install it with Cargo or build the workspace and put the resulting `termgram-mcp` binary on your PATH. Configure Telegram API credentials, complete `termgram login`, then register the executable in your MCP client with a local stdio command.

Yes, it can be registered in Cursor as a standard local stdio MCP server.

Enable push delivery with the `notify` tool. Set `on` to true with a chat target to filter notifications to one chat, or omit the target to receive messages from every chat; notifications are off by default.

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 PreviewTermgram AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/liagha-termgram?style=directory)](https://allmcps.com/mcp/liagha-termgram)
HTML Embed
<a href="https://allmcps.com/mcp/liagha-termgram"><img src="https://allmcps.com/api/badge/liagha-termgram?style=directory" alt="Termgram on AllMCPs" /></a>