Skip to main content
Glama
aralroca
by aralroca

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

  1. Agent (Local) → calls ask_telegram_confirmation

  2. Local Proxy (mcp-server.js) → calls POST /api/confirm on Vercel

  3. Vercel → sends a message to the Telegram Bot

  4. User → replies YES/NO on mobile

  5. Telegram → calls the Webhook POST /api/webhook on Vercel

  6. Vercel → saves the response in Redis (Upstash)

  7. Local Proxy → receives the response by polling GET /api/confirm-status

  8. Agent → 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 install

2. Configure Telegram

  1. Talk to @BotFather to create a bot (/newbot).

  2. Save the BOT_TOKEN.

  3. Get your CHAT_ID (send a message to the bot and check https://api.telegram.org/bot<TOKEN>/getUpdates).

3. Deploy to Vercel

npm run deploy

Configure 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/webhook

Troubleshooting 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 → SettingsDeployment 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:

  1. The agent will call the tool from the telegram-bot server.

  2. You will receive a message from your bot on Telegram: Should I proceed? Reply: YES / NO.

  3. The agent will stay in a "waiting" state while polling Vercel.

  4. Once you reply YES or NO on your phone, the agent will receive the answer and continue its task.

Available Tools

1 tool
ask_telegram_confirmationC

Sends a question to the user via Telegram and waits for a YES/NO response.

ParametersJSON Schema
NameRequiredDescriptionDefault
questionYesThe question to ask the user

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions sending a question and waiting for a response, which implies interactive behavior and potential delays, but fails to detail critical aspects like timeout handling, error responses, authentication needs, or whether this is a blocking operation. The description is too sparse for a tool that interacts with external systems.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that directly states the tool's function without unnecessary words. It is front-loaded with the core action and outcome, making it easy to parse quickly, which is ideal for conciseness.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (interactive user communication via Telegram) and the lack of annotations and output schema, the description is insufficient. It omits details on response format, error handling, timeouts, and operational constraints, leaving significant gaps for an agent to use this tool effectively in real-world scenarios.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema description coverage is 100%, with the single parameter 'question' documented in the schema. The description adds no additional semantic context beyond what the schema provides (e.g., format examples or constraints), so it meets the baseline for adequate but unenriched parameter documentation.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('sends a question... and waits for a YES/NO response') and the target ('to the user via Telegram'), providing a specific verb+resource combination. However, with no sibling tools mentioned, there's no opportunity to distinguish from alternatives, which prevents a perfect score.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage for obtaining binary confirmation from users via Telegram but offers no explicit guidance on when to use this tool versus alternatives (e.g., other confirmation methods or direct actions). There's no mention of prerequisites, error conditions, or contextual constraints, leaving the agent with minimal direction.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. 1 tool updatev1.0.0
    • First observedask_telegram_confirmation

TDQS

B3/5.0
Disambiguation5/5

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.

Naming Consistency5/5

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.

Tool Count2/5

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.

Completeness1/5

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

ActivityInactive
ResponsivenessSyncing

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    D
    maintenance
    Human-in-the-Loop authorization gateway for AI Agents. Securely pause MCP workflows and route high-risk actions to human approvers via Slack or Email.
    115
    1
    MIT
  • A
    license
    Not graded
    quality
    C
    maintenance
    A 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.
    192
    4
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    An MCP server that enables AI agents to pause and request human approval or information via Slack, Telegram, or macOS dialogs before proceeding with actions.
    15
    Apache 2.0

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/aralroca/telegram-bot-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server