Prototype · Preview: every server in the official registry, synced every 30 minutes. Sign in with Google to write reviews.Prototype · updated every 30 min
PopNx MCPMCP servers for people who use AI · explained in plain words

Telegram MCP

by n24q02mversion 4.24.0i★ 12 (Stars for the whole repo)iRuns on your computer
Registry nameio.github.n24q02m/telegram

How to install

What it does

Telegram for AI agents: messages, chats, media, and contacts in bot and user-account modes.

  • Connects Runs on your computer
  • Account or key Needs TELEGRAM_BOT_TOKEN, TELEGRAM_API_HASH
  • Category Chat & email

Why it ranks here

Lists are ordered by a usage score (out of 100) built from these parts

Popularity7/80GitHub stars or weekly downloads: the larger counts 60, the smaller 20
Freshness12/12Full marks for a release or code change within 30 days
Still answering0/8The cloud endpoint answered at the last check
Usage score19/100

Quality: Passed 3/3 basic checks (shown, not used for ordering) · Momentum: No data yet (Used only on the Trending tab)

Install

Pick the AI app you use, then copy the settings.

Passed 3/3 checks · Runs on your computer · ✓ Commands checked Nov 14, 2026

First: which AI do you use?

Pick your app and the steps appear below.

Works with Claude, with some setup first

You need a Telegram MCP key (create it on the maker’s site) · Install Python (uv) on your computer first (one time) · Only the Claude desktop app (Windows or Mac), not the web or phone

Let AI install it

Copy this message into a Claude chat. The AI checks your computer, tells you which file it will change, and waits for your OK every time.

Please install the MCP server Telegram MCP for Claude on this computer, in this order: 1) Check uv with uv --version. If it is missing, tell me to install it from https://docs.astral.sh/uv/getting-started/installation/; do not install it yourself. 2) Use only this config (already checked by PopNx MCP): { "mcpServers": { "telegram": { "command": "uvx", "args": [ "n24q02m-telegram" ], "env": { "TELEGRAM_BOT_TOKEN": "your-value", "TELEGRAM_API_HASH": "your-value" } } } } 3) Tell me the full path of the file you will change, or the command you will run, and wait for my OK. 4) For TELEGRAM_BOT_TOKEN, TELEGRAM_API_HASH, leave "your-value" in place and tell me to paste the real value myself into the file or the app’s field. Never ask me to type a key in chat. 5) Do what we agreed, then check that the Telegram MCP tools really show up.

This message has no key in it. If a key is needed, the AI will ask you to paste it yourself into the file or the app’s field.

  1. Install uv (if you don’t have it)

    Already installed? Check first · Open Terminal, type this command and press Enter

    uv --version
    • A version number such as uv … = installed, skip this step
    • "command not found" (on Windows: "is not recognized") = not installed yet, or installed but Terminal needs to be closed and reopened
    How to open Terminal

    Mac: press ⌘ + Space, type Terminal, press Enter

    Windows: open Start, type Windows PowerShell, then Open

    Not installed: uv has no click-through installer. Copy the one-line command for your system (macOS or Windows) from uv’s official page into Terminal · no separate Python install needed; uv downloads it when required

    Open the uv download page ↗

    When it’s done, close Terminal, open it again and run the same command. You should see a version number: uv --version

    Install once; it works for everything that needs uv

  2. Sign up and create a Telegram MCP key

    Open the maker’s site, sign up and create an API key for the next step. Check the maker’s site for pricing and free plans.

    How to get a key is in the maker’s README below

  3. Open the Claude desktop app’s settings file

    SettingsDeveloperEdit Config

  4. Paste these settings and save the file

    {
      "mcpServers": {
        "telegram": {
          "command": "uvx",
          "args": [
            "n24q02m-telegram"
          ],
          "env": {
            "TELEGRAM_BOT_TOKEN": "your-value",
            "TELEGRAM_API_HASH": "your-value"
          }
        }
      }
    }

    Paste the key only into the app’s field, never into a chat or to anyone

  5. Quit Claude and open it again

  6. Try it

    Use Telegram MCP and tell me what you can do for me, then show me one thing

    ✓ If Claude says it is using Telegram MCP or shows a Telegram MCP tool in the answer, you are connected

