MCP Telegram Server
@leshchenko1979
About MCP Telegram Server
Telegram MCP Server - now you can talk to your Telegram from Cursor
Config
Add this server to your MCP-compatible client using the configuration below.
{
"mcpServers": {
"tg_mcp": {
"command": "python",
"args": [
"setup_telegram.py"
]
}
}
}Tools
No tools detected
We auto-extract tools from the README. The maintainer can list them under a ## Tools heading to populate this section.
Overview
What is MCP Telegram Server?
MCP Telegram Server is an MCP (Model Control Protocol) server that provides Telegram functionality through a clean API interface, including message search, sending, and chat management capabilities. It is built for MCP‑compatible environments like Cursor IDE and allows AI agents to interact with Telegram chats programmatically.
How to use MCP Telegram Server?
Clone the repository, install dependencies with pip install -r requirements.txt, create a .env file with your Telegram API credentials, and run python setup_telegram.py to authenticate. Then start the server with mcp run <path>/server.py. For Cursor IDE, add the server to a .cursor/mcp.json file. After configuration, all Telegram tools are available inside the IDE.
Key features of MCP Telegram Server?
- Message search with basic, advanced, and regex pattern modes
- Send messages with optional reply support
- List, manage, and generate links for Telegram chats
- Chat statistics and data export functionality
- Robust error handling and logging
- Built on the MCP architecture for AI integration
Use cases of MCP Telegram Server?
- Search and retrieve messages from Telegram chats using text or patterns
- Send automated messages or replies to specific chats
- Export chat data for analysis or backup
- Integrate Telegram tools into MCP‑compatible development environments
- Monitor chat statistics and generate message links
FAQ from MCP Telegram Server
What are the prerequisites for running MCP Telegram Server?
You need Python 3.x, Telegram API credentials (API_ID, API_HASH, PHONE_NUMBER), and an MCP‑compatible environment (e.g., Cursor IDE).
How do I authenticate with Telegram?
Run python setup_telegram.py from the project root. This creates a session file (mcp_telegram_search.session) that stores your authenticated session.
What tools does the server expose?
It provides search_messages, advanced_search, pattern_search, send_telegram_message, get_dialogs, get_statistics, generate_links, and export_data – all via MCP tools.
Where is session and data stored locally?
An authenticated session file (mcp_telegram_search.session) is created in the project root. Logs are stored in the logs/ directory.
How do I configure for Cursor IDE?
Create a .cursor/mcp.json file with the server definition (command pointing to mcp run and the server script path). The server will connect automatically when the project is opened in Cursor.
Frequently asked questions
What are the prerequisites for running MCP Telegram Server?
You need Python 3.x, Telegram API credentials (API_ID, API_HASH, PHONE_NUMBER), and an MCP‑compatible environment (e.g., Cursor IDE).
How do I authenticate with Telegram?
Run `python setup_telegram.py` from the project root. This creates a session file (`mcp_telegram_search.session`) that stores your authenticated session.
What tools does the server expose?
It provides `search_messages`, `advanced_search`, `pattern_search`, `send_telegram_message`, `get_dialogs`, `get_statistics`, `generate_links`, and `export_data` – all via MCP tools.
Where is session and data stored locally?
An authenticated session file (`mcp_telegram_search.session`) is created in the project root. Logs are stored in the `logs/` directory.
How do I configure for Cursor IDE?
Create a `.cursor/mcp.json` file with the server definition (command pointing to `mcp run` and the server script path). The server will connect automatically when the project is opened in Cursor.
Basic information
More Communication MCP servers
MCP Communicator (Telegram)
qpd-vAn MCP server that enables communication with users through Telegram. This server provides a tool to ask questions to users and receive their responses via a Telegram bot.
Outlook MCP Server
Wallisking1991Telegram MCP server
chaindeadTelegram MCP for managing dialogs, messages, drafts, read statuses, and more.

MailStream
Sponge LabsThe first MCP server for physical mail. Give any MCP-compatible AI agent the ability to send real postcards and letters, verify addresses, manage mailing lists and artwork, and track direct mail campaigns. Remote Streama
Modular Outlook MCP Server
ryakerMCP server for Claude to access Outlook data via Microsoft Graph API
Comments