# ZegoCloud MCP

> ZegoCloud MCP handles real-time communication control, letting your agent moderate video/voice chats and send messages programmatically. Use it to kick out disruptive users from virtual rooms, stop live streams instantly by ID, or manage private peer-to-peer messaging without touching an admin dashboard.

## Overview
- **Category:** developer-tools
- **Price:** Free
- **Tags:** rtc, video-chat, messaging-api, moderation, live-streaming

## Description

You can connect ZegoCloud's infrastructure to any AI client to manage and control real-time video, voice, and text environments using plain language instructions. This lets your agent handle moderation tasks—like kicking out disruptive participants or sending technical messages—as if a human operator was typing the commands into an internal dashboard.

Managing these live interactions used to mean constantly switching tabs and running around manually. Now, you simply tell your agent what needs to happen. You can manage communication rooms entirely from your chat window. Because ZegoCloud handles all connections through Vinkius, you get full visibility via Vinkius AI Analytics; nothing happens in the dark. This audit trail lets you see exactly which moderation actions were taken and when they occurred, keeping a clean record of every interaction.

## Tools

### kickout_user
This tool removes a specific user from a given virtual room.

### send_peer_message
It sends a private, text-based message between two specified users.

### stop_publish
This command manually ends an active video or audio stream broadcast using its unique ID.

## Prompt Examples

**Prompt:** 
```
Kick user 'user_88' from room 'main_lobby' for inappropriate behavior.
```

**Response:** 
```
I have successfully removed 'user_88' from the room 'main_lobby'. The reason provided was 'inappropriate behavior'.
```

**Prompt:** 
```
Stop the broadcast for stream ID 'stream_v_123'.
```

**Response:** 
```
The stream 'stream_v_123' has been stopped. The publishing session is now terminated.
```

**Prompt:** 
```
Send a text message 'Hello from support' to user 'client_01' from 'admin_user'.
```

**Response:** 
```
Message sent successfully. 'client_01' has received the text: 'Hello from support'.
```

## Capabilities

### Remove disruptive participants
The agent can instantly eject specific users from any virtual room by calling the kickout_user tool.

### Send targeted private messages
You can send text messages directly between two users using the send_peer_message tool, regardless of whether they are in a public room.

### Halt live broadcasts
The agent terminates active streaming sessions immediately by supplying the unique stream ID to stop_publish.

## Use Cases

### Handling a disruptive attendee during a conference
A moderator notices a user spamming the chat. Instead of manually logging into the admin panel, they prompt their agent: 'Kick user X from room Y for harassment.' The kickout_user tool runs immediately, resolving the issue without delay.

### Diagnosing a connection failure post-launch
A support engineer knows a client is having audio issues. They use send_peer_message to send specific diagnostic commands directly to the user's chat window, bypassing public announcements and getting immediate feedback.

### Ending an unauthorized stream broadcast
Someone starts broadcasting sensitive material unexpectedly. The agent is prompted with 'Stop streaming for ID 12345.' It calls stop_publish immediately, terminating the content feed before damage can be done.

### Automating post-event cleanup
An event manager needs to ensure all streams end after a session. They chain commands, first calling kickout_user for departing users, and then running stop_publish on every associated stream ID in sequence.

## Benefits

- Moderation becomes instant. You can tell your agent to execute the kickout_user tool if a participant breaks rules; no manual clicking is needed.
- Never worry about orphaned streams again. Use the stop_publish tool to halt any broadcast instantly just by giving it the stream ID.
- Support communication improves dramatically when you use send_peer_message, allowing your agent to talk directly to a client user without them having to initiate contact.
- Managing rooms is easier than ever. You can orchestrate complex messaging and moderation tasks across multiple users through one simple prompt.
- You keep perfect records of everything. Vinkius AI Analytics ensures that every kickout_user action or stream stop has an immutable, auditable trail attached to it.

## How It Works

The bottom line is you stop using dashboards and start talking directly to the system.

1. First, subscribe to this MCP and input your ZegoCloud App ID, Server Secret, and API URL.
2. Next, connect your preferred AI client (like Claude or Cursor) from that single point of connection. You'll never have to manage credentials outside the platform.
3. Finally, prompt your agent with natural language instructions—for example, 'Stop the broadcast for stream ID XYZ'—and it executes the command.

## Frequently Asked Questions

**Can I remove a specific user from a video room if they are violating terms?**
Yes. Use the `kickout_user` tool by providing the Room ID and User ID. You can also include a custom reason for the removal.

**How do I stop a live stream that is currently broadcasting?**
Simply use the `stop_publish` tool with the specific Stream ID. This will immediately terminate the broadcast for that stream.

**Is it possible to send a private system command to a user's application?**
Yes. The `send_peer_message` tool allows you to send messages with type '2' (Command), which can be used to trigger logic within the recipient's app.

**How does Vinkius handle authentication when I use the `kickout_user` tool?**
Your credentials pass through a zero-trust proxy and are never stored on disk. Vinkius handles all secret management, so you don't worry about key persistence or security risks when calling this MCP.

**If I run `send_peer_message` with an invalid recipient ID, what kind of error response should I expect?**
The system returns a clear status code and message detailing the failure. This allows your agent to catch the specific API exception and retry or notify the user correctly.

**Are there rate limits for calling `stop_publish` on multiple streams in quick succession?**
While there are internal platform limitations, Vinkius optimizes calls with native token support. You can manage many streams efficiently without hitting typical usage caps.

**When I use the `send_peer_message` tool, is the message scope restricted to the current virtual room?**
Yes, the messaging tool keeps communication contained within the defined context. This ensures that peer-to-peer messages stay relevant and scoped correctly for the users in that specific chat environment.

**Does running `kickout_user` generate an auditable record of the moderation action?**
Every tool call generates a cryptographically signed audit trail. You get a tamper-proof log recording who, when, and why the user was kicked from the room.