Telegram MCP Bridge
Provides a tool to request human confirmation via a Telegram bot, allowing users to remotely approve or deny an AI agent's actions from their mobile devices.
Click on "Deploy 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 MCP Bridge Ask for my confirmation via Telegram before deleting the project folder."
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 Confirmation MCP Bridge
A simple bridge to request human confirmation via Telegram from an MCP agent (like Antigravity).
Antigravity Configuration
To add this server to your Antigravity configuration (or any MCP client), use the following JSON block.
You need to replace:
<ABSOLUTE_PATH>with the absolute path where you cloned this repository.<YOUR_VERCEL_URL>with your Vercel deployment URL (e.g.,https://my-telegram-bot.vercel.app).
{
"mcpServers": {
"telegram-bot": {
"command": "node",
"args": ["<ABSOLUTE_PATH>/telegram-bot-mcp/mcp-server.js"],
"env": {
"VERCEL_URL": "https://<YOUR_VERCEL_URL>"
}
}
}
}Explanation
This script (mcp-server.js) acts as a local proxy. The agent communicates with it via stdio (standard), and the script makes HTTP requests to your Vercel backend, managing the question delivery and the polling (active waiting) for the response.
Related MCP server: vantagate-mcp-server
Architecture
Agent (Local) → calls
ask_telegram_confirmationLocal Proxy (
mcp-server.js) → callsPOST /api/confirmon VercelVercel → sends a message to the Telegram Bot
User → replies YES/NO on mobile
Telegram → calls the Webhook
POST /api/webhookon VercelVercel → saves the response in Redis (Upstash)
Local Proxy → receives the response by polling
GET /api/confirm-statusAgent → receives the result "User replied: YES"
Installation and Deployment
1. Clone and Prepare
git clone https://github.com/aralroca/telegram-bot-mcp.git
cd telegram-bot-mcp
npm install2. Configure Telegram
Talk to
@BotFatherto create a bot (/newbot).Save the
BOT_TOKEN.Get your
CHAT_ID(send a message to the bot and checkhttps://api.telegram.org/bot<TOKEN>/getUpdates).
3. Deploy to Vercel
npm run deployConfigure environment variables in Vercel:
BOT_TOKEN: Your Telegram token.CHAT_ID: Your chat ID.ALLOWED_USER_ID: Your numeric user ID (for security).
Configure Upstash Redis (from Vercel Marketplace) for persistence.
4. Configure Webhook
Once deployed, register the Telegram webhook using your Vercel URL:
https://api.telegram.org/bot<BOT_TOKEN>/setWebhook?url=https://<YOUR_VERCEL_URL>/api/webhookTroubleshooting and Tips
1. Vercel "401 Unauthorized"
If the agent receives a 401 error, it's likely due to Vercel Deployment Protection.
Go to your Vercel Dashboard → Settings → Deployment Protection.
Disable "Vercel Authentication".
This allows the local MCP proxy and Telegram webhooks to reach your API.
2. Forbidden (403)
Make sure the ALLOWED_USER_ID in your Vercel environment variables matches your actual Telegram User ID. You can find your ID by sending a message to @userinfobot.
3. State Persistence (Redis)
This bridge uses Redis to keep track of questions while waiting for your reply.
Use the Vercel Marketplace to add Upstash Redis.
Ensure it's Connected to your project in the Storage tab.
We support both REST protocol (
UPSTASH_REDIS_REST_URL) and standard Redis protocol (REDIS_URL).Redeploy your project after connecting the storage.
4. Continuous Polling (Wait state)
If the agent stays in a "Waiting" state even after you reply "YES":
Check if Redis is correctly initialized by visiting
https://<YOUR_VERCEL_URL>/health.You should see
"redis_initialized": true.
5. Stable URLs
Always use the Production Domain (e.g., my-project.vercel.app) in your Antigravity configuration VERCEL_URL environment variable. Using the specific deployment URL (the one with the hash) will stop working after your next deploy.
How to use with an Agent
To trigger the confirmation, you should invoke the MCP server by its name (defined in your configuration, e.g., telegram-bot) in your prompt. This helps the agent select the correct tool.
Example Prompts:
"Use telegram-bot to ask for my confirmation before deleting any file."
"Tell telegram-bot to send me a confirmation request to proceed with the deployment."
What happens next:
The agent will call the tool from the
telegram-botserver.You will receive a message from your bot on Telegram:
Should I proceed? Reply: YES / NO.The agent will stay in a "waiting" state while polling Vercel.
Once you reply YES or NO on your phone, the agent will receive the answer and continue its task.
Available Tools
1 toolask_telegram_confirmationC
Sends a question to the user via Telegram and waits for a YES/NO response.
Inputs: question (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 1 tool
With only one tool, there is no possibility of ambiguity or overlap between tools. The tool's purpose—sending a yes/no confirmation question via Telegram—is clearly distinct by default.
A single tool inherently has perfect naming consistency, as there are no other tools to compare it against. The name 'ask_telegram_confirmation' follows a clear verb_noun pattern.
One tool is too few for a server named 'Telegram MCP Bridge,' which implies broader Telegram functionality. This feels thin and incomplete for the apparent scope of bridging Telegram interactions.
The tool set is severely incomplete for a Telegram bridge. It lacks basic operations like sending messages, receiving updates, managing chats, or handling files, leaving major gaps in the domain coverage.
Maintenance
Related MCP Connectors
Zero-secret MCP gateway for AI agents: risk-scored, audited calls with human-in-the-loop approval.
Human-in-the-loop for AI agents over MCP: durable approvals with a hosted review page & audit trail
Telegram bridge for your MCP-compatible agent. Bidirectional, no LLM in our stack.
Impri MCP server — human-in-the-loop approval inbox for AI agents
Related MCP Servers
- FlicenseAqualityAmaintenanceBridges AI assistants to a Telegram bot to enable two-way messaging, interactive confirmations, and live status updates. It supports automatic voice transcription via local Whisper models and provides secure, single-user communication for MCP-compatible hosts.46-
- AlicenseNot gradedqualityDmaintenanceHuman-in-the-Loop authorization gateway for AI Agents. Securely pause MCP workflows and route high-risk actions to human approvers via Slack or Email.56 npm1MIT
- FlicenseNot gradedqualityDmaintenanceA Telegram-integrated MCP server that enables remote control of Claude sessions through a Telegram bot, including chat, tool approvals, task tracking, and workspace management. It provides a MiniApp interface for real-time monitoring and control of Claude's activities from mobile devices.4-
- AlicenseAqualityAmaintenanceAn MCP server that enables AI agents to pause and request human approval or information via Slack, Telegram, or macOS dialogs before proceeding with actions.215Apache 2.0