MCP Telegram logo

MCP Telegram

Connects MCP clients to a signed-in Telegram user account for reading, searching, messaging, media, and moderation.

Install MCP Telegram

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": {
    "mcp-telegram": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-telegram"
      ],
      "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.

Install not yet sandbox-tested— we haven't run this command through our automated sandbox yet. Not a red flag; we're working through the catalog.

Overview

mcp-telegram MCP server connects MCP clients to a real Telegram user account through MTProto, without requiring a bot. It provides 102 tools for browsing dialogs, searching messages, sending and editing content, handling media, moderating channels, and calling raw MTProto methods. Sign-in runs through a local browser flow, with sessions stored on the machine. Reach for it when an agent needs broad user-account access to Telegram rather than bot-only operations.

Use cases

  • Search messages across all Telegram chats
  • Send, edit, forward, and react to messages
  • Download media and transcribe voice notes
  • Moderate channels and manage forum topics
  • Manage multiple signed-in Telegram accounts

Key features

  • MTProto access through a real Telegram user account
  • 102 tools for Telegram account operations
  • Browser-based local sign-in
  • Global and dialog-level message search
  • Channel moderation and administration
  • Raw MTProto method invocation

Tools80

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

Self-reported~991 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.

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned just now via OSV.dev · mcp-telegram (npm)

Adoption & maintenance

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

GitHub stars34Stargazers on the source repository.
npm downloads1.1kPackage downloads in the last 30 days.
Last commit6mo agoMost recent push to the default branch.
Tools exposed80Callable tools this server registers over MCP.

How MCP Telegram works

What mcp-telegram does

mcp-telegram exposes a Telegram user account to MCP-compatible clients through the Model Context Protocol and Telegram’s MTProto API. The account can be used to inspect conversations, search across chats, send and modify messages, exchange files, manage channels, and perform account-level actions.

The package includes 102 tools. Its surface covers ordinary messaging tasks as well as less common Telegram operations, including stories, contacts, drafts, notifications, folders, privacy settings, forum topics, invite links, slow mode, administrator logs, and channel membership controls. The invoke_mtproto tool provides a route to raw MTProto methods when a higher-level tool is not sufficient.

Unlike a bot integration, the server operates with a signed-in Telegram user account. The peer parameter can identify a destination with a numeric chat ID, an @username, or me for Saved Messages. Tools also accept an optional accountId when multiple accounts are configured.

How it works

The server runs as a local stdio MCP process, normally launched with npx -y mcp-telegram. MCP clients call its tools, while the server communicates with Telegram over MTProto. A first sign-in is initiated through the login tool: a browser tab opens for the phone number, verification code, and optional two-factor authentication password.

After authentication, the session is saved in ~/.telegram-agent/. The same local session store can be used by the companion telegram-agent package. Running list_accounts shows available signed-in accounts; logout removes a local session and revokes it on Telegram.

The complete tool schema is approximately 12,700 tokens, so the full MCP surface remains in the agent context on each turn. The server is intended for clients and hosted runtimes that can run a standard MCP process. The companion skill-based package is an alternative for selected agent environments that need lower idle context usage.

Setup and configuration

Node.js 20 or newer and Telegram API credentials are required. Create an application at my.telegram.org/apps, then provide its api_id and api_hash as environment variables:

  • TELEGRAM_API_ID
  • TELEGRAM_API_HASH

Installation can be automated with npx add-mcp mcp-telegram, which writes client configuration for supported MCP applications. Manual stdio configuration uses npx as the command, -y mcp-telegram as its arguments, and the two Telegram credentials in the process environment.

For example, a client configuration supplies the package through command: "npx", with args: ["-y", "mcp-telegram"]. After adding it, ask the connected agent to sign in to Telegram. Additional accounts can be added by invoking login again.

Protect ~/.telegram-agent/ as a credential store. It contains the local sessions for the signed-in accounts.

Tools and capabilities

Core tools include:

  • list_dialogs, search_dialogs, and list_folders for finding chats and organizing dialog discovery.
  • list_messages, get_message, search_messages, and search_global for reading and searching messages, including filters such as sender, content type, and date range.
  • send_message, edit_message, delete_messages, forward_messages, and reactions for message operations.
  • send_file, download_media, and transcribe_message for media exchange and voice or video-note transcription when Telegram Premium supports it.
  • pin_message, mark_as_read, and channel administration tools for conversation and moderation workflows.
  • get_me, profile tools, contact management, drafts, notifications, privacy, stories, and other account features.
  • invoke_mtproto for direct access to MTProto methods, with automatic resolution of common peer, channel, and user strings.

The server can moderate channels through actions such as banning, restricting, promoting, managing invite links, configuring slow mode, reviewing administrator logs, and working with forum topics. It can also tag Saved Messages by using me as the peer.

Limitations and notes

This integration uses a real Telegram user account rather than a bot, so actions and access reflect that account’s permissions. The server requires Telegram API credentials and an interactive first-time sign-in. Voice and video-note transcription requires Telegram Premium.

All tool schemas are loaded by the MCP server, which adds roughly 12,700 tokens to the agent context on every turn. For Claude Code, Codex CLI, Cursor, Gemini CLI, Cline, or Windsurf, the separate telegram-agent package offers the same Telegram surface as a skill that loads only when Telegram is mentioned; it is not an MCP server but shares the session directory.

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 MCP Telegram

mcp-telegram is an MCP server that connects MCP clients to a real Telegram user account through MTProto. Its main tools cover account sign-in, dialog and message search, sending and editing messages, media transfer, channel moderation, and direct invocation of raw MTProto methods without requiring a bot.

Install it with `npx add-mcp mcp-telegram` or add a manual stdio configuration that runs `npx -y mcp-telegram`. Set `TELEGRAM_API_ID` and `TELEGRAM_API_HASH` using credentials from `my.telegram.org/apps`, then ask the connected agent to sign in.

Ask the connected agent to call the `login` tool. A browser tab opens for the phone number, SMS code, and optional 2FA password. After successful sign-in, the session is stored in `~/.telegram-agent/`, and `list_accounts` can show signed-in accounts.

Yes. Cursor is listed as a supported MCP client. Add the server to `~/.cursor/mcp.json` with `npx -y mcp-telegram` and provide `TELEGRAM_API_ID` and `TELEGRAM_API_HASH` in the server environment.

Yes. Call `login` again to add another account, then use the optional `accountId` parameter on tools to select which signed-in account performs an operation.

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