# ZEGO MCP

> ZEGO / 即构科技 MCP gives your agent full control over live video and audio infrastructure. It lets you manage rooms, check user presence, stop problematic media streams, and audit usage stats—all through natural conversation. Forget switching between 10 different technical dashboards; this connects all RTC operations into one single interface.

## Overview
- **Category:** developer-tools
- **Price:** Free
- **Tags:** rtc-infrastructure, media-streaming, room-management, audio-video-api, live-streaming, stream-control

## Description

You need to orchestrate complex, real-time communications. This MCP connects your agent directly to a global service managing video, audio, and chat rooms. It lets you automate tasks like monitoring who is in which room, tracking how many people are online across regions, or stopping unauthorized media feeds instantly. Instead of running through multiple vendor dashboards just to get status updates, your agent handles the whole process conversationally.

If your job involves live events, moderation, or constant network health checks, this MCP gives you a single source of truth. You can ask your agent to list all active rooms and then follow up by checking the total number of users currently connected globally. Furthermore, if you're building an automated system that needs to know exactly what happened—like tracking video minutes over the last week—you get that data instantly. The platform makes sure everything works safely; for example, when your agent pulls all this operational data, Vinkius AI Analytics gives you full visibility into every single tool call and data point, so nothing happens in the dark.

## Tools

### check_user_status
Checks the current status (online/offline) for a list of specified users.

### get_online_count
Retrieves the total count of all active, logged-in users in the system.

### get_room_streams
Lists every media stream currently running inside a specific room.

### get_room_users
Provides an updated list of all users who are members of a given room.

### get_usage_stats
Gathers detailed statistics on service usage, like video and audio duration, for specific date ranges.

### kick_room_user
Removes a specified user from a room when moderation is necessary.

### list_rooms
Returns a list of all active communication rooms currently running on the platform.

### stop_media_stream
Forces the termination of a specific media stream that needs to be shut down.

## Prompt Examples

**Prompt:** 
```
List all active rooms in our ZEGO project.
```

**Response:** 
```
I've retrieved the list of active rooms. You currently have 3 rooms online: 'Room_A' (12 users), 'Room_B' (5 users), and 'Room_C' (45 users). Would you like to see the members list for one of these rooms?
```

**Prompt:** 
```
Check the status for these users: 'user_01,user_02'.
```

**Response:** 
```
I've checked the status for the requested users. 'user_01' is currently 'Online' and participating in 'Room_A'. 'user_02' is currently 'Offline'. Should I check the total online count for the whole project?
```

**Prompt:** 
```
What is our video usage duration for the last 7 days?
```

**Response:** 
```
I've retrieved the usage statistics. Over the last 7 days, your project has consumed a total of 15,240 minutes of video and 8,500 minutes of audio. Would you like a daily breakdown of this usage?
```

## Capabilities

### Monitor user presence
Check if specific users are currently online or participating in a room.

### Track total network activity
Get a count of all active, online users across the entire system.

### List and manage rooms
See which communication rooms are open right now or list every room's detailed information.

### Manage media feeds
Forcefully stop a specific stream if it’s problematic or unauthorized.

### Control user access
Kick a user out of a room when moderation requires it.

### Audit usage records
Retrieve detailed statistics on how much video and audio time was used over set periods.

## Use Cases

### The moderator needs to police the chat.
A user breaks guidelines in 'Room Alpha.' Instead of manually finding the list of members and then clicking kick, you ask your agent. It checks if the user is online (check_user_status) and executes kick_room_user immediately.

### The ops team needs a quick health check.
At 2 AM, the Ops Engineer needs to know if the platform is stable. They ask for get_online_count. The agent returns the current total user count and confirms API connectivity status instantly.

### The developer needs to validate room state.
Before deploying a feature, the dev runs an automated check: list_rooms shows all active endpoints, and then get_room_users validates that every expected user is accounted for in each space.

### The client needs usage accountability.
Billing questions pop up. You ask your agent what our video usage duration was last month. The agent runs get_usage_stats and provides the exact minutes needed for billing reports.

## Benefits

- Moderation gets easier. You can ask your agent to check the status of specific people or list all members in a room using get_room_users and check_user_status instantly.
- Operational visibility improves dramatically. Get an instant count of total online users with get_online_count, eliminating manual dashboard checks for system health.
- Stream control becomes automated. If something goes wrong during a broadcast, your agent can force-stop the feed using stop_media_stream without you needing to find the right button.
- Auditing is simplified. Instead of running complex reports, ask for usage stats via get_usage_stats and get accurate video/audio duration data immediately.
- Full system overview: list_rooms shows all active spaces, while getting details on streams with get_room_streams gives you a full picture of what's live.

## How It Works

The bottom line is: you talk to your AI agent, and it executes complex communication system checks across the board.

1. Subscribe to this MCP, then provide your ZEGO AppID and ServerSecret credentials.
2. Connect the service key to your agent via Claude, Cursor, or any compatible client.
3. Ask your agent a question like, 'What's happening in our project?'—it handles the rest.

## Frequently Asked Questions

**How do I check user status using the check_user_status tool?**
You simply provide your agent with a comma-separated list of usernames or IDs. The agent runs the check and tells you if each individual is online, offline, or what room they're in.

**What happens when I use get_online_count?**
The system returns a single number: the total count of users who are currently connected to and active on your platform. It’s a quick way to gauge overall site health.

**Can I manage rooms using list_rooms and kick_room_user?**
Yes, you can. First, use list_rooms to see all the active spaces. Then, if moderation requires it, your agent executes kick_room_user against a specific room.

**Does get_usage_stats cover both video and audio?**
Yes, get_usage_stats provides combined service usage statistics for defined periods. You'll get separate counts for video minutes and audio minutes.

**How do I use the `get_room_streams` tool to audit all active media streams in a specific room?**
It lists every currently running audio or video stream within a specified room ID. This allows your agent to monitor what's broadcasting and gives you the necessary context to later call `stop_media_stream` if an unauthorized broadcast is detected.

**What data does `get_room_users` provide compared to just listing active rooms using `list_rooms`?**
`list_rooms` only tells you which rooms are online. However, `get_room_users` requires a room ID and returns a detailed list of every user currently joined inside that specific chat space.

**If I run `kick_room_user` for a member who isn't in the room, how does the MCP handle it?**
The system handles API failures gracefully. If you try to kick a user who doesn't exist or is already disconnected, the MCP will return a precise error code and message instead of failing the entire workflow.

**When running `get_usage_stats`, what parameters define the reporting time window for usage data?**
You must provide explicit start and end timestamps in the request. This ensures that your usage audit is highly precise, allowing you to focus on exactly one day or a specific week's worth of service activity.

**How do I find my ZEGO AppID and ServerSecret?**
Log in to the [ZEGO Admin Console](https://console.zego.im/), create or select a project, and you will find your AppID and ServerSecret in the project configuration or basic information section.

**What is the SignatureNonce used for?**
The SignatureNonce is a random string used to prevent replay attacks. This server automatically generates a fresh nonce for every request to ensure high security for your RTC management.

**Can I kick a user from a specific room?**
Yes! Use the `kick_room_user` tool with the target RoomId and UserId. You can also provide a custom message that the user will see when they are disconnected.