Skip to content
← All MCP servers

Is the Telegram MCP server safe? What it can reach

What the Telegram MCP server can read, write and delete, how it signs in, and how to limit it in Claude Code and Codex.

Community serverChecked

The most used Telegram MCP server is the community chigwell/telegram-mcp, which runs locally and signs in as your own Telegram account with a session string. It can read all your chats and send, edit and delete messages as you. The control that matters most is TELEGRAM_EXPOSED_TOOLS=read-only, with TELEGRAM_ALLOWED_CHAT_IDS to limit which chats it sees.

Who maintains it

ImplementationKindStatus
chigwell/telegram-mcp (community)Communityactive

It runs as a local process on your machine.

How it signs in

A Telegram API ID and hash from my.telegram.org plus a session string for your own user account. The session string grants the full rights of that account.

What its tools can do

KindTools
Readlist_chats, get_chats, get_chat, get_history, list_messages, get_messages, get_messages_after, search_messages, search_global, get_message_context, get_pinned_messages, get_scheduled_messages, get_drafts, list_calls, resolve_username, resolve_phone, get_common_chats, get_contact_chats, get_direct_chat_by_contact, get_last_interaction, get_folder, get_folder_snapshot, get_folder_limits, list_topics, list_contact_aliases, get_message_reactions, get_media_info, inspect_document, open_photo, view_video, transcribe_voice, list_inline_buttons, get_send_as, wait_for_events, wait_for_settled_message, wait_for_new_message, download_media, incoming_feed_status
Writeedit_message, edit_message_media, send_reaction, vote_poll, press_inline_button, upload_file, create_folder, update_folder, set_contact_alias, delete_contact_alias, set_default_send_as, enable_incoming_feed, disable_incoming_feed
Can’t be undonesend_message, reply_to_message, send_file, send_album, send_voice, send_sticker, create_poll, delete_message, delete_messages_bulk, delete_chat_history, invite_to_group, promote_admin, demote_admin, set_profile_photo, edit_chat_photo

The README says the server has 80+ tools and names only some of them, so these lists are partial. Tool names come from the README and its allowlist examples.

Built-in limits

OptionWhat it does
TELEGRAM_EXPOSED_TOOLSall (default), read-only, or read-only+tool,tool to add named write tools. Append -tool,tool to hide others. It hides tools from the MCP client but does not reduce the session’s authority.
TELEGRAM_ALLOWED_CHAT_IDSLimits the agent to listed chat IDs or usernames, and can limit a forum chat to one topic. Unlisted chats are hidden from list and search tools.
TELEGRAM_BLOCKED_CHAT_IDSBlocks whole chats.
TELEGRAM_ALLOWED_ROOTSSets the folders where file uploads and downloads are allowed.
TELEGRAM_FILE_EXTENSIONSSets allowed file extensions per tool. The README calls this defence in depth, not a security boundary.
TELEGRAM_TRANSCRIBE=offTurns off voice transcription, which otherwise can upload recordings to Groq or an OpenAI-compatible endpoint.
MCP_TRANSPORT and MCP_HOSThttp and sse modes bind 127.0.0.1 by default and check Host and Origin headers.

The risks

  • The session string is your Telegram login, so a leaked config gives full access to every chat, contact and file on the account.
  • An injected message in any chat the agent reads could make it send, edit or delete messages as you, or invite users and promote admins.
  • Voice transcription with the default groq engine uploads recordings to Groq.
  • The README warns that the telegram-mcp name on PyPI belongs to an unrelated project, so a pip or uvx install of that name is not this server.

Limit it in Claude Code

Add it from the documented launch settings, at local or user scope so a token never lands in a shared .mcp.json:

claude mcp add --env TELEGRAM_API_ID=... --env TELEGRAM_API_HASH=... --env TELEGRAM_SESSION_STRING=... telegram -- uv --directory /full/path/to/telegram-mcp run main.py

Claude Code names MCP tools mcp__telegram__<tool>. Deny rules win over ask rules, and ask rules over allow rules. Put these in ~/.claude/settings.json or the project’s .claude/settings.json:

{
  "permissions": {
    "deny": [
      "mcp__telegram__delete_chat_history",
      "mcp__telegram__delete_messages_bulk",
      "mcp__telegram__delete_message",
      "mcp__telegram__promote_admin",
      "mcp__telegram__demote_admin",
      "mcp__telegram__invite_to_group",
      "mcp__telegram__set_profile_photo",
      "mcp__telegram__edit_chat_photo"
    ],
    "ask": [
      "mcp__telegram__send_message",
      "mcp__telegram__reply_to_message",
      "mcp__telegram__send_file",
      "mcp__telegram__send_album",
      "mcp__telegram__send_voice",
      "mcp__telegram__send_sticker",
      "mcp__telegram__create_poll",
      "mcp__telegram__edit_message",
      "mcp__telegram__upload_file"
    ]
  }
}

Limit it in Codex

Codex reads MCP servers from ~/.codex/config.toml. disabled_tools removes tools, and enabled_tools keeps only the ones you list:

[mcp_servers.telegram]
command = "uv"
args = ["--directory", "/full/path/to/telegram-mcp", "run", "main.py"]
env_vars = ["TELEGRAM_API_ID", "TELEGRAM_API_HASH", "TELEGRAM_SESSION_STRING"]
disabled_tools = ["delete_chat_history", "delete_messages_bulk", "delete_message", "promote_admin", "demote_admin", "invite_to_group", "set_profile_photo", "edit_chat_photo"]

Checklist

  • Start with TELEGRAM_EXPOSED_TOOLS=read-only.
  • Set TELEGRAM_ALLOWED_CHAT_IDS to the chats the agent needs.
  • Install from a clone of the GitHub repository, never from PyPI.
  • Consider a separate Telegram account for agent use.
  • Keep .env and session files out of git.

Checked against the vendor documentation on November 25, 2026. telegram-mcp README · telegram-mcp usage guide

What Excellent covers

Excellent doesn’t inspect MCP servers themselves. Its free scan reads supported logs on the Mac (Claude Code, Codex, Grok Build, GitHub Copilot CLI, Gemini CLI and Qwen Code) and reports findings for review, so you can see what an agent did after a session. Run the free scan · See a sample report · How to vet any MCP server

Excellent Pro adds checks before supported actions. Claude Code can display an ask prompt. With Codex, an Excellent “ask” refuses the action and tells the agent to ask you. Pro is US-only for now. Agent coverage · Pricing