Telegram MCP server

Telegram MCP server

mcp-telegram-tacticlaunch•bytacticlaunch

An MCP server that connects MCP-compatible clients to a real Telegram user account via MTProto, letting agents read, search, send, moderate, and manage Telegram chats.

License: MIT•Runtime: Awaiting documentation review•Category: communication social

WHAT IT DOES

  • •Provides 102 tools covering the Telegram user-account surface, including reading, searching, sending, and moderating chats.
  • •Signs in as a real Telegram user account via a browser-based local sign-in flow, with no bot required.
  • •Supports multiple accounts through a login tool and lists signed-in accounts.
  • •Can call any raw MTProto method by name for operations not covered by dedicated tools.

BEST FOR

  • •Agents that need to read, search, and send Telegram messages from automated tool calls instead of the Telegram UI.
  • •Moderating Telegram channels and groups, including bans, restrictions, promotions, invite links, and admin logs.
  • •Managing Telegram media, such as downloading files and transcribing voice notes.

ABOUT MCP-TELEGRAM-TACTICLAUNCH

Telegram MCP server is cataloged as an MCP server attributed to tacticlaunch. An MCP server that connects MCP-compatible clients to a real Telegram user account via MTProto, letting agents read, search, send, moderate, and manage Telegram chats. It is categorized under communication social. See the capability inspector for recorded interfaces and their independent review status; consult upstream documentation for the current interface.

HOW TO INSTALL

Installation configuration is not reviewed. No executable setup is offered for this entry; inspect the source repository before proceeding.

LICENSE

Catalog license label: MIT. Check the source repository's current license and terms before using, modifying or distributing this software.

Capability inspector

Capability definitions are not reviewed. Unreviewed imports are not exposed as trusted interfaces.

Tools (0)

No reviewed records to display. This does not establish that upstream lacks this capability.

Resources (0)

No reviewed records to display. This does not establish that upstream lacks this capability.

Prompts (0)

No reviewed records to display. This does not establish that upstream lacks this capability.

NEWSLETTER - COMING LATER

Newsletter subscriptions are not open yet

Email delivery is not connected. This page does not collect email addresses or create subscriptions.

Browse the registry for current listings instead.

Community Reviews

Coming later

Reviews for Telegram MCP server are not available yet

Review publishing and storage are not connected. This page does not collect or publish ratings or comments, including after sign-in.

FREQUENTLY ASKED QUESTIONS

Does this server use a Telegram bot?

No. It signs in as a real Telegram user account via MTProto and does not require a bot.

Where are Telegram sessions stored?

Sessions are stored locally in the ~/.telegram-agent/ directory.

Can the exposed tools be limited to read-only or specific tools?

Yes. Environment variables can hide destructive tools, set a strict allowlist, or apply a blocklist.

Upstream README

View this exact version on GitHub

README.md · f61b257a89b2 · Fetched 2026-11-13 09:54:03 UTC

Original upstream text, without AI rewriting. Scripts, forms and unsafe links are filtered for safety.

Showing the last retrieved documentation snapshot; check the source for current changes.

mcp-telegram

mcp-telegram

Telegram MCP server for Claude, Codex, Cursor, Claude Code, VS Code, Cline, Windsurf, and other MCP clients. Real Telegram user account via MTProto, browser-based local sign-in, 100+ tools. Need lazy-loading + lower context cost? See telegram-agent, the skill-based companion.

npm version License Node

A Model Context Protocol (MCP) server that connects Claude Desktop, Codex CLI, Cursor, Claude Code, VS Code, Cline, Windsurf, Goose, and any other MCP-compatible client to a real Telegram user account via MTProto—so your agent can read, search, send, moderate, and manage Telegram chats from chat or automated tool calls instead of clicking through the Telegram UI.

Use it to: read dialogs and search messages globally · send/edit/forward/react/poll · download media and transcribe voice notes · moderate channels (ban/restrict/promote, invite links, slow-mode, admin log, forum topics) · manage stories, contacts, drafts, notifications, folders, privacy · or fall through to the raw MTProto bridge for anything else. All against a single signed-in user account—no bot required.

