mcp-telegram
Click on "Install 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., "@mcp-telegramwhat are my unread 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.
mcp-telegram
MCP (Model Context Protocol) server that connects Claude Desktop, Claude Code or Cursor to your personal Telegram account. Ask your AI assistant in plain language:
«Что мне написали за утро? Суммаризируй рабочий чат.» «Найди сообщение, где Иван скидывал адрес офиса.» «Ответь Ивану, что буду в 15:00.»
The assistant picks the right tool, your account does the work.
Tools
Tool | What it does |
| Recent chats, optionally only ones with unread messages |
| Last N messages of a chat (by name, @username or id) |
| Full-text search in one chat or across all chats |
| Send a text message (only when you explicitly ask) |
Built on the official MCP Python SDK (FastMCP) and Telethon (MTProto — your real account, not a bot; bots can't read your own chats).
Related MCP server: Telegram Bot MCP Server
Setup
1. Get Telegram API credentials (2 minutes, one time):
go to my.telegram.org → API development tools →
create an app → copy api_id and api_hash.
2. Install and log in:
git clone https://github.com/StepanCEO/mcp-telegram
cd mcp-telegram
pip install -r requirements.txt
cp .env.example .env # put api_id/api_hash there
python -m mcp_telegram.login # one-time: phone number + code from TelegramThe login creates a session file (~/.mcp-telegram.session); after that the
server runs non-interactively.
3. Wire it into your client.
Claude Desktop (claude_desktop_config.json):
{
"mcpServers": {
"telegram": {
"command": "python",
"args": ["-m", "mcp_telegram"],
"cwd": "C:/path/to/mcp-telegram"
}
}
}Claude Code:
claude mcp add telegram -- python -m mcp_telegramCursor (.cursor/mcp.json) — same shape as Claude Desktop.
Restart the client — the telegram tools appear automatically.
Security notes
The session file grants full access to your account — it stays on your machine, is never sent anywhere, and is
.gitignored. Treat it like a password.send_messageis described to the model as "use only when the user explicitly asks", and MCP clients ask for your confirmation before tool calls by default.This is your personal account: respect Telegram's terms — no spam, no mass messaging.
Tests
pip install pytest pytest-asyncio
pytestTests run against a fake Telethon client — no network or real account needed. They cover unread filtering, message ordering, search, sending, and chat-id parsing.
Project structure
mcp_telegram/
├── server.py # MCP tools (FastMCP, stdio transport)
├── service.py # Telegram operations + formatting (testable core)
├── login.py # one-time interactive sign-in
└── config.py # .env settings
tests/
└── test_service.pyLicense
MIT
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseAqualityCmaintenanceRead-only Telegram access for Claude and other MCP hosts. Provides tools to list chats, read recent messages, and download media from your own Telegram account without needing an api_id/api_hash.Last updated5MIT
- AlicenseAqualityDmaintenanceEnables AI assistants to publish, edit, search, and manage messages in Telegram channels via a set of MCP tools.Last updated8MIT
- Flicense-qualityDmaintenanceEnables Claude to interact with your Telegram account, including reading messages, searching conversations, and sending messages.Last updated
- Alicense-qualityCmaintenanceConnects AI tools to Telegram via MCP, enabling reading chats, sending messages, managing groups, and more using your own account.Last updated5MIT
Related MCP Connectors
Telegram bridge for your MCP-compatible agent. Bidirectional, no LLM in our stack.
Search your AI chat history (ChatGPT, Claude, Codex) from any MCP client. Remote, private, read-only
Give AI agents real phone numbers, messages, and voice calls via MCP.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/StepanCEO/mcp-telegram'
If you have feedback or need assistance with the MCP directory API, please join our Discord server