telegram-mcp
Provides tools to read and act on a Telegram account, including chats, messages, contacts, folders, polls, reactions, scheduled messages, voice transcription, media search, and opt-in write operations such as sending messages and voting.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
telegram-mcp
An MCP server that lets Claude, Codex and other MCP clients read and act on your Telegram account. It is read-only unless you opt in.
This is a fork of chigwell/telegram-mcp that tracks upstream main. Upstream provides the 80+ tools for chats, messages, contacts, folders, polls, reactions, scheduled messages and voice transcription. The fork adds the pieces listed below. Upstream's full documentation is in docs/reference.md.

What this fork adds
get_pollreturns a poll's question, options, vote counts, this account's vote and, for public polls, who voted. It never votes.get_messagesshows a poll as a one-line summary instead of[empty], andget_media_inforeturns the same summary instead of the raw TL object.search_mediafinds text inside a chat's recent voice notes, video notes and images. Recordings go through the same engine and cache astranscribe_voice; images go through Tesseract OCR. Each call downloads at most 30 uncached files and skips anything above 20 MB.edit_messageanddelete_messagerefuse messages this account did not send.TELEGRAM_EXPOSED_TOOLSdefaults toread-onlyinstead ofall. Write tools stay unregistered until you name them, for exampleread-only+send_message,vote_poll.Optional bearer auth for HTTP and SSE through
MCP_AUTH_TOKEN, with a temporary lockout after repeated bad tokens. Unset, the server behaves like upstream.set_contact_aliasreturns the same PRIVACY error asget_messageswhen the target is outsideTELEGRAM_ALLOWED_CHAT_IDSor insideTELEGRAM_BLOCKED_CHAT_IDS..gitignorealso covers.env.*,data/, transcript and OCR caches, and SQLite files.


Related MCP server: Telegram MCP Server
Quickstart
git clone https://github.com/kharitonov-egor/telegram-mcp.git
cd telegram-mcp
uv sync
uv run session_string_generator.py # log in once, prints a session string
cp .env.example .env # then fill in the values below
uv run main.py # stdio; or MCP_TRANSPORT=http for a shared serverVariable | Required | What it does |
| yes | |
| yes | Output of |
| no |
|
| no | Comma-separated chat IDs or @usernames. Everything else is refused |
| no | Turns on voice transcription with Groq |
| no |
|
| no | HTTP bind address, default |
| no | Require |
Point an HTTP client at http://127.0.0.1:8765/mcp, for example claude mcp add --transport http telegram http://127.0.0.1:8765/mcp.
Multiple accounts, proxies, Docker, file roots, the event feed, the chat blocklist and forum topic limits are covered in docs/reference.md.
Security
A session string is full access to the Telegram account. Keep .env and *.session files out of git; .gitignore already covers them.
Tool exposure defaults to
read-only. Write tools stay unregistered until you list them inTELEGRAM_EXPOSED_TOOLS.With
TELEGRAM_ALLOWED_CHAT_IDSset, every tool that takes a chat refuses chats outside the list, and listing tools hide them. Unset means no restriction.edit_messageanddelete_messagerefuse messages sent by anyone else.HTTP and SSE bind to
127.0.0.1by default. The server prints a warning if you bind elsewhere withoutMCP_AUTH_TOKEN.With
MCP_AUTH_TOKENset, requests need the bearer token, compared in constant time. AfterMCP_AUTH_MAX_FAILURESbad attempts (default 10) withinMCP_AUTH_LOCKOUT_SECONDS(default 60), a client address gets HTTP 429 for that long.
None of this limits what the session itself can do. Anyone who reads your .env can skip the server entirely.
Credits
Built on chigwell/telegram-mcp and its contributors, and on Telethon. Apache-2.0, see LICENSE.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Telegram bridge for your MCP-compatible agent. Bidirectional, no LLM in our stack.
Hosted Telegram MCP server for Claude, ChatGPT and Cursor, with each action switched per account.
Unofficial Telegram MCP server — read, search, reply and react in your own Telegram account.
Multi-tenant Telegram gateway for AI agents — HTTP+stdio, 8 tools, MTProto User API
Related MCP Servers
- FlicenseBqualityDmaintenanceEnables MCP clients to interact with Telegram user accounts, providing tools for messaging, contacts, groups, channels, and media management through the Telegram API.853-
- AlicenseNot gradedqualityCmaintenanceEnables MCP clients to drive a real Telegram account, exposing chats, messages, media, secret chats, admin rights, invite links, Mini Apps, and multi-account routing as callable tools.33GPL 3.0
- AlicenseNot gradedqualityBmaintenanceEnables MCP-compatible AI clients to securely authenticate with a Telegram account via QR code and read or manage chats, messages, media, polls, contacts, and group administration through 50+ tools.1MIT
- AlicenseNot gradedqualityCmaintenanceEnables MCP-compatible clients such as Claude and Cursor to access and manage Telegram accounts, chats, messages, contacts, media, folders, and admin operations through exposed tools.Apache 2.0