telegram-mcp
Provides tools to read messages, send replies, manage chats, channels, groups, and folders on 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., "@telegram-mcplist my unread messages from top chats"
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-mcp
Telegram MCP server that gives AI agents full access to your chats, channels, and groups. Works with any MCP-compatible client (Claude Code, Cursor, etc.). Built with Telethon.
Read messages, send replies, and organize your Telegram: auto-categorize channels into folders, mute noisy chats, archive stale ones, and clean up subscriptions. See AGENTS.md for ready-to-use workflows.
What can it do?
Read - list chats/channels/groups, fetch and search messages, get chat details
Write - send, edit, delete, and forward messages, pin/unpin, mark as read
Organize - archive/unarchive, mute/unmute, create and manage chat folders
AI Workflows
The tools are designed to work together for multi-step organization tasks. AGENTS.md includes ready-to-use workflows:
Auto-organize channels into folders - fetch all channels, sample recent messages to infer topics, group into themed folders
Identify cleanup candidates - find inactive or high-unread channels, suggest archive/mute/unsubscribe
Triage unread messages - summarize what's important across chats, bulk mark-read the rest
Reorganize existing folders - audit folder structure, find uncategorized chats, restructure
Setup
1. Get Telegram API credentials
Go to my.telegram.org/apps and create an application. You'll get an API_ID and API_HASH.
2. Install
git clone https://github.com/VovaVindar/telegram-mcp.git
cd telegram-mcp
python3 -m venv .venv
.venv/bin/pip install -e .3. Configure
cp .env.example .env
# Edit .env with your API_ID and API_HASH4. Authenticate
.venv/bin/python3 telegram_mcp_server.pyScan the QR code with your Telegram app (Settings > Devices > Link Desktop Device). This creates a telegram.session file that stores your auth state.
5. Connect to Claude Code
The .mcp.json file registers the server automatically. Just open Claude Code in this directory and the tools will be available.
To use it from any directory, add this to your ~/.claude/claude_code_config.json:
{
"mcpServers": {
"telegram-mcp": {
"command": "/absolute/path/to/telegram-mcp/.venv/bin/fastmcp",
"args": ["run", "/absolute/path/to/telegram-mcp/telegram_mcp_server.py"]
}
}
}Available Tools
Tool | Description |
| List chats/channels/groups with optional filter |
| Fetch messages (use |
| Search messages by text, optionally within a chat |
| Get details about a chat or user |
| Send a message (supports reply) |
| Edit an existing message |
| Delete messages by ID |
| Forward messages between chats |
| Archive a chat |
| Unarchive a chat |
| Pin a message in a chat |
| Unpin a message |
| Mark all messages in a chat as read |
| Mute a chat (optionally for N hours) |
| Unmute a chat |
| List all chat folders |
| Create a new folder with specified chats |
| Rename or modify folder chats |
| Delete a folder |
Tips
Use
chat_id="me"to target Saved MessagesPaginate with
offset_id: pass the last message ID from the previous batchFolder names are limited to 12 characters by Telegram
License
This server cannot be installed
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
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/VovaVindar/telegram-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server