send_messageLABSCO SUMMARY
Your own Telegram account, scriptable in a sentence.
Acting as the user rather than a bot is the point and the cost: it reaches everything you can reach, which also means a careless instruction sends a real message from you. Run one instance per session file - two processes sharing one session produce database-locked errors.
What it is
A Telegram client built on Telethon and exposed over MCP. It signs in with your own account, so it reaches the chats you are in - not only the ones a bot has been added to.
What you get
- Send text or files to any user, group or channel
- Edit the content of a message you already sent, and delete one or several
- Pull message history with filtering
- Find users, groups and channels by name or username
- Open a specific message from a Telegram link
- Read and set the draft on any chat
- Download photos, video and documents out of messages
Requirements
Python 3.10 or higher and uv. Install with uv tool install mcp-telegram, then run mcp-telegram login once - it asks for the API ID and API hash from my.telegram.org/apps, your phone number, the code Telegram sends, and your two-factor password if you have one. The client config passes API_ID and API_HASH and starts the server with the start argument.
Setup effort
One command plus credentials — uv tool install mcp-telegram, then supply credentials
USE CASES
Catching up on a busy channel
Find the channel by name, then pull recent history with a filter and summarise it, instead of scrolling.
Following up on a link someone pasted
Open the exact message from its Telegram link and read the surrounding thread before replying.
Drafting a reply for a human to send
Write the message into the chat's draft box and leave it there, so a person presses send.
Getting files out of a conversation
Download the photos or documents attached to messages so they land on disk and can be read by other tools.
9 tools
Listed in project docs. Your client may show a different list.
edit_messagedelete_messageget_messagessearch_dialogsmessage_from_linkget_draftset_draftmedia_downloadBEFORE YOU INSTALL
What to know first
Tools you get
9 tools named in the project's documentation.
Requires
- mcp-telegram on PATH
- Python 3.10
- API_ID in your environment
- API_HASH in your environment
Where it runs
Both documented clients run the server on your machine.
INSTALLATION
Connect your client
Server setup
uv tool install mcp-telegramSign in once before connecting a client. It asks for the API ID and API hash from my.telegram.org/apps, your phone number, the code Telegram sends and your two-factor password if you have one, then keeps the session for later runs: mcp-telegram login
MCP Clients
Claude Desktop, Cursor
{
"mcpServers": {
"mcp-telegram": {
"command": "mcp-telegram",
"args": [
"start"
],
"env": {
"API_ID": "<YOUR_API_ID>",
"API_HASH": "<YOUR_API_HASH>"
}
}
}
}