Telegram Account MCP Connector
Allows interaction with a personal Telegram account, including reading saved messages and chat history, inspecting files and media, searching messages, viewing account statistics, and sending messages.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Telegram Account MCP ConnectorWhat are my latest saved messages?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
π Telegram Account MCP Connector for Claude
An open-source Model Context Protocol (MCP) server that connects your personal Telegram account to Claude Desktop, Claude Code, or any MCP-compatible AI client.
Give Claude superpowers to read your chats, check your Saved Messages, inspect files and media, summarize channel feeds, search history, and send messages on your behalf.
β¨ Features
π Saved Messages ("ΠΠ·Π±ΡΠ°Π½Π½ΠΎΠ΅"): Full access to read and write notes, links, and snippets into your personal Saved Messages.
π Files & Media Inspection: View file names, sizes (KB/MB), MIME types, photos, and documents across your chats.
π Account Statistics: Overview of total chats, joined channels, supergroups, private chats, bots, and unread counts.
π Global & Scoped Search: Search across all your Telegram chats or within a specific conversation.
π― Intelligent Limit Management: Prompt-guided tools ensure Claude asks you for limits rather than overwhelming your conversation context.
β‘οΈ Dual Deployment Modes:
Local
stdio: Runs seamlessly as a child process of Claude Desktop.Remote
SSE: Deployable 24/7 to Render, Railway, or Docker.
Related MCP server: Telegram MCP Server
π Available MCP Tools
Tool | Parameters | Description |
| none | Returns logged-in Telegram user info (Name, Username, ID, Phone). |
| none | Account overview (channels count, groups, private chats, unread counter). |
|
| Read messages and notes from your personal Saved Messages. |
|
| Store a note or message into Saved Messages. |
|
| List recent chats filtered by category. |
|
| Read message history with rich media and document metadata. |
|
| Inspect files and media shared in a specific chat. |
|
| Send a new message or reply to a specific message. |
|
| Search messages globally or inside a specific chat. |
π Quickstart Guide
1. Clone & Install
git clone https://github.com/miuceo/telegram-account-mcp.git
cd telegram-account-mcp
pip install -r requirements.txt2. Get Telegram API Credentials
Go to my.telegram.org and log in with your phone number.
Navigate to API development tools.
Create a new application and copy your
api_idandapi_hash.
3. One-Time Login (Session Creation)
Run the interactive authentication script:
python auth_setup.pyEnter your
API_IDandAPI_HASH(saved automatically to.env).Enter your phone number (e.g.
+998880084506) and the 5-digit verification code sent to your Telegram app.This creates your secure
telegram_user.sessionfile locally.
π₯ Claude Desktop Setup (Local stdio)
Open or create %APPDATA%\Claude\claude_desktop_config.json (Windows) or ~/Library/Application Support/Claude/claude_desktop_config.json (macOS):
{
"mcpServers": {
"telegram": {
"command": "python",
"args": [
"C:\\path\\to\\telegram-mcp-connector\\server.py"
],
"env": {
"PYTHONIOENCODING": "utf-8"
}
}
}
}Restart Claude Desktop. You will see the π¨ hammer icon with all 9 Telegram tools ready!
βοΈ 24/7 Hosting on Render (Remote SSE Mode)
Because Render containers have ephemeral storage, generate a persistent TELEGRAM_STRING_SESSION first:
python generate_string_session.pyCopy the generated TELEGRAM_STRING_SESSION string.
Deploying to Render:
Push this repository to your GitHub.
Go to Render Dashboard -> New + -> Web Service.
Connect your repository.
Set:
Environment:
Python(orDocker)Build Command:
pip install -r requirements.txtStart Command:
python server.py --transport sse
Add Environment Variables:
TELEGRAM_API_ID=your_api_idTELEGRAM_API_HASH=your_api_hashTELEGRAM_STRING_SESSION=your_generated_string_session
Deploy! Render will give you a public URL (e.g.,
https://my-telegram-mcp.onrender.com).
π Security Best Practices
Never commit
.envor*.sessionfiles: They grant full access to your Telegram account. The provided.gitignoreprevents them from being tracked.Flood Limits: Telegram enforces rate limits. The tools are designed to fetch targeted batches.
Review Permissions: When using Claude to send messages, ask Claude to confirm recipient and message before sending.
π License
This project is licensed under the MIT License.
This server cannot be deployed
Maintenance
Related MCP Connectors
Your personal data for AI β Telegram, bank, courses, Zoom & more, scoped to you.
Gives your AI assistant persistent memory and intelligence about your work patterns.
Give any AI assistant real-time access to your phone's GPS and location history.
Connect authorized ad accounts to AI assistants for audits, reporting, and approval-gated changes.
Related MCP Servers
- AlicenseNot gradedqualityAmaintenanceEnables AI agents to scoped, permissioned access to Telegram chats with per-chat read/write levels and human approval for sending messages.1MIT
- AlicenseNot gradedqualityAmaintenanceEnables AI assistants to control a personal Telegram account for sending/reading messages, media, group management, and more via the MTProto API.MIT
- AlicenseAqualityAmaintenanceEnables AI agents to access and manage your real Telegram account, including chats, messages, media, contacts, groups, and administrative actions via MTProto.1313 npmMIT
- FlicenseNot gradedqualityAmaintenanceEnables AI assistants to read Telegram conversations, search messages, retrieve chat context, resolve recipients, and send messages with delivery status.1-