1 optional setting(s) (works without them)

The command above works without these. Add them only if you want to change something, following the maker’s description.

  • TELEGRAM_API_ID Telegram API ID from my.telegram.org (for user mode)

Descriptions are as written by the maker.

Menu names checked against Anthropic’s help page on Nov 11, 2026 · your screen may differ slightly by app version

ChatGPT cannot connect Telegram MCP yet

Telegram MCP runs on your computer, but ChatGPT can only connect servers that run on the web

What you can do instead

A · Use an app that can connect Telegram MCP

  • You need a Telegram MCP key (create it on the maker’s site) · Install Python (uv) on your computer first (one time) · Only the Claude desktop app (Windows or Mac), not the web or phone
  • You need a Telegram MCP key (create it on the maker’s site) · Install Python (uv) on your computer first (one time)
  • You need a Telegram MCP key (create it on the maker’s site) · Install Python (uv) on your computer first (one time)
  • You need a Telegram MCP key (create it on the maker’s site) · Install Python (uv) on your computer first (one time)

B · Others in Chat & email that work with ChatGPT

Picked from the most used in the same category, only ones that connect by address with no key

Works with Claude Code, with some setup first

You need a Telegram MCP key (create it on the maker’s site) · Install Python (uv) on your computer first (one time)

Let AI install it

Copy this message into a Claude Code chat. The AI checks your computer, tells you which file it will change, and waits for your OK every time.

Please install the MCP server Telegram MCP for Claude Code on this computer, in this order: 1) Check uv with uv --version. If it is missing, tell me to install it from https://docs.astral.sh/uv/getting-started/installation/; do not install it yourself. 2) Use only this config (already checked by PopNx MCP): claude mcp add --scope user telegram --env TELEGRAM_BOT_TOKEN=your-value --env TELEGRAM_API_HASH=your-value -- uvx n24q02m-telegram 3) Tell me the full path of the file you will change, or the command you will run, and wait for my OK. 4) For TELEGRAM_BOT_TOKEN, TELEGRAM_API_HASH, leave "your-value" in place and tell me to paste the real value myself into the file or the app’s field. Never ask me to type a key in chat. 5) Do what we agreed, then check that the Telegram MCP tools really show up.

This message has no key in it. If a key is needed, the AI will ask you to paste it yourself into the file or the app’s field.

  1. Install uv (if you don’t have it)

    Already installed? Check first · Open Terminal, type this command and press Enter

    uv --version
    • A version number such as uv … = installed, skip this step
    • "command not found" (on Windows: "is not recognized") = not installed yet, or installed but Terminal needs to be closed and reopened
    How to open Terminal

    Mac: press ⌘ + Space, type Terminal, press Enter

    Windows: open Start, type Windows PowerShell, then Open

    Not installed: uv has no click-through installer. Copy the one-line command for your system (macOS or Windows) from uv’s official page into Terminal · no separate Python install needed; uv downloads it when required

    Open the uv download page ↗

    When it’s done, close Terminal, open it again and run the same command. You should see a version number: uv --version

    Install once; it works for everything that needs uv

  2. Sign up and create a Telegram MCP key

    Open the maker’s site, sign up and create an API key for the next step. Check the maker’s site for pricing and free plans.

    How to get a key is in the maker’s README below

  3. Open Terminal

    Mac: press Command+Space and type Terminal · Windows: open PowerShell

  4. Paste this command and press Enter

    claude mcp add --scope user telegram --env TELEGRAM_BOT_TOKEN=your-value --env TELEGRAM_API_HASH=your-value -- uvx n24q02m-telegram

    Replace “your-value” with your key before pressing Enter

    Paste the key only into the app’s field, never into a chat or to anyone

  5. Type /mcp in Claude Code

    You should see Telegram MCP listed as connected

  6. Try it

    Use Telegram MCP and tell me what you can do for me, then show me one thing

    ✓ If Claude Code says it is using Telegram MCP or shows a Telegram MCP tool in the answer, you are connected