[!WARNING] This server signs in as a real Telegram user (not a bot). Sessions live in ~/.telegram-agent/. Treat that directory like a password.

Prerequisites

  1. Node.js >=20
  2. Telegram API credentials from my.telegram.org/apps — api_id and api_hash

Want a lighter transport?

This package is the MCP server — every tool schema (~12,700 tokens) sits in your agent's context on every turn. Good for any MCP client and for hosted runtimes that can't shell out.

If your agent is Claude Code / Codex CLI / Cursor / Gemini CLI / Cline / Windsurf, there's a companion package — telegram-agent — that ships the same Telegram surface as a universal agent skill. The agent only loads the skill instructions when your prompt mentions Telegram — ~50× lower context cost in idle. Standalone (no MCP server in the loop), but uses the same ~/.telegram-agent/ session store as this package — sign in once, use either or both.

npm i -g telegram-agent
telegram-agent login
npx skills add beautyfree/telegram-agent -a claude-code -g

Continue below for the MCP install path.

Install

Option A — automatic, all clients:

npx add-mcp mcp-telegram \
  --env TELEGRAM_API_ID=123456 \
  --env TELEGRAM_API_HASH=abc...

add-mcp (from Neon) writes the correct config for Claude Desktop, Claude Code, Cursor, VS Code, Codex, Gemini CLI, Cline, Zed, Goose, OpenCode, and others. Pick the client in the interactive prompt.

[!IMPORTANT] Both env vars are required. Get them from my.telegram.org/apps.

Option B — manual config:

Claude Desktop (claude_desktop_config.json)
{
  "mcpServers": {
    "telegram": {
      "command": "npx",
      "args": ["-y", "mcp-telegram"],
      "env": {
        "TELEGRAM_API_ID": "123456",
        "TELEGRAM_API_HASH": "abc..."
      }
    }
  }
}
Cursor (~/.cursor/mcp.json)
{
  "mcpServers": {
    "telegram": {
      "command": "npx",
      "args": ["-y", "mcp-telegram"],
      "env": {
        "TELEGRAM_API_ID": "123456",
        "TELEGRAM_API_HASH": "abc..."
      }
    }
  }
}
VS Code (.vscode/mcp.json)
{
  "servers": {
    "telegram": {
      "type": "stdio",
      "command": "npx",
      "args": ["-y", "mcp-telegram"],
      "env": {
        "TELEGRAM_API_ID": "123456",
        "TELEGRAM_API_HASH": "abc..."
      }
    }
  }
}
Claude Code
claude mcp add telegram \
  -e TELEGRAM_API_ID=123456 \
  -e TELEGRAM_API_HASH=abc... \
  -- npx -y mcp-telegram
Codex CLI (~/.codex/config.toml) — install
[mcp_servers.telegram]
command = "npx"
args = ["-y", "mcp-telegram"]
env = { TELEGRAM_API_ID = "123456", TELEGRAM_API_HASH = "abc..." }

First-time sign in

Ask your agent:

Sign in to my Telegram.

The agent calls the login tool. A browser tab opens. Enter your phone number, the SMS code, and 2FA password if you have one. The tab shows a green checkmark — you can close it. The session is now stored locally and the agent can read your Telegram.

To add another account, ask the agent to call login again.

Tools

102 tools covering the full Telegram user-account surface. Common ones below; the rest are grouped under collapsibles. Every tool accepts an optional accountId (omit when only one account is signed in). peer accepts a numeric chat id, an @username, or the literal "me" (Saved Messages).

Top of the menu:

