# Telegram Bot MCP

> Telegram Bot MCP lets your AI agent manage and administer any Telegram bot without touching code or a terminal. Instantly send rich media, audit group membership lists, check chat details, and automate complex messaging workflows using natural conversation through Vinkius.

## Overview
- **Category:** talk-to-me
- **Price:** Free
- **Tags:** bot-management, chat-administration, real-time-messaging, webhook, api-integration, notifications

## Description

This connector turns tedious bot administration into a conversation with your AI client. Instead of logging into the Bot API documentation to figure out how to do something, you just ask your agent. You can send formatted text or photos directly to users and groups, perfect for support instructions or announcements. Need to know who has admin access in a large group? Your agent runs an audit right away, giving you a list of admins and the current member count. Plus, you can manage the backend setup, like setting up webhooks or deleting them if needed. If your bot needs to leave a supergroup because it's irrelevant, it handles that too. Connecting this MCP through Vinkius means all these advanced features are available instantly within any compatible client, letting your agent act as a real-time bot operator for everything from customer support to community management.

## Tools

### delete_webhook
Removes a currently set Telegram web address (webhook).

### get_chat_administrators
Retrieves the list of users who have administrator rights in a chat.

### get_chat_member_count
Counts and reports the total number of members in a specific chat or group.

### get_chat
Retrieves detailed information about a specified Telegram chat.

### get_file
Gets metadata and details for any media file shared with the bot.

### get_me
Retrieves basic status information about the connected Telegram bot itself.

### get_updates
Fetches and reports on the most recent events or messages sent to the bot.

### get_webhook_info
Checks and returns the current status of the active Telegram webhook settings.

### leave_chat
Instructs the connected bot to automatically exit a chat or group.

### send_message
Sends plain text messages to specified users or groups instantly.

### send_photo
Transmits one or more photos along with a message caption.

### set_webhook
Establishes and sets the official web address (webhook) for your bot.

## Prompt Examples

**Prompt:** 
```
Send 'Hello from Vinkius!' to chat ID 12345678.
```

**Response:** 
```
Message delivered! I've sent your greeting to chat 12345678. The message ID is 42 and it was delivered instantly.
```

**Prompt:** 
```
Get my Telegram bot details.
```

**Response:** 
```
I've retrieved your bot info. Your bot name is 'VinkiusHelperBot' (@vinkius_bot). It has access to groups and is currently online.
```

**Prompt:** 
```
Who are the admins in chat -100123456789?
```

**Response:** 
```
I've found 3 administrators in that chat: 'Marcus R.' (Owner), 'Jane Doe', and 'BotAssistant'. Would you like their specific permission sets?
```

## Capabilities

### Send multimedia messages
Your agent sends formatted text and photos immediately to specific users or entire groups.

### Audit chat status
You check the full details of a chat, list all administrators, and retrieve the total number of members in any group.

### Manage bot backend settings
The agent can inspect or change webhooks and fetch recent updates without manual API calls.

### Handle shared files
You retrieve metadata about media files that were shared with your bot, keeping records organized.

### Automate group membership
The agent autonomously leaves a supergroup or chat when its purpose has changed.

## Use Cases

### Post-Launch Group Cleanup
The Ops Lead notices a community group has gone dormant. They prompt their agent, which first runs `get_chat_member_count` to confirm low activity, and then executes the `leave_chat` tool, removing the bot from dead groups automatically.

### Handling Support Escalations
A support team member needs to guide a user. They use their agent to run `send_photo`, sending a step-by-step image instruction directly into the chat thread, keeping the conversation visual and contained.

### Developer Bot Health Check
A developer wants to verify if the bot is connected properly. They ask their agent to run `get_webhook_info` and then immediately use `get_me` to confirm the bot's current status.

### Onboarding New Admins
A community manager needs to verify who has permissions. They ask their agent to run `get_chat_administrators`, instantly receiving a list of all high-level users in the chat for review.

## Benefits

- Stop manually checking group rosters. Using the `get_chat_administrators` tool lets your agent instantly audit who has admin access in a large community chat.
- Need to send instructions? Instead of drafting it and hitting 'send' multiple times, you can use `send_photo` or `send_message` to deliver rich media or text updates directly from your workspace.
- Managing bot infrastructure used to mean writing code. Now, the agent handles complex setups using tools like `set_webhook` or `delete_webhook`, letting you manage webhooks with simple prompts.
- Group health matters. You can use `get_chat_member_count` and then instruct your agent to execute `leave_chat` if the group falls below a required size threshold.
- When troubleshooting, instead of logging into the API dashboard, simply ask for recent updates using `get_updates` to see exactly what happened in the chat.

## How It Works

The bottom line is you talk to your agent how you normally would; it handles the complex chat administration logic behind the scenes.

1. Subscribe to this MCP and provide your unique Telegram Bot Token (obtained from @BotFather).
2. Connect the token to your preferred AI client, like Cursor or Claude.
3. Ask your agent a question, such as 'List all admins in group X,' and it executes the necessary commands automatically.

## Frequently Asked Questions

**How do I use Telegram Bot MCP to send a photo?**
You simply tell your agent, 'Send a guide photo about X.' It uses the `send_photo` tool, ensuring the image and any caption are delivered correctly.

**Does Telegram Bot MCP let me check group membership? **
Yes. Your agent runs `get_chat_member_count` to give you an immediate count of how many people are in the chat, and you can also use `get_chat_administrators` to see who has permissions.

**What is the difference between using MCP and just calling the API directly?**
Using this MCP means your AI agent handles the whole process. You don't worry about the syntax; you just ask for the outcome, letting the agent run tools like `get_updates` in the background.

**Can I make my bot leave a group using Telegram Bot MCP?**
Absolutely. If your bot needs to exit a chat because it's no longer relevant, you prompt the agent to use the `leave_chat` tool, and it handles the departure.

**How do I set up webhooks with Telegram Bot MCP?**
You tell your agent what needs doing. It uses the `set_webhook` tool to establish the necessary connection point for your bot's communication flow.