1 optional setting(s) (works without them)

The command above works without these. Add them only if you want to change something, following the maker’s description.

  • TELEGRAM_API_ID Telegram API ID from my.telegram.org (for user mode)

Descriptions are as written by the maker.

Menu names checked against Anthropic’s help page on Nov 11, 2026 · your screen may differ slightly by app version

Works with Cursor, with some setup first

You need a Telegram MCP key (create it on the maker’s site) · Install Python (uv) on your computer first (one time)

Let AI install it

Copy this message into a Cursor chat. The AI checks your computer, tells you which file it will change, and waits for your OK every time.

Please install the MCP server Telegram MCP for Cursor on this computer, in this order: 1) Check uv with uv --version. If it is missing, tell me to install it from https://docs.astral.sh/uv/getting-started/installation/; do not install it yourself. 2) Use only this config (already checked by PopNx MCP): { "mcpServers": { "telegram": { "command": "uvx", "args": [ "n24q02m-telegram" ], "env": { "TELEGRAM_BOT_TOKEN": "your-value", "TELEGRAM_API_HASH": "your-value" } } } } 3) Tell me the full path of the file you will change, or the command you will run, and wait for my OK. 4) For TELEGRAM_BOT_TOKEN, TELEGRAM_API_HASH, leave "your-value" in place and tell me to paste the real value myself into the file or the app’s field. Never ask me to type a key in chat. 5) Do what we agreed, then check that the Telegram MCP tools really show up.

This message has no key in it. If a key is needed, the AI will ask you to paste it yourself into the file or the app’s field.

  1. Install uv (if you don’t have it)

    Already installed? Check first · Open Terminal, type this command and press Enter

    uv --version
    • A version number such as uv … = installed, skip this step
    • "command not found" (on Windows: "is not recognized") = not installed yet, or installed but Terminal needs to be closed and reopened
    How to open Terminal

    Mac: press ⌘ + Space, type Terminal, press Enter

    Windows: open Start, type Windows PowerShell, then Open

    Not installed: uv has no click-through installer. Copy the one-line command for your system (macOS or Windows) from uv’s official page into Terminal · no separate Python install needed; uv downloads it when required

    Open the uv download page ↗

    When it’s done, close Terminal, open it again and run the same command. You should see a version number: uv --version

    Install once; it works for everything that needs uv

  2. Sign up and create a Telegram MCP key

    Open the maker’s site, sign up and create an API key for the next step. Check the maker’s site for pricing and free plans.

    How to get a key is in the maker’s README below

  3. Click this button to open Cursor

    Open in Cursor

    Cursor asks you to confirm; click Install

  4. Fill in your key

    In the Telegram MCP settings, TELEGRAM_BOT_TOKEN, TELEGRAM_API_HASH is empty; add your key and save

    Paste the key only into the app’s field, never into a chat or to anyone

  5. Open the AI chat in Cursor in Agent mode

  6. Try it

    Use Telegram MCP and tell me what you can do for me, then show me one thing

    ✓ If Cursor says it is using Telegram MCP or shows a Telegram MCP tool in the answer, you are connected

1 optional setting(s) (works without them)

The command above works without these. Add them only if you want to change something, following the maker’s description.

  • TELEGRAM_API_ID Telegram API ID from my.telegram.org (for user mode)

Descriptions are as written by the maker.

Menu names checked against Cursor’s help page on Nov 11, 2026 · your screen may differ slightly by app version

Works with VS Code, with some setup first

