# liagha/termgram [Health: Active]

**Category:** 💬 Communication  
**Repository:** https://github.com/liagha/termgram  
**GitHub Stars:** 0  
**Views:** 1  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/liagha-termgram

## Description
Terminal Telegram client over MTProto: CLI for messages, media and contacts, plus an MCP server that sends notifications when new messages arrive.

## Claude Desktop Quick Installation
No confirmed install details yet, so no config is published. Follow the setup steps in the repository above.

## Documentation

## 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.

_Full upstream README: https://allmcps.com/mcp/liagha-termgram/readme_

