MCP Integration example with Telegram
@arananet
About MCP Integration example with Telegram
A Python-based Model Context Protocol (MCP) client and server that enables LLMs to send notifications via Telegram and receive user responses.
Basic information
Config
Add this server to your MCP-compatible client using the configuration below.
{
"mcpServers": {
"mcp-telegram-poc": {
"command": "python3",
"args": [
"-m",
"venv",
".venv"
]
}
}
}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 Integration example with Telegram?
A Python-based Model Context Protocol (MCP) client and server that enables LLMs to send notifications via Telegram and receive user responses. It decouples the LLM’s reasoning from the execution of external actions, making tool integration more modular and maintainable.
How to use MCP Integration example with Telegram?
Clone the repository, install dependencies (pip install -r requirements.txt), create a virtual environment, and fill in your Telegram credentials in a .env file (Telegram bot token, chat ID, OpenAI API key). Run the server with python3 src/mcp_handler.py, or test client interaction with python3 examples/test_client.py. The server exposes two tools: send_alert (sends a Telegram message) and check_reply (polls for replies).
Key features of MCP Integration example with Telegram
- Send text alerts to Telegram with customizable urgency levels
- Check for user replies with configurable timeouts
- Integration with MCP‑compatible LLM applications
- Decouples reasoning from execution for safer tool use
- Update external tools without changing LLM prompts
- Supports AutoGen 0.4 framework integration
Use cases of MCP Integration example with Telegram
- Notify a user of critical events and wait for confirmation
- Enable an LLM to send alerts and process human feedback
- Prototype MCP‑based tool integrations with messaging platforms
- Demonstrate modular architecture for LLM‑driven workflows
FAQ from MCP Integration example with Telegram
How does MCP differ from function calls or agent tools?
MCP separates the LLM’s decision‑making from execution; you can swap out tools without modifying the LLM. Direct function calls or agent methods mix logic, making maintenance harder.
What are the prerequisites?
Python 3.11+, a Telegram bot token (from @BotFather), your Telegram chat ID, and an OpenAI API key.
How do I get a Telegram bot token and find my chat ID?
Chat with @BotFather on Telegram, send /newbot, and follow the prompts. To find your chat ID, send a message to your bot, then visit https://api.telegram.org/bot<YOUR_BOT_TOKEN>/getUpdates and look for the chat object’s id field.
What runtime environment is needed?
The server runs as a standalone Python script. Use a virtual environment and install dependencies from requirements.txt. It is tested on Linux/macOS.
Are there known limits?
The README does not specify limits beyond the configurable timeout_seconds for check_reply (default 60 seconds). The server uses polling for replies.
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.
Email sending MCP 💌
resendThe official MCP server to send emails and interact with Resend
slack-mcp-server
ubie-ossA Slack MCP server
Outlook MCP Server
Wallisking1991feishu-tools-mcp
Li-vienMCP server provides Feishu related operations to AI encoding agents such as cursor 飞书MCP插件,读取文档、发送消息、合同审批、数据处理.....
Comments