You need a Telegram MCP key (create it on the maker’s site) · Install Python (uv) on your computer first (one time)

Let AI install it

Copy this message into a VS Code chat. The AI checks your computer, tells you which file it will change, and waits for your OK every time.

Please install the MCP server Telegram MCP for VS Code on this computer, in this order: 1) Check uv with uv --version. If it is missing, tell me to install it from https://docs.astral.sh/uv/getting-started/installation/; do not install it yourself. 2) Use only this config (already checked by PopNx MCP): { "servers": { "telegram": { "type": "stdio", "command": "uvx", "args": [ "n24q02m-telegram" ], "env": { "TELEGRAM_BOT_TOKEN": "your-value", "TELEGRAM_API_HASH": "your-value" } } } } 3) Tell me the full path of the file you will change, or the command you will run, and wait for my OK. 4) For TELEGRAM_BOT_TOKEN, TELEGRAM_API_HASH, leave "your-value" in place and tell me to paste the real value myself into the file or the app’s field. Never ask me to type a key in chat. 5) Do what we agreed, then check that the Telegram MCP tools really show up.

This message has no key in it. If a key is needed, the AI will ask you to paste it yourself into the file or the app’s field.

  1. Install uv (if you don’t have it)

    Already installed? Check first · Open Terminal, type this command and press Enter

    uv --version
    • A version number such as uv … = installed, skip this step
    • "command not found" (on Windows: "is not recognized") = not installed yet, or installed but Terminal needs to be closed and reopened
    How to open Terminal

    Mac: press ⌘ + Space, type Terminal, press Enter

    Windows: open Start, type Windows PowerShell, then Open

    Not installed: uv has no click-through installer. Copy the one-line command for your system (macOS or Windows) from uv’s official page into Terminal · no separate Python install needed; uv downloads it when required

    Open the uv download page ↗

    When it’s done, close Terminal, open it again and run the same command. You should see a version number: uv --version

    Install once; it works for everything that needs uv

  2. Sign up and create a Telegram MCP key

    Open the maker’s site, sign up and create an API key for the next step. Check the maker’s site for pricing and free plans.

    How to get a key is in the maker’s README below

  3. Click this button to open VS Code

    Open in VS Code

    VS Code asks you to confirm; click Install

  4. Fill in your key

    In the Telegram MCP settings, TELEGRAM_BOT_TOKEN, TELEGRAM_API_HASH is empty; add your key and save

    Paste the key only into the app’s field, never into a chat or to anyone

  5. Open the AI chat in VS Code in Agent mode

  6. Try it

    Use Telegram MCP and tell me what you can do for me, then show me one thing

    ✓ If VS Code says it is using Telegram MCP or shows a Telegram MCP tool in the answer, you are connected

1 optional setting(s) (works without them)

The command above works without these. Add them only if you want to change something, following the maker’s description.

  • TELEGRAM_API_ID Telegram API ID from my.telegram.org (for user mode)

Descriptions are as written by the maker.

Menu names checked against VS Code’s help page on Nov 11, 2026 · your screen may differ slightly by app version

Other apps that use MCP, such as Windsurf, Zed or Gemini CLI, each add servers differently. See how in the app list.

See every app that uses MCP →

JSON settings are under “For developers” below

Stuck? Ask people who use Telegram MCP💬 Discussion →
For developers: Terminal commands and JSON settings

Installed on your computer

Claude Code

claude mcp add --scope user telegram --env TELEGRAM_BOT_TOKEN=your-value --env TELEGRAM_API_HASH=your-value -- uvx n24q02m-telegram

Claude Desktop (claude_desktop_config.json)

{
  "mcpServers": {
    "telegram": {
      "command": "uvx",
      "args": [
        "n24q02m-telegram"
      ],
      "env": {
        "TELEGRAM_BOT_TOKEN": "your-value",
        "TELEGRAM_API_HASH": "your-value"
      }
    }
  }
}

