The full upstream README, mirrored here for reference. Install config, tool schemas, adoption signals, and an original overview live on the Telegram (mcp Telegram) listing page.
📖 Documentation · ☁️ Cloud version — connect Telegram to Claude.ai or ChatGPT in 30 seconds with QR code, no API keys needed.
Telegram MCP Server — a Model Context Protocol server that connects AI assistants like Claude and ChatGPT to Telegram via the MTProto protocol. Unlike bots, this runs as a userbot -- it operates under your personal Telegram account using GramJS, giving full access to your chats, contacts, and message history.
{pts, qts, date} stateMCP_TELEGRAM_ENABLE_STARS=1, v1.34.0)API_ID and API_HASH from my.telegram.orgA QR code will appear in the terminal. Open Telegram on your phone, go to Settings > Devices > Link Desktop Device, and scan the code. The session is saved to ~/.mcp-telegram/session and reused automatically.
Custom session path: set
TELEGRAM_SESSION_PATH=/path/to/sessionto store the session file elsewhere.
Two-step verification (2FA): if your account has a cloud password enabled, scanning the QR code is not enough — Telegram also requires the password. Provide it via
TELEGRAM_2FA_PASSWORDso the login can complete:The password is only used locally to answer Telegram's SRP challenge and is never persisted.
That's it! Ask Claude to run telegram-status to verify.
Use TELEGRAM_SESSION_PATH to run separate Telegram accounts side by side:
Then add each as a separate MCP server:
Each account gets its own session file — no conflicts.
The opposite of multiple accounts: one account driven by many clients at once — several Claude Code windows, parallel sub-agents, or multiple IDEs. Normally each process opens the same session and they evict one another with AUTH_KEY_DUPLICATED. Serve mode fixes this.
Run a single persistent daemon that owns the one Telegram connection. Every other process auto-detects the daemon (via a PID lock) and becomes a thin client that proxies tool calls to it over a local Unix socket:
Then point each MCP client at the same install with the same TELEGRAM_SESSION_PATH — no serve argument. They connect to the daemon automatically; closing any client never drops the shared connection. Credentials are only required by the daemon (the owner), so client commands can omit TELEGRAM_API_ID/TELEGRAM_API_HASH and keep them where the daemon runs.
See the shared daemon guide for a systemd unit and SSH usage.
If Telegram is blocked or you're running in a containerized environment (Docker, K3s), use a SOCKS5 or MTProxy:
| Variable | Description |
|---|---|
TELEGRAM_PROXY_IP | Proxy server address |
TELEGRAM_PROXY_PORT | Proxy server port |
TELEGRAM_PROXY_SOCKS_TYPE | 4 or 5 (default: 5) |
TELEGRAM_PROXY_SECRET | MTProxy secret (enables MTProxy mode) |
TELEGRAM_PROXY_USERNAME | Optional proxy auth |
TELEGRAM_PROXY_PASSWORD | Optional proxy auth |
If your VPS or hosting IP is reachable on outbound port 443 but not the default MTProto port 80 (some cloud providers ban port 80 on Telegram DC IP ranges as anti-abuse policy), set:
| Variable | Description |
|---|---|
TELEGRAM_USE_WSS | When true, gramJS uses port 443 instead of 80 for the MTProto TCPFull transport. Default: false. Cannot be combined with TELEGRAM_PROXY_* (gramJS limitation) — if both are set, useWSS is ignored and the proxy takes precedence (a warning is logged). |
No need to clone or install anything. Just use npx @overpod/mcp-telegram.
Download from Releases — standalone single-file binaries, zero dependencies:
| Platform | Server | Login CLI |
|---|---|---|
| Linux x64 | mcp-telegram-linux-x64 | mcp-telegram-login-linux-x64 |
| Linux ARM64 | mcp-telegram-linux-arm64 | mcp-telegram-login-linux-arm64 |
| macOS x64 | mcp-telegram-darwin-x64 | mcp-telegram-login-darwin-x64 |
| macOS ARM64 | mcp-telegram-darwin-arm64 | mcp-telegram-login-darwin-arm64 |
| Windows x64 | mcp-telegram-windows-x64.exe | mcp-telegram-login-windows-x64.exe |
Login (interactive terminal required):
Run the MCP server:
Note: Login must be done once via terminal. After that, the session is persisted in
~/.mcp-telegramand reused automatically.
Open your config file:
~/Library/Application Support/Claude/claude_desktop_config.json%APPDATA%\Claude\claude_desktop_config.jsonAdd the Telegram server:
Restart Claude Desktop.
Ask Claude: "Run telegram-login" -- a QR code will appear. If the image is not visible, it's also saved to ~/.mcp-telegram/qr-login.png. Scan it in Telegram (Settings > Devices > Link Desktop Device).
Ask Claude: "Run telegram-status" to verify the connection.
Note: No terminal required! Login works entirely through Claude Desktop.
Same setup, but using the pre-built binary instead of npx:
Login via terminal first (see Docker section above).
Add to your config file:
Add the same JSON config above to your MCP settings (Cursor Settings > MCP, or VS Code MCP config).
All tools are auto-discoverable via MCP — your AI client will see the full list with parameters and descriptions when connected.
| Category | Tools |
|---|---|
| Auth | telegram-status, telegram-login, telegram-logout |
| Messaging | telegram-send-message (incl. quoteText for verbatim reply quotes and Premium message effect), telegram-edit-message, telegram-delete-message, telegram-forward-message, telegram-send-scheduled, telegram-send-typing, telegram-translate-message, telegram-get-message-link |
| Scheduled | telegram-get-scheduled, telegram-delete-scheduled |
| Reading | telegram-list-chats, telegram-read-messages, telegram-search-messages, telegram-search-global, telegram-search-chats, telegram-get-unread, telegram-mark-as-read, telegram-get-replies, telegram-get-unread-mentions, telegram-get-unread-reactions, telegram-get-saved-dialogs |
| Drafts | telegram-save-draft, telegram-get-drafts, telegram-clear-drafts |
| Forum Topics | telegram-list-topics, telegram-read-topic-messages, telegram-create-topic, telegram-edit-topic, telegram-delete-topic |
| Polls | telegram-create-poll |
| Poll Interaction (v1.31.0) | telegram-vote-poll, telegram-get-poll-results, telegram-get-poll-voters, telegram-close-poll |
| Reactions | telegram-send-reaction, telegram-get-reactions, telegram-set-default-reaction, telegram-get-top-reactions, telegram-get-recent-reactions |
| Paid Reactions (v1.31.0) | telegram-send-paid-reaction (★ Stars), telegram-toggle-paid-reaction-privacy, telegram-get-paid-reaction-privacy |
| Audio Transcription (v1.31.0) | telegram-transcribe-audio (Premium), telegram-get-transcription, telegram-rate-transcription |
| Fact-check (v1.31.0) | telegram-get-fact-check, telegram-edit-fact-check, telegram-delete-fact-check |
| Stickers | telegram-send-sticker, telegram-get-installed-stickers, telegram-get-recent-stickers, telegram-get-sticker-set, telegram-search-sticker-sets |
| Media | telegram-send-file, telegram-download-media, telegram-get-profile-photo, telegram-get-web-preview |
| Rich Media Sending | telegram-send-voice, telegram-send-video-note (round video), telegram-send-location (static or live), telegram-send-venue, telegram-send-contact, telegram-send-dice (🎲🎯🎰🏀⚽🎳), telegram-send-album (2–10 grouped photos/videos) |
| Groups | telegram-create-group, telegram-edit-group, telegram-invite-to-group, telegram-join-chat, telegram-leave-group, telegram-kick-user, telegram-ban-user, telegram-unban-user, telegram-set-admin, telegram-remove-admin, telegram-get-my-role, telegram-set-chat-permissions, telegram-set-slow-mode, telegram-get-admin-log |
| Chat Info | telegram-get-chat-info, telegram-get-chat-members, telegram-get-chat-folders |
| Folders (v1.33.0) | telegram-create-folder, telegram-edit-folder, telegram-delete-folder, telegram-reorder-folders, telegram-get-suggested-folders, telegram-toggle-folder-tags |
| Global Privacy (v1.33.0) | telegram-get-global-privacy-settings, telegram-set-global-privacy-settings |
| Invite Links | telegram-create-invite-link, telegram-get-invite-links, telegram-revoke-invite-link |
| Contacts | telegram-get-contacts, telegram-add-contact, telegram-get-contact-requests |
| Moderation | telegram-block-user, telegram-unblock-user, telegram-report-spam |
| Profiles (read) | telegram-get-profile, telegram-update-profile |
| Profile (write, v1.32.0) | telegram-set-emoji-status (Premium), telegram-list-emoji-statuses, telegram-clear-recent-emoji-statuses, telegram-set-profile-color (Premium), telegram-set-birthday, telegram-set-personal-channel, telegram-set-profile-photo, telegram-delete-profile-photo |
| Account | telegram-get-sessions, telegram-terminate-session, telegram-set-privacy, telegram-set-auto-delete |
| Pinning | telegram-pin-message, telegram-unpin-message |
| Chat Settings | telegram-mute-chat, telegram-archive-chat, telegram-pin-chat, telegram-mark-dialog-unread |
| Admin Toggles | telegram-toggle-channel-signatures, telegram-toggle-anti-spam, telegram-toggle-forum-mode, telegram-toggle-prehistory-hidden, telegram-set-chat-reactions, telegram-approve-join-request |
| Stats | telegram-get-broadcast-stats, telegram-get-megagroup-stats |
| Inline Bots & Buttons | telegram-inline-query, telegram-inline-query-send, telegram-press-button, telegram-get-message-buttons |
| Real-Time Polling | telegram-get-state, telegram-get-updates, telegram-get-channel-updates |
| Stories (read) | telegram-get-all-stories, telegram-get-peer-stories, telegram-get-stories-by-id, telegram-get-story-views |
| Stories (write, v1.30.0) | telegram-send-story, telegram-edit-story, telegram-delete-stories, telegram-react-to-story, telegram-export-story-link, telegram-read-stories, telegram-toggle-story-pinned, telegram-toggle-story-pinned-to-top, telegram-activate-stealth-mode (Premium), telegram-get-stories-archive, telegram-report-story |
| Discussion (v1.30.0) | telegram-get-discussion-message, telegram-get-groups-for-discussion |
| Read Receipts (v1.30.0) | telegram-get-message-read-participants, telegram-get-outbox-read-date |
| Boosts | telegram-get-my-boosts, telegram-get-boosts-status, telegram-get-boosts-list |
| Business (v1.32.0) | telegram-get-business-chat-links, telegram-create-business-chat-link, telegram-edit-business-chat-link, telegram-delete-business-chat-link, telegram-resolve-business-chat-link, telegram-set-business-hours, telegram-set-business-location, telegram-set-business-greeting, telegram-set-business-away, telegram-set-business-intro |
| Opt-in (env-gated) | telegram-get-group-call, telegram-get-group-call-participants (requires MCP_TELEGRAM_ENABLE_GROUP_CALLS=1); Stars & gifts telegram-get-stars-status, telegram-get-stars-transactions, telegram-get-stars-topup-options, telegram-get-stars-subscriptions, telegram-change-stars-subscription, telegram-get-available-star-gifts, telegram-get-saved-star-gifts, telegram-save-star-gift, telegram-convert-star-gift (requires MCP_TELEGRAM_ENABLE_STARS=1); telegram-get-quick-replies, telegram-get-quick-reply-messages (requires MCP_TELEGRAM_ENABLE_QUICK_REPLIES=1) |
Tip: Ask your AI assistant "What Telegram tools are available?" to get the full list with parameters and descriptions.
Some tools are disabled by default and must be opted in via environment variables:
| Variable | Value | Tools enabled |
|---|---|---|
MCP_TELEGRAM_ENABLE_GROUP_CALLS | 1 | telegram-get-group-call, telegram-get-group-call-participants |
MCP_TELEGRAM_ENABLE_STARS | 1 | Stars balance & transactions, top-up options, subscriptions, and Star Gifts (browse / save / convert) |
MCP_TELEGRAM_ENABLE_QUICK_REPLIES | 1 | telegram-get-quick-replies, telegram-get-quick-reply-messages |
Add these to your .env file or MCP client config to enable them.
telegram) -- Telegram MTProto clientA Telegram session can only be used by one process at a time. If you get AUTH_KEY_DUPLICATED, it means another process is already using the same session file.
Solution: Create separate sessions for each environment:
Then set TELEGRAM_SESSION_PATH in each environment's MCP config accordingly.
.env (gitignored)~/.mcp-telegram/session with 0600 permissions (owner-only access)0700 permissionsAUTH_KEY_DUPLICATED errors (see Troubleshooting)MIT