# Agora MCP

> Agora MCP manages real-time video and voice communications directly from your agent. It gives you programmatic control over streaming sessions, allowing you to list active users in channels, start or stop cloud recordings, and monitor granular usage data like bandwidth consumption. You can also manage the underlying projects and configure whiteboard rooms without ever leaving your development environment.

## Overview
- **Category:** infrastructure
- **Price:** Free
- **Tags:** agora-rtc, real-time-video, voice-chat, cloud-recording, streaming-api, interactive-engagement

## Description

This MCP connects your AI client to Agora's platform for video, voice, and interactive streaming services. Instead of logging into a console or writing complex SDK calls, you just ask your agent what needs to happen. You can programmatically create and manage communication channels; need to archive a meeting? Your agent handles the cloud recording lifecycle—starting it, monitoring its status, and stopping it when done. It also pulls detailed project metrics on usage and bandwidth consumption. If you're managing multiple systems, Vinkius makes sure that connection remains stable, giving your agent access to all these core functions in one place. This means you can automate everything from checking channel occupancy to generating compliance reports based on recorded sessions.

## Tools

### acquire_cloud_recording
Requests a resource ID needed before you can begin cloud recording for an Agora session.

### create_project
Initializes and creates entirely new Agora projects within the platform.

### get_project_details
Retrieves specific, detailed information about a chosen project's configuration.

### get_usage_stats
Queries and returns usage data for a specific project, detailing consumed resources.

### list_active_calls
Retrieves a list of all ongoing real-time communication calls and active sessions.

### list_projects
Lists every Agora project that has been set up in your console for quick reference.

### list_whiteboard_rooms
Shows a list of all active interactive whiteboard rooms currently running.

### query_cloud_recording
Checks the current status and progress of an ongoing cloud recording task.

### start_cloud_recording
Begins recording a specified channel, sending the stream data to the cloud for later retrieval.

### stop_cloud_recording
Immediately halts an active cloud recording session that is currently running.

## Prompt Examples

**Prompt:** 
```
List all users currently connected to Agora channel 'room_101' in project 'app_abc'.
```

**Response:** 
```
Retrieving channel users... I found 3 UIDs connected to 'room_101': 1. UID: 777, 2. UID: 888, 3. UID: 999. Would you like to check the connection quality for any of these users?
```

**Prompt:** 
```
Start a cloud recording for channel 'webinar_live' with AppID 'my_agora_app_id'.
```

**Response:** 
```
Initializing Agora cloud recording... Success! The recording session for 'webinar_live' has started. Resource ID: `res_xyz123`, SID: `sid_789abc`. I will monitor the status for you.
```

**Prompt:** 
```
Show my project's RTC usage for the last 7 days.
```

**Response:** 
```
Fetching Agora usage metrics... In the last 7 days, your project consumed 1,200 video minutes (HD) and 450 audio minutes. Peak concurrency was 25 users on April 10th.
```

## Capabilities

### Manage Project Setup
Create and retrieve detailed configurations for Agora projects, ensuring your agent has the correct credentials.

### Monitor Live Calls
List all users currently connected to a specific channel or whiteboarding room.

### Control Cloud Recording
Initiate, check the status of, and terminate cloud recording sessions for auditing purposes.

### Track Usage Metrics
Retrieve usage data detailing consumed minutes, bandwidth peaks, and concurrent user counts over time.

### Configure Channels
Set up channels and adjust specific rules to optimize the real-time interactive experience.

## Use Cases

### Compliance Audit After a Training Session
The PM needs to prove that all 20 participants were present and recorded the discussion. They ask their agent to `start_cloud_recording` for the specific channel, wait until the session ends, then use `stop_cloud_recording` before querying the final record status with `query_cloud_recording`.

### Capacity Planning Review
The Ops Engineer needs to predict next month's bill. They tell their agent to run `get_usage_stats` for the last quarter, which pulls detailed metrics on minutes consumed and peak concurrency, allowing immediate budget adjustments.

### Real-Time Troubleshooting
A developer sees an intermittent connectivity issue. They ask their agent to run `list_active_calls` immediately to see if the failure correlates with a sudden spike in concurrent users or active whiteboard rooms, helping pinpoint the exact moment of failure.

### Initial Client Integration
A full-stack developer is setting up a new client. They use their agent to `create_project` first, then ask it to pull all necessary credentials using `get_project_details` so they can plug them into the application code.

## Benefits

- You get immediate visibility into usage. Instead of digging through dashboards, running `get_usage_stats` gives you the exact video minutes and bandwidth consumed for a given project.
- Archival is simple. You can start recording a session using `start_cloud_recording`, and later confirm its status with `query_cloud_recording`, all via natural language prompts to your agent.
- Channel management is instant. If you need to know who's in the meeting, running `list_active_calls` gives you a real-time roster of UIDs without writing any boilerplate code.
- Setup and maintenance are streamlined. Use `create_project` when starting a new client integration; your agent handles the initial project setup flow for you.
- Debugging is faster. Need to know what rooms are active? Running `list_whiteboard_rooms` instantly lists every interactive session running right now.

## How It Works

The bottom line is that you tell your AI client what state you need—whether it's a report or an active recording—and it runs the necessary sequence of calls to make it happen.

1. First, your agent uses `list_projects` to identify all available Agora projects in your console.
2. Next, you direct your agent to use a function like `acquire_cloud_recording` to secure the necessary resource ID for recording.
3. Finally, your agent executes `start_cloud_recording` with the required credentials and channel details, immediately giving you confirmation of the active session.

## Frequently Asked Questions

**How do I check who is on an active channel using list_active_calls?**
You simply ask your agent to run `list_active_calls` for the specific room. It pulls a real-time roster, giving you UIDs and connection status without needing manual UI interaction.

**What is the difference between list_projects and get_project_details?**
`list_projects` gives you a master list of every project ID. You then use `get_project_details` to pull all the specific, required data—like AppIDs or token settings—for one selected project.

**Can I stop a recording using stop_cloud_recording?**
Yes. If a session is finished early, you can use `stop_cloud_recording`. This function immediately halts the stream and prevents unnecessary billing or data transfer.

**Do I need to run acquire_cloud_recording before start_cloud_recording?**
Yes. You must first call `acquire_cloud_recording` to secure a unique resource ID. This ID is required input for the `start_cloud_recording` tool to function.

**When I use `create_project`, what does the tool handle for my Agora environment?**
It provisions a completely isolated Agora project structure. This ensures that your testing and production environments remain separate, preventing accidental data overlap or configuration conflicts between different applications.

**When I use `get_usage_stats`, what specific dimensions of usage can I track?**
The tool tracks detailed consumption across video minutes, audio minutes, and peak concurrent users. You get granular data points that help you pinpoint exactly where your bandwidth or compute costs are peaking within the project timeframe.

**How do I check which interactive session is currently active using `list_whiteboard_rooms`?**
This tool provides a real-time list of all active Interactive Whiteboard sessions. You can quickly identify the unique IDs and connection statuses for collaborative rooms without having to manually monitor the platform console.

**What critical information does `get_project_details` return about my project's setup?**
It returns comprehensive details, including the AppIDs and token settings for your specified project. This is crucial for ensuring that your AI agent has the correct credentials and scope to interact with all necessary Agora services securely.

**Can I automatically list all active users in an Agora channel?**
Yes! Use the `list_channel_users` tool with the project AppID and the target Channel Name. Your agent will return a list of UIDs currently connected to that session.

**How do I start a cloud recording session via the AI agent?**
Use the `start_cloud_recording` tool with the necessary parameters (AppID, Channel Name, and recording config). The agent will trigger the Agora cloud recording engine and return the Resource ID and SID.

**Can I monitor the total minutes consumed by my project this month?**
Yes! The `get_usage_metrics` tool retrieves granular consumption data, including audio and video minutes, filtered by date range or project.