Cursor (~/.cursor/mcp.json)

{
  "mcpServers": {
    "telegram": {
      "command": "uvx",
      "args": [
        "n24q02m-telegram"
      ],
      "env": {
        "TELEGRAM_BOT_TOKEN": "your-value",
        "TELEGRAM_API_HASH": "your-value"
      }
    }
  }
}

VS Code (mcp.json)

{
  "servers": {
    "telegram": {
      "type": "stdio",
      "command": "uvx",
      "args": [
        "n24q02m-telegram"
      ],
      "env": {
        "TELEGRAM_BOT_TOKEN": "your-value",
        "TELEGRAM_API_HASH": "your-value"
      }
    }
  }
}

Values you fill in

  • TELEGRAM_BOT_TOKEN secret required env
    Telegram bot token from @BotFather (for bot mode)
  • TELEGRAM_API_ID env
    Telegram API ID from my.telegram.org (for user mode)
  • TELEGRAM_API_HASH secret required env
    Telegram API hash from my.telegram.org (for user mode)

Descriptions are as written by the maker.

These settings are generated from the maker’s registry entry. If the README says otherwise, follow the README.

At a glance

GitHub starsi
12 (Stars for the whole repo)
This repo holds several MCP listings; its stars count once in rankings
Downloads per weeki
188/wk
Licencei
Apache-2.0
Connection
Runs on your computer
Latest versioni
4.24.0
Published to registryi
Nov 12, 2026
Code last changedi
Nov 15, 2026
Maker
n24q02m
Packages
pypi: n24q02m-telegram
oci: docker.io/n24q02m/telegram:latest
Registry status
Active

Which apps can use it

Based on how this server connects and on each app’s own docs, checked Nov 10, 2026.

Run on your computer in

ClaudeGooseLM StudioMsty StudioCherry StudioCursorVS Code + GitHub CopilotVisual StudioWindsurf (Devin Desktop)ZedKiroClineContinueJetBrains AI AssistantClaude CodeCodex CLIGemini CLIOpenCodenodecodeWarpLibreChatRaycast

All apps, with pros and cons →

Related guides

What it can do

Runs on your computer; the tool list appears in your AI app after you install it.

Basic checksi

We check information anyone can see; we have not read the code. Checks that do not apply are left out of the count. · Checked Nov 16, 2026

  • ✓ Pass

    Maker matches the repo

    The registry name was verified with the GitHub account n24q02m, which owns the repo

  • ✓ Pass

    Still maintained

    Code last changed yesterday

  • ✓ Pass

    Has a licence

    Uses Apache-2.0

  • – Not applicable

    Endpoint responds

    This one runs on your computer; there is no internet endpoint

  • – Not applicable

    Sign-in with OAuth

    Runs on your computer and uses local settings instead

  • … Not checked yet

    No hidden instructions in tool descriptions

    Runs on your computer; we can only read tool lists from internet endpoints

Published vulnerabilities (OSV.dev)

No entries on OSV.dev for n24q02m-telegram@4.24.0

Checks only this package version, not every dependency · checked Nov 15, 2026

What we check → · JSON

Makers: ask for a re-check or report wrong info
For makers: add a badge to your README

If you made this, paste this code into your README. The badge links back to this page.

[![Featured on PopNx MCP](https://mcp.popnx.com/badge/n24q02m-telegram.svg)](https://mcp.popnx.com/en/servers/n24q02m-telegram)

Discussion

Ask, share a tip or report that it does not work. Sorted by what people marked helpful.

No posts yet. Be the first to ask or share.

Posts here are written by users, not the PopNx team.

Sign in to post

User reviews

No reviews yet

Sign in to write a review

Compared with others in Chat & emaili

  • More stars than 92% of the other 2072 servers in this category
  • Published to the registry more recently than 88% of the other 2072 servers in this category
  • Basic checks equal to or better than 100% of the other 2072 servers in this category

Compared with every active server in this category in the registry. Stars count only when the publisher owns the repo.

Common questions

Is Telegram MCP safe?

It passed 3 of 3 applicable basic checks. We have not read the code. Before adding a key or token, see what access the server asks for and use a key with only the permissions you need.

What keys or codes does it need?

You need to fill in: TELEGRAM_BOT_TOKEN, TELEGRAM_API_HASH

Does it run on my computer or in the cloud?

It runs on your computer. Your AI app starts it when needed, and data does not pass through the maker’s servers (unless it calls an online service itself).

Is it still maintained?

The GitHub repo last changed yesterday, and the latest version (4.24.0) reached the registry 4 days ago.

Which apps can use it?

Apps that support MCP, such as Claude Desktop, Claude Code, Cursor and VS Code. You also need Python (uv), Docker on your computer.

What can I use instead?

In the same category: draw.io, Vexa, emailmd, Kite Discord Bot Builder, e2a — email for AI agents

Similar alternatives

Same category, other makers, commands already checked. Official ones first, then by stars.

Reading a card:↓ Downloads per weeki★ GitHub starsiThree pillars: reviews · checks · usageiUpdated = latest version published to the registryi

draw.io

Create draw.io diagrams in chat from Mermaid or XML, shown live and interactive. 10,000+ shapes.

by jgraphWidely used★ 5.8KUpdated 6 days ago

Runs in the cloud✓ service owner · draw.ioTried by the PopNx team

Vexa

Meeting bot and transcripts for Google Meet, Teams and Zoom. Live or after, speakers labelled.

by Vexa-aiWidely used★ 3KUpdated 2 months ago

Runs in the cloud✓ service owner · vexa.ai

emailmd

Render markdown into email-safe HTML, lint drafts for deliverability problems, and preview emails.

by anypostWidely used↓ 5.4K/wk★ 1.4KUpdated 2 days ago

Computer or cloud✓ service owner · emailmd.dev

Kite Discord Bot Builder

Build and fix Discord bots from a chat. Kite hosts them 24/7, with no code to deploy.

by merlinfuchsGrowing★ 334 Stars for the whole repoUpdated 19 days ago

Runs in the cloud✓ service owner · kite.onl

e2a — email for AI agents

Authenticated email gateway for AI agents — per-agent inboxes, HITL approval, SPF/DKIM verified.

by tokencanopyGrowing★ 199 Stars for the whole repoUpdated 4 months ago

Runs in the cloud✓ service owner · e2a.dev
Compared with similar ones
This one
Telegram MCP
draw.ioVexaemailmdKite Discord Bot Buildere2a — email for AI agents
Runs whereInstalls on your computerRuns in the cloud, nothing to installRuns in the cloud, nothing to installCloud or install on your computerRuns in the cloud, nothing to installRuns in the cloud, nothing to install
Needs a keyYesNoYesNoNoNo
Add with + in ClaudeNoNoNoNoNoNo
Basic checks3/34/42/45/54/44/4
LicenseApache-2.0Apache-2.0Apache-2.0MITAGPL-3.0Apache-2.0
PriceNo cost listed in the registryNo cost listed in the registryNo cost listed in the registryNo cost listed in the registryNo cost listed in the registryNo cost listed in the registry

README from the maker

Open the README

Copied from the maker’s repo as written. PopNx MCP has not reviewed or endorsed it. HTML, images and scripts are removed. Links lead off this site.

telegram

mcp-name: io.github.n24q02m/telegram

Telegram for AI agents: messages, chats, media, and contacts in bot and user-account modes.

Sister projects from n24q02m (click to expand)

ProjectTaglineTag
agent-chat-pluginPeer AI agents chat in a shared folder — no human relay, no orchestrator, wor...Tooling
better-code-review-graphKnowledge graph for token-efficient code reviews -- semantic search and call-...MCP
better-drive2-way Google Drive sync with .driveignore filter — rclone engine, Windows trayTooling
better-email-mcpIMAP/SMTP email for AI agents -- read, send, organize folders, and manage att...MCP
better-godot-mcpComposite MCP server for Godot Engine -- 17 composite tools for AI-assisted g...MCP
better-notion-mcpMarkdown-first Notion for AI agents -- pages, databases, blocks, and comments...MCP
better-semantic-releaseDrop-in python-semantic-release fork with built-in release-safety guards (orp...Tooling
telegramTelegram for AI agents -- messages, chats, media, and contacts across both bo...MCP
better-workspace-mcpGoogle Workspace MCP server (Docs/Drive/Calendar/Gmail/Sheets/Slides/Tasks/Ch...MCP
claude-pluginsClaude Code plugin marketplace for the n24q02m MCP servers -- install web sea...Marketplace
imagine-mcpImage and video understanding + generation for AI agents -- across Gemini, Op...MCP
jules-task-archiverChrome Extension for bulk operations on Jules tasks via batchexecute API -- a...Tooling
mcp-coreShared foundation for building MCP servers -- Streamable HTTP transport, OAut...MCP
mnemo-mcpPersistent AI memory with hybrid search and embedded sync. Open, free, unlimi...MCP
qwen3-embedLightweight Qwen3 text embedding and reranking via ONNX Runtime and GGUFLibrary
skretSecrets without the server.CLI
tacetA self-distilling neuro-symbolic cascade that amortises LLM cost across knowl...Tooling
web-coreShared web infrastructure package for search, scraping, HTTP security, and st...Library
wet-mcpOpen-source MCP server for AI agents: web search, content extraction, and lib...MCP

Table of contents

  • Features
  • Install
  • Setup
  • Smithery
  • Configuration
  • HTTP mode
  • CLI
  • Tools
  • Comparison
  • Security
  • Build from Source
  • Trust Model
  • License

Features

  • Dual mode -- Bot API (httpx) for bots, MTProto (Telethon) for user accounts
  • 6 tools with action dispatch: message, chat, media, contact, config, help
  • Auto-detect mode -- Set a bot token for bot mode, or a phone number for user mode
  • Local CLI auth -- telegram auth handles the bot token, or phone + OTP + 2FA, on the machine that runs the server
  • Stdio or HTTP -- stdio by default; HTTP with no-auth (loopback only), a single bearer token, or per-user tokens
  • Tool annotations -- Each tool declares readOnlyHint, destructiveHint, idempotentHint, openWorldHint
  • MCP Resources -- Documentation available as telegram://docs/* resources
  • Security hardened -- SSRF protection, path traversal prevention, error sanitization, prompt-injection boundary tags on Telegram content

Install

# Claude Code plugin (stdio, bot mode)

/plugin marketplace add n24q02m/claude-plugins /plugin install telegram@n24q02m-plugins

Direct uvx invocation (stdio, bot mode)

claude mcp add telegram -e TELEGRAM_BOT_TOKEN=123456:ABC-DEF -- uvx n24q02m-telegram

Docker stdio

docker run -i --rm -e TELEGRAM_BOT_TOKEN=123456:ABC-DEF n24q02m/telegram

The package is n24q02m-telegram (formerly better-telegram-mcp; the old package receives one final release then freezes). The MCP Registry id is io.github.n24q02m/telegram, the Docker image is n24q02m/telegram, and the legacy better-telegram-mcp command is kept as an alias of telegram. The pre-rename registry entry io.github.n24q02m/better-telegram-mcp stays frozen in the registry and is never republished. Local data moves once from ~/.better-telegram-mcp to ~/.telegram on first start.

Install matrix
ClientInstall
Claude Code/plugin marketplace add n24q02m/claude-plugins + /plugin install telegram@n24q02m-plugins (stdio bot mode), or claude mcp add as in the block above
Cursor / Windsurf / Gemini CLI / any MCP clientmcpServers JSON in the client's config: stdio command, or type: "http" + url pointing at a server you run (see HTTP mode)

Install with AI agent -- paste this to your AI coding agent:

Install MCP server telegram following the steps at

https://raw.githubusercontent.com/n24q02m/claude-plugins/main/plugins/telegram/setup-with-agent.md

Setup

Credentials are configured on the machine that runs the server.

Bot mode: set TELEGRAM_BOT_TOKEN in the client config, or save it once:

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

User mode: sign in interactively with your phone number. Telegram sends an OTP; a 2FA password is prompted if the account has one. The Telethon session is stored on disk.

telegram auth --phone +15551234567

Check the result with telegram status. The server reads saved credentials at startup, so restart it after telegram auth. Without any credentials the stdio server prints these instructions to stderr and exits with status 1.

Smithery

Also listed on Smithery. Per smithery.yaml, Smithery starts the server over stdio with uvx --python 3.13 n24q02m-telegram and takes no install-time configuration (empty configSchema). Credentials come from the TELEGRAM_BOT_TOKEN env var or a prior telegram auth (see Setup).

Configuration

Settings load from TELEGRAM_-prefixed environment variables (Pydantic Settings). Env vars take precedence over credentials saved by telegram auth.

VariableRequiredDescription
TELEGRAM_BOT_TOKENBot modeBot token from @BotFather (format 123456789:ABCdef...)
TELEGRAM_PHONEUser modePhone number in + form
TELEGRAM_API_ID / TELEGRAM_API_HASHNoOverride the bundled public API pair
USE_BUNDLED_TELEGRAM_CLIENTNoSet to false to require your own API pair
TELEGRAM_SESSION_NAMENoTelethon session file name (default default)
TELEGRAM_DATA_DIRNoSession directory (default ~/.telegram)
MCP_TRANSPORTNoSet to http to start in HTTP mode (--http or TRANSPORT_MODE=http also work)

There is no TELEGRAM_PASSWORD env var: telegram auth prompts for the 2FA password and never stores it in the environment.

HTTP mode

telegram --http serves MCP at /mcp and an unauthenticated GET /health. Settings live in ~/.telegram/config.toml:

[server]

host = "127.0.0.1" # default; --host overrides port = 8000 # default; --port overrides auth = "token" # "no-auth" | "token" | "multi" token_hash = "scrypt$..."

authWho can connectCredentials used
no-authAnyone who can reach the port; loopback binds only (a non-loopback host is refused)The default credentials
tokenClients sending Authorization: Bearer matching token_hashThe default credentials
multiUsers listed in users.toml (default ~/.telegram/users.toml), each with their own tokenEach user's own namespace

Create a token hash with telegram token hash (it reads the token from stdin or a prompt, never from the command line). In multi mode, add users by editing users.toml and restarting the server:

[users.alice]

token_hash = "scrypt$..." enabled = true namespace = "alice"

Then authorize Telegram for that user on the server machine:

telegram auth --phone +15551234567 --user alice

To reach a server on another machine, put it behind a TLS-terminating reverse proxy or a private network and use token or multi auth.

CLI

The telegram console script (installed by uvx / pip; better-telegram-mcp is a legacy alias) starts the MCP server when run without a subcommand. Flags that are not a subcommand are passed through to the server (for example --http, --host, --port).

telegram            # start the MCP server (stdio)

telegram --http # start in HTTP mode telegram --version # print the version

SubcommandUsageDescription
authauth --bot-token or auth --phone <+number>, optional --user Authorize this machine. Bot mode validates the token; phone mode runs the interactive OTP/2FA flow and stores the Telethon session on disk
loginSame arguments as authDeprecated alias of auth
logoutlogout [--yes] [--user ]Revoke the Telegram session, delete the session file and the saved credentials

| `c

Only the beginning is shown; read the rest in the repo