ToolWhat it does
loginOpen the browser-based sign-in flow. Adds an account.
list_accountsList signed-in accounts.
list_dialogsList dialogs/chats/channels. Filters: unread, archived, ignorePinned, folder, limit.
list_messagesList messages in a dialog. Newest first.
search_messagesSearch inside one dialog: query, filter (photos/videos/url/voice/...), fromUser, date range.
search_globalSearch across every chat you have.
search_dialogsFind dialogs by name/title/username substring.
send_messageSend text. Supports replyTo, topMsgId, parseMode, schedule, silent.
send_fileSend a file (local path or https:// URL). Pass an array for an album.
download_mediaSave the media on a message to disk.
transcribe_messageTranscribe a voice/video note (Premium).
invoke_mtprotoCall any raw MTProto method by name. Auto-resolves peer/channel/user strings.
Sessions (local) (4)

These are local-only: they manage which Telegram sessions live in ~/.telegram-agent/ and the settings UI. No Telegram API call beyond the sign-in flow itself.

ToolWhat it does
list_accountsList signed-in accounts.
loginBrowser-based sign-in. Adds an account.
logoutDrop a local session and revoke it on Telegram.
open_settingsOpen the local settings page (tool surface + read-only).
Profile (5)
ToolWhat it does
get_meReturn the profile of the authenticated user.
update_profileChange own first/last name and bio.
update_my_usernameSet or clear own @username.
set_birthdaySet the account birthday.
set_profile_photoUpload a new avatar (local path or URL).
Dialog discovery (5)
ToolWhat it does
list_dialogsList dialogs. Filters: unread, archived, ignorePinned, folder, limit.
search_dialogsFind dialogs by name/title/username substring.
resolve_usernameResolve @username to a user/channel/chat entity.
list_foldersList custom dialog folders (chat filters).
list_contactsList contacts.
Messages — read & search (6)
ToolWhat it does
list_messagesList messages in a dialog.
search_messagesSearch inside one dialog (text, type filter, sender, date range).
search_globalSearch across every chat.
get_messageFetch one or more messages by id.
get_message_reactionsGet reactions on messages.
mark_as_readMark messages read up to an id.
Messages — write (8)
ToolWhat it does
send_messageSend text.
edit_messageEdit a previously sent message.
delete_messagesDelete by id (optionally revoke for all).
forward_messagesForward messages between dialogs.
pin_message / unpin_messagePin / unpin in a dialog.
send_reactionSet reactions on a message.
send_message_to_phoneSend to a phone number, auto-creates a temporary contact.
Media (4)
ToolWhat it does
send_fileSend a file (path or URL). Albums via array.
download_mediaSave a message's media to disk.
download_profile_photoSave a peer's avatar to disk.
transcribe_messageTranscribe voice/video (Premium).
Polls (4)
ToolWhat it does
send_pollSend a poll. Supports quiz, multiple-choice, anonymous, close period.
vote_pollCast a vote.
close_pollFinalize a poll.
get_poll_resultsFetch tally.
Reactions (3)
ToolWhat it does
send_reactionSet emoji reactions on a message.
get_message_reactionsRead reactions.
set_default_reactionSet account-wide default.
Stories (6)
ToolWhat it does
list_storiesFeed of contacts' stories.
get_peer_storiesOne peer's stories.
send_storyPost a story (photo or video).
delete_storyDelete own stories.
view_storyMark stories viewed.
get_story_viewersList who viewed your story.
Channel / group moderation (11)
ToolWhat it does
ban_userFull ban (optional untilDate).
unban_userLift restrictions.
restrict_userApply a custom rights mask.
promote_adminGrant admin rights (with rank).
demote_adminStrip admin rights.
invite_userAdd users to a channel/supergroup.
kick_participantKick from chat/channel.
get_participantSingle participant info.
list_participantsMembers with filter (admins/banned/bots/...) and substring search.
delete_user_historyRemove every message by a user.
get_admin_logRecent admin events with event-type filter.
Channel / group settings (12)
ToolWhat it does
edit_titleChange title (works for channels, supergroups, and basic groups).
edit_aboutChange description.
edit_photoChange avatar (path or URL).
update_usernameSet/clear public @username.
check_usernameCheck availability.
set_slow_modeSet slow-mode seconds.
toggle_signaturesAuthor signatures on channel posts.
toggle_pre_history_hiddenHide history from new members.
toggle_join_requestRequire admin approval to join.
leave_channelLeave a channel/supergroup.
get_channel_infoExtended info (about, counts, linked chat, slow-mode).
get_user_infoExtended user info (bio, common chats).
Channel / group lifecycle (4)
ToolWhat it does
create_channelNew broadcast channel or supergroup (optional forum mode).
delete_channelPermanently delete.
migrate_chatBasic group → supergroup.
transfer_ownershipHand over creator rights (requires 2FA password).
Invite links (4)
ToolWhat it does
create_invite_linkNew link with optional expiry, usage cap, join-request gate.
list_invite_linksList active or revoked links.
revoke_invite_linkRevoke a specific link.
list_invite_joinersList users that joined via a link.
Forum topics (3)
ToolWhat it does
list_topicsList forum topics.
create_topicCreate a new topic.
edit_topicRename, re-icon, close, hide.
Drafts (3)
ToolWhat it does
save_draftSave a draft for a dialog.
clear_draftDrop the draft for a dialog.
list_draftsList all dialog drafts.
Notifications (4)
ToolWhat it does
mute_peerMute a chat (optional untilDate).
unmute_peerUnmute.
get_notify_settingsRead settings.
set_notify_settingsUpdate mute, previews, sound, story-mute.
Folders (chat filters) (4)
ToolWhat it does
create_folderNew folder with include/exclude rules.
edit_folderReplace folder rules.
delete_folderRemove a folder.
reorder_foldersSet display order.
Contacts (4)
ToolWhat it does
list_contactsAll contacts.
add_contactAdd a user to contacts.
delete_contactRemove users from contacts.
search_contactsSearch contacts + global directory.
Privacy & blocking (5)
ToolWhat it does
block_user / unblock_userBlock / unblock.
list_blockedBlock list.
get_privacyRead a privacy key.
set_privacyUpdate a privacy key (mode + allow/disallow lists).
Stickers (3)
ToolWhat it does
get_my_stickersInstalled sticker sets.
install_sticker_setInstall by short name.
add_recent_stickerPin a sticker to recent.
Premium boosts (2)
ToolWhat it does
get_my_boostsList your boost slots.
apply_boostApply slots to a channel.
Bots & raw MTProto (2)
ToolWhat it does
get_inline_bot_resultsRun an inline bot query.
invoke_mtprotoCall any MTProto method by qualified name (e.g. messages.SendMessage, stories.GetAllStories). String values for peer/channel/user/fromPeer/toPeer/bot/chat are auto-resolved to InputPeer / InputUser.

Gating which tools are exposed

Three env vars, applied in order:

VariableEffect
MCP_TELEGRAM_READONLY=1Hide every destructive / mutating tool.
MCP_TELEGRAM_TOOLS=name1,name2,prefix*Strict allowlist — only these tools register.
MCP_TELEGRAM_DISABLE=name1,prefix*Blocklist applied after the allowlist.

Examples:

MCP_TELEGRAM_READONLY=1                                    # read-only agent
MCP_TELEGRAM_TOOLS='login,list*,search*,get*'              # discovery-only
MCP_TELEGRAM_DISABLE='delete*,ban*,kick*,create_channel,delete_channel,transfer_ownership,invokeMtproto'  # safer write set

Environment

VariableRequiredDefaultNotes
TELEGRAM_API_IDyes—From my.telegram.org/apps. If unset, the auth page prompts for it and saves to state.json.
TELEGRAM_API_HASHyes—Same as above.
TELEGRAM_AGENT_HOMEno~/.telegram-agentState + per-account session storage. Legacy MCP_TELEGRAM_HOME still accepted. If only ~/.mcp-telegram exists from a previous install, it's used automatically.
TELEGRAM_AGENT_DOWNLOADSno$TELEGRAM_AGENT_HOME/downloadsWhere download_media / download_profile_photo save files. Legacy MCP_TELEGRAM_DOWNLOADS still accepted.
MCP_TELEGRAM_READONLYno—Set to 1/true/yes to hide every destructive tool.
MCP_TELEGRAM_TOOLSno—Strict allowlist. Comma-separated tool names; supports prefix* wildcards. If set, anything not matched is hidden.
MCP_TELEGRAM_DISABLEno—Blocklist applied after the allowlist. Same syntax.
LOG_LEVELnoinfodebug for verbose stderr.

Choosing which tools the agent sees

The three gating vars stack — MCP_TELEGRAM_READONLY → MCP_TELEGRAM_TOOLS → MCP_TELEGRAM_DISABLE.

# Read-only agent — every mutating tool is hidden
MCP_TELEGRAM_READONLY=1

# Discovery-only — only login + the list/search/get tools
MCP_TELEGRAM_TOOLS='login,list*,search*,get*,resolveUsername'

# Allow writes but keep destructive ones away from the agent
MCP_TELEGRAM_DISABLE='delete*,ban*,kick*,create_channel,delete_channel,transfer_ownership,invokeMtproto'

# Specific surface: read + send/edit only
MCP_TELEGRAM_TOOLS='login,list_accounts,list_dialogs,list_messages,search_messages,search_global,send_message,editMessage'

In an MCP client config, drop these into the same env block as TELEGRAM_API_ID/TELEGRAM_API_HASH. To verify, re-open your client — the tools the server advertises are exactly the ones registered after the gates run.

Data layout

~/.telegram-agent/
├── state.json          known accounts (no secrets in here)
└── sessions/
    └── <account_id>/   per-account MTProto session

If a Telegram session is invalidated server-side (logged out from another device, password rotated, etc.), the next tool call returns an error telling the agent to call login to re-authorize.

Development

git clone https://github.com/beautyfree/mcp-telegram
cd mcp-telegram
npm install
echo "TELEGRAM_API_ID=...\nTELEGRAM_API_HASH=..." > .env
npm run dev

Layout:

src/
├── index.ts           bin entry — stdio MCP server, tool registrations
├── telegram.ts        MTProto client + login state machine
├── auth-browser.ts    ephemeral HTTP server that drives the browser flow
├── auth-page.ts       inline HTML for the auth page
├── state.ts           persistent state in ~/.telegram-agent/
└── logger.ts

License

MIT — see LICENSE.


Also known as

Telegram MCP · MCP Telegram · Telegram MCP server · Telegram for Claude · Telegram for Cursor · Telegram for Claude Code · Telegram for VS Code · Telegram for Codex · Telegram for Cline · Telegram for Windsurf · Telegram for AI agents · Telegram MTProto MCP · Telegram user-account MCP · Telegram automation MCP · Model Context Protocol Telegram · MCP server Telegram · gramjs MCP

Install configuration

Are you the maintainer?

Claim this server with your GitHub account to request manual ownership verification.

README Embed Badge
Markdown

Link to the catalog listing for Telegram MCP server from your README. This badge does not certify ownership, compatibility or security.

[![MCP catalog listing](https://img.shields.io/badge/MCP-awesome--mcp-orange?style=flat-square)](https://awesome-mcp.com/servers/mcp-telegram-tacticlaunch)

REPOSITORY STATS

GitHub StarsUnavailable
ForksUnavailable

Public repository statistics could not be verified. Check the configured source address; unavailable counts are not zero.

Downloads and pulls

Separate sources, scopes and periods. Never combined or treated as installations, active users or security reviews.

No reviewed package or image identity; download statistics are not listed yet.

Related communication social MCP Servers

Alternative and complementary servers in the same category

View all in communication social →

An AI receptionist platform with an MCP server for accessing business calls, contacts and appointments from AI assistants.

52
Communication

Pidgeon provides an MCP server and an email inbox API that gives AI agents their own addresses for sending, awaiting, and replying to email.

Repository stats unavailable
Communication