telegram-mcp
Organizes Telegram folders and categories (with read-only or full tool exposure), and lets an agent inspect and restructure chat groupings. It also supports exporting your own messages from accessible groups and public channels into searchable local reports (JSONL, CSV, HTML), and scanning broadcast channels for selected reactions with resumable SQLite checkpoints, plus client settings and proxy transport configuration.
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 Organizer
Organize Telegram folders and categories through the bundled MCP server, and export your own messages from accessible groups and public spaces into searchable local reports. Scan broadcast channels for your selected reactions and resume from SQLite checkpoints.
The bundled telegram-mcp/ adapts chigwell/telegram-mcp. It provides folder/category operations, client settings, proxy support and an explicit read-only tool selection.
Install
Requires Windows and Python 3.12.
python -m venv .venv
.\.venv\Scripts\python -m pip install -r requirements-lock.txt
.\.venv\Scripts\python -m pip install --no-deps ./telegram-mcpRelated MCP server: tgread
Use with an agent
Connect the bundled server to your MCP client using the server setup. Configure your Telegram credentials and session once; the client then exposes the server's tools to the agent. For example, ask:
Show my Telegram folders and suggest a clearer grouping for them.Use TELEGRAM_EXPOSED_TOOLS=read-only for inspection. Folder and category changes require TELEGRAM_EXPOSED_TOOLS=all, which exposes all tools and is the server default. Use the commands below for CLI exports.
Export your account
Copy export.env.example to .env. Set your API ID, API hash and authorized StringSession. Group and public exports read TELEGRAM_SESSION_STRING_SECOND. The reaction scanner reads TELEGRAM_SESSION_STRING.
.\.venv\Scripts\python audit/export_second_group_messages.py --env-file .env --output-stem audit/second-account-group-messages
.\.venv\Scripts\python audit/export_second_public_messages.py --env-file .env --output-stem audit/second-account-public-messages
.\.venv\Scripts\python audit/scan_first_account_reactions.py --env-file .env --account-id 123456789 --workers 1Replace 123456789 with your Telegram user ID. The scanner uses an account-specific checkpoint. It can also read the account ID from an existing my-telegram-group-messages-stats.json.
To resume a reaction scan, repeat the command with the same SQLite file. Incomplete channels resume from the last offset and completed channels are skipped. Reports include channel status. JSONL preserves original text. CSV escapes spreadsheet formulas.
Transport defaults to direct. Proxy options include mtproxy, socks5, socks4 and http. To use an existing TG WS Proxy adapter, select tg-ws-proxy and set TELEGRAM_PROXY_CONFIG explicitly.
Generate HTML from your exports
.\.venv\Scripts\python audit/generate_second_group_messages_html.py --input audit/second-account-group-messages.jsonl --output groups.html
.\.venv\Scripts\python audit/generate_second_public_messages_html.py --input audit/second-account-public-messages.csv --output public.htmlEach generator updates its default report in audit/. Use --output for a new destination and add --overwrite to replace an existing report.
For saved first-account exports, use audit/generate_telegram_messages_html.py with --input and --comments pointing to your CSV files. Open the reports in a browser to search messages, filter by group, space or type, and follow Telegram links. Groups with the same name remain separate by ID. Open t.me/c links with an account that belongs to the group.
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
Telegram CRM: manage contacts, conversations, tickets, campaigns and analytics.
Search, read and reply to your Telegram Business chats, transcribed voice included.
Multi-tenant Telegram gateway for AI agents — HTTP+stdio, 8 tools, MTProto User API
Manage Teletype support conversations, customers, messages, and workspace settings
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to read, send, and organize Telegram messages and chats. Supports tools for listing chats, fetching messages, sending/reply, archiving, muting, and folder management.1MIT
- AlicenseAqualityDmaintenanceEnables reading Telegram channels, groups, and direct messages through an MCP interface, with enforced read-only access so the agent cannot write to them.15MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to manage Telegram chats, messages, contacts, users, groups, and channels via 50+ MCP tools, with a reactive inbox and per-topic proxy isolation for multi-agent setups.MIT
- AlicenseNot gradedqualityCmaintenanceEnables AI agents to interact with a personal Telegram account via MCP, offering tools for reading and searching chats, summarizing unread messages, sending and editing messages, handling files and voice transcripts, and managing groups and channels, with read-only mode by default.Apache 2.0