Telegram Notify MCP Server
Connects VS Code Copilot to Telegram for mobile notifications, interactive approval workflows, and remote command input. Enables users to monitor AI agents, approve sensitive operations, and provide follow-up instructions from their smartphone.
README
mcp-telegram-notify
A Model Context Protocol (MCP) server that bridges VS Code Copilot with Telegram, enabling mobile notifications, approval workflows, and remote prompt input from your smartphone.
Features
- Notifications — Send task completion reports to Telegram
- Approval Flow — Inline keyboard buttons for approve/reject decisions
- Remote Prompt — Receive next instructions from your phone via free-text response
- File Sharing — Send files (logs, JSON results) directly to Telegram
Use Case: Copilot Autopilot + Mobile Control
VS Code Copilot (Autopilot mode, auto-approve ON)
→ Executes tasks automatically
→ Asks approval via Telegram before destructive ops
→ Reports completion to your phone
→ Waits for your next instruction via Telegram
→ Continues working
No need to be at your desk — control Copilot entirely from your smartphone.
Installation
pip install mcp-telegram-notify
Or install from source:
git clone https://github.com/NobufumiMurata/mcp-telegram-notify.git
cd mcp-telegram-notify
pip install -e ".[dev]"
Setup
1. Create a Telegram Bot
- Open Telegram and message @BotFather
- Send
/newbotand follow the prompts - Copy the bot token
2. Get Your Chat ID and User ID
Send any message to your bot, then:
curl "https://api.telegram.org/bot<YOUR_TOKEN>/getUpdates"
From the response, note:
"chat": {"id": ...}→ your Chat ID"from": {"id": ...}→ your User ID (for the allowlist)
3. Configure VS Code MCP
Add to your .vscode/mcp.json:
{
"servers": {
"telegram-notify": {
"command": "python",
"args": ["-m", "mcp_telegram_notify"],
"env": {
"TELEGRAM_BOT_TOKEN": "<your-bot-token>",
"TELEGRAM_CHAT_ID": "<your-chat-id>",
"TELEGRAM_ALLOWED_USERS": "<your-user-id>"
}
}
}
}
Alternative: JSON Config File
Instead of environment variables, you can use a JSON config file:
{
"bot_token": "<your-bot-token>",
"chat_id": "<your-chat-id>",
"allowed_users": ["<your-user-id>"]
}
Then set TELEGRAM_CONFIG_PATH to point to the file:
{
"servers": {
"telegram-notify": {
"command": "python",
"args": ["-m", "mcp_telegram_notify"],
"env": {
"TELEGRAM_CONFIG_PATH": "secrets/telegram-bot.json"
}
}
}
}
MCP Tools
| Tool | Description | Key Args |
|---|---|---|
telegram_notify |
Send a text message (HTML) | message |
telegram_ask_approval |
Inline buttons + wait for selection | question, options, timeout_minutes |
telegram_wait_response |
Send prompt + wait for free-text reply | prompt, timeout_minutes |
telegram_send_file |
Send a file | file_path, caption |
Example: Copilot Agent Instructions
Add to your .github/agents/*.agent.md to make Copilot use these tools automatically:
## Notification Rules (Telegram MCP)
- Before destructive operations (VM stop/delete, resource deletion, network changes),
use telegram_ask_approval to get explicit user approval
- After completing a task, use telegram_notify to send a summary report
- After sending the report, use telegram_wait_response to receive the next instruction
- Treat the received instruction as a new task and continue processing
Security
- User allowlist: Only messages from
TELEGRAM_ALLOWED_USERSare accepted. All other users are silently ignored. - Timeouts: All waiting operations have configurable timeouts (default: 5 min for approval, 10 min for text). Returns
TIMEOUTstatus on expiry. - No secrets in repo: All credentials via environment variables or external config file.
- Stale update draining: Old Telegram updates are consumed before waiting, preventing stale responses from being accepted.
Development
git clone https://github.com/NobufumiMurata/mcp-telegram-notify.git
cd mcp-telegram-notify
pip install -e ".[dev]"
pytest
License
MIT
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.