telegram-mcp
Logs in to the user's own Telegram account over MTProto and exposes it as tools: read dialogs and history, search and fetch messages, send/edit/delete/forward messages, work with forum topics and folders, manage chats (members, join/leave, mute, archive, pin, mark read/unread), send files and reactions, and download media, plus real-time watching of a chat or topic for new replies with catch-up on messages missed while offline.
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
A local daemon that logs in to your own Telegram account over MTProto (mtcute) and exposes it to Claude Code (or any MCP client) as an MCP server: read, search and send messages, work with forum topics, manage folders, and watch a chat or topic for new replies in real time. It ships as a Claude Code plugin with skills that teach Claude how to use it and how to set it up.
MCP over Streamable HTTP at
http://127.0.0.1:47101/mcpNew-message push over WebSocket at
ws://127.0.0.1:47101/watchCatches up on messages missed while the machine slept or the daemon was stopped
It listens on 127.0.0.1 only and accepts only loopback Host and empty or loopback Origin headers (DNS rebinding and cross-site protection from the MCP SDK). There is no token.
Install as a Claude Code plugin
At the Claude Code prompt:
/plugin marketplace add stringke/telegram-mcp
/plugin install telegram-mcp@telegram-mcpOr from a shell:
claude plugin marketplace add stringke/telegram-mcp
claude plugin install telegram-mcp@telegram-mcp --scope userThen ask Claude to "set up Telegram MCP", or run /telegram-mcp:telegram-setup. The setup skill copies the daemon to ~/.local/share/telegram-mcp/app, installs dependencies, helps you get an api_id / api_hash from https://my.telegram.org, has you scan a login QR code in your own terminal, registers a launchd agent on macOS, and checks the result with get_me. Run setup again after updating the plugin so the background service picks up the new code.
The plugin contains two skills, telegram (how to read, search, send, use topics and watch for replies) and telegram-setup (install, login, background service, removal). Tools are named mcp__plugin_telegram-mcp_telegram__<tool>.
Related MCP server: email-mcp
Manual install (any MCP client)
Requires Bun 1.4 or newer.
git clone https://github.com/stringke/telegram-mcp.git
cd telegram-mcp
bun install --frozen-lockfile
bun run configure # prompts for api_id and api_hash, writes ~/.config/telegram-mcp/config.json (mode 600)
bun run login # shows a QR code; scan it in Telegram: Settings -> Devices -> Link Desktop Device
bun run service:install # macOS launchd agent; elsewhere run `bun run serve`Register the server with your client, for example Claude Code:
claude mcp add --transport http --scope user telegram http://127.0.0.1:47101/mcpCommand | What it does |
| Prompt for API credentials and save them |
| QR login (asks for the 2FA password if set); reports the account if already logged in |
| Run the daemon in the foreground |
| macOS: install the launchd agent |
| Stop and remove the agent |
The agent records the install directory and the Bun path; reinstall it after updating the code or upgrading Bun.
Configuration
Variable | Default | Purpose |
| none | MTProto app credentials; take precedence over the config file when both are set |
|
|
|
|
| Session, inbox database and log |
|
| Default target of |
|
| Port (the plugin expects 47101) |
|
| How long inbox events are kept |
user.session in the state directory is your account's login: never share it. API credentials are never written to the launchd plist.
To make Claude write in your own style, copy skills/telegram/voice.md to ~/.config/telegram-mcp/voice.md and edit it. The telegram skill reads it before sending, and its rules (including whether to ask before sending and whether to watch for replies automatically) override the defaults.
Tools
All times are UTC ISO 8601 and all ids are strings. chat accepts @username, t.me links (including t.me/c/... and invite links), numeric ids, +<country code><phone> and me. Error messages and watch frames are in Chinese.
get_me, list_dialogs, list_topics, get_history, get_messages, search_messages, get_new_messages, sync_now, get_chat, get_chat_members, add_chat_members, resolve, send_message, edit_message, delete_messages, forward_messages, mark_read, send_file, download_media, send_reaction, pin_message, list_folders, create_folder, update_folder, delete_folder, reorder_folders, mute_chat, unmute_chat, archive_chats, unarchive_chats, pin_dialog, mark_unread, join_chat, leave_chat.
See README.zh-CN.md for each tool, forum topic behaviour, the /watch frame format and how catch-up works.
Caveats
This acts as you. Everything it sends is sent by you. Follow Telegram's API terms; do not use it for bulk messaging or spam, or the account may be limited.
One session, one process. Two processes on the same session get both disconnected with
AUTH_KEY_DUPLICATED, which is why clients share one daemon over HTTP instead of each spawning a stdio server. Stop the daemon beforebun run login.Edits and deletions that happen while the daemon is stopped are not recovered; new messages are.
Development
bun install
bun run typecheck
bun testTests are offline and never contact Telegram. Bump version in .claude-plugin/plugin.json for each release, otherwise installed copies do not update.
License
MIT
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
Read, search and manage iCloud Mail, Calendar and Contacts from Claude and other MCP clients.
Your mailbox for MCP clients: search, read, draft, send, rules and notes. Sending is off by default.
Shared memory and mail for your AI agents. Verified with Claude Code; other MCP clients in testing.
Send and read WhatsApp, email and SMS from Claude, ChatGPT, Cursor or any MCP client, from your own accounts: your WhatsApp number (linked by QR code), your mailbox (IMAP/SMTP) and your Android phone (SMS from its SIM). Tools: list-accounts, get-account, add-account, add-email-account, list-messages, send-message (one channel or several in one call). Hosted, OAuth 2.1, nothing to install. Free plan with unlimited messages; paid plans from 19 EUR/month remove the footer and add media and webhooks. Docs and client configs: github.com/UnlimitedMessaging/unlimited-messaging-mcp
Related MCP Servers
- AlicenseAqualityCmaintenanceMCP server that gives Claude and other MCP hosts full access to Mail.app on macOS — search, read, send, reply, flag, move, and more across all accounts configured in Mail.app.2479 npm1MIT
- FlicenseNot gradedqualityCmaintenanceLocal IMAP/SMTP MCP server that lets Claude read, search, draft, send, flag, and move mail across multiple IMAP mailboxes. Credentials stay on your machine.-
- AlicenseAqualityDmaintenanceAn MCP server that lets Claude read, search, and send email over standard IMAP/SMTP.6MIT
- AlicenseNot gradedqualityCmaintenanceEnables Claude and other MCP clients to search, read, organize, and draft replies for mail in a self-hosted MailFlow instance via its HTTP API and scoped API tokens. It can mark, star, archive, snooze, categorize, move messages except into Trash or Junk, and save drafts, but cannot send or delete mail.1MIT