Telegram logo

Telegram

Connects AI agents to Telegram messages, chats, media, and contacts through bot or user-account access.

Install Telegram

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

STDIOPython
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "telegram-2": {
      "command": "uvx",
      "args": [
        "n24q02m-telegram"
      ],
      "env": {
        "TELEGRAM_BOT_TOKEN": "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.

uvx n24q02m-telegram

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

The telegram MCP server connects AI agents to Telegram through either the Bot API or Telethon-based MTProto user accounts. It exposes six action-oriented tools for messages, chats, media, contacts, configuration, and help. Choose it when an agent needs to read or manage Telegram data, send messages, or work with media and contacts. It runs over stdio by default and can also serve MCP over HTTP.

Use cases

  • Send messages through a Telegram bot
  • Read and manage Telegram chats
  • Work with Telegram media
  • Look up and manage Telegram contacts
  • Connect an agent to a full Telegram user account

Key features

  • Bot API and MTProto user-account modes
  • Message, chat, media, and contact tools
  • Automatic mode selection from configured credentials
  • stdio and HTTP transports
  • MCP documentation resources
  • SSRF, path traversal, and prompt-injection safeguards

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.

4/4 checks healthy over the last 16d

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 16d ago via OSV.dev · n24q02m-telegram (PyPI)

Adoption & maintenance

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

GitHub stars13Stargazers on the source repository.
Last commit4d agoMost recent push to the default branch.
Install checkInconclusiveDidn't respond in our test window — often a slow first install.

How Telegram works

What telegram does

The telegram MCP server gives AI agents access to Telegram communication data and actions. It supports two authentication models: bot accounts through Telegram's Bot API and full user accounts through MTProto via Telethon. That makes it suitable for workflows that need either a bot's scoped access or an authenticated personal account.

Its capabilities cover messages, chats, media, and contacts. The server groups these operations into six MCP tools: message, chat, media, contact, config, and help. MCP resources under telegram://docs/* provide server documentation to connected clients.

How it works

The server uses bot mode when a Telegram bot token is available and user mode when a phone number and locally authenticated Telethon session are used. Authentication is performed on the machine running the server. For user accounts, telegram auth --phone starts an interactive flow that accepts the Telegram OTP and, when enabled, a two-factor authentication password.

After authentication, saved credentials are read when the process starts. Restart the server after completing telegram auth. With no credentials available, the stdio process prints setup instructions to stderr and exits with status 1.

stdio is the default transport. HTTP mode is also available with loopback-only unauthenticated access, one bearer token, or per-user tokens. Each MCP tool declares annotations such as read-only, destructive, idempotent, and open-world hints.

Setup and configuration

Install the n24q02m-telegram package with uvx, run the n24q02m/telegram Docker image, or install the Telegram plugin through the author's Claude Code plugin marketplace. The legacy better-telegram-mcp command remains available as an alias, while the package and registry identity use telegram.

For bot mode, provide TELEGRAM_BOT_TOKEN in the MCP client's environment or save the token with:

bash
telegram auth --bot-token 123456:ABC-DEF

For user mode, authenticate interactively:

bash
telegram auth --phone +15551234567

Credentials are configured on the host running the server. Environment variables take precedence over credentials saved by the authentication command. Saved local data is stored under ~/.telegram; data from the former package location is moved there once on first start.

Tools and capabilities

  • message for message-related Telegram operations.
  • chat for chat-related operations.
  • media for working with Telegram media.
  • contact for contact-related operations.
  • config for server configuration operations.
  • help for tool and usage help.
  • MCP documentation resources available at telegram://docs/*.
  • Prompt-injection boundary tags applied to Telegram content returned to agents.

Limitations and notes

Bot and user modes use different Telegram interfaces and authentication flows. User mode requires an interactive phone, OTP, and optional 2FA sign-in before the server can use the account. The process must be restarted after credentials are saved with telegram auth.

HTTP deployments require an explicit authentication choice unless access is restricted to the loopback interface. The server includes protections for SSRF and path traversal and sanitizes errors before returning them to clients.

The package is licensed under Apache-2.0. Docker and stdio installation paths are available, and the server can be configured in clients that accept MCP stdio or HTTP connections.

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

telegram is an MCP server that connects AI agents to Telegram through the Bot API or Telethon-based MTProto user accounts. Its main tools handle messages, chats, media, contacts, configuration, and help. It supports bot and full user-account modes, with stdio as the default transport and HTTP available for self-hosted deployments.

Install it with `uvx`, Docker, or the author's Claude Code plugin. The package is `n24q02m-telegram`, and the Docker image is `n24q02m/telegram`. For direct stdio use, configure the MCP client to run `uvx n24q02m-telegram` with the required environment variables.

Authenticate with a bot token or a Telegram user account. Set `TELEGRAM_BOT_TOKEN` for bot mode, or run `telegram auth --bot-token ...`. For user mode, run `telegram auth --phone ...`, complete the OTP and optional 2FA prompts, then restart the server.

Yes. Cursor is listed as a supported client. Configure its MCP settings with either a stdio command or an HTTP URL pointing to a running telegram server.

Yes. HTTP mode supports loopback-only access without authentication, a single bearer token, or per-user tokens. The default transport remains stdio, so HTTP is intended for deployments where a client connects to a separately running server.

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