# Mux MCP

> Mux connects your AI client to your video infrastructure. It lets you manage assets, monitor live streams, and pull analytics directly from Mux without opening a dashboard. You can create new assets using just a public URL or set up secure upload sessions for large files. This tool gives your agent full control over your entire media workflow.

## Overview
- **Category:** ship-it
- **Price:** Free
- **Tags:** video-infrastructure, live-streaming, asset-management, video-encoding, playback-api, media-processing

## Description

Listen up. This server connects your AI client straight into Mux, letting you handle your whole video pipeline without ever having to log into a dashboard. It gives your agent full control over everything—asset creation, live stream management, and pulling performance data directly. You're not just looking at reports; you’re running the show.

***Asset Management & Status Checks***

Need to know what videos you got? The `list_assets` tool gives you a summary list of every single video asset in your account, detailing their current status and unique IDs. If you need deep details on one file, just run `get_asset`. That pulls all the metadata and the precise status for that specific Asset ID.

Want to see everything you've set up? The `list_direct_uploads` tool shows you recent or configured direct upload sessions. You can also check what live streams are running with `list_live_streams`, which gives a summary of every managed stream configuration. If you need the deep dive on a single stream, use `get_live_stream` to pull all its operational information.

***Creating and Uploading Content***

You gotta make content? Use `create_asset`. You just feed it a public URL for your source material, and the server kicks off the entire creation process for a brand-new asset in Mux. For massive files—the kind that kill standard API calls—you use `create_direct_upload`. This tool generates temporary, secure credentials. It lets you upload those huge video assets directly to Mux storage.

***Live Streaming Workflows***

Setting up a stream is simple. The `create_live_stream` tool sets up and configures an entirely new live streaming session in the platform. If that stream is done, or needs decommissioning, you use `delete_live_stream` to clean it up completely.

***Monitoring and Cleanup***

Need to get rid of a video? You run `delete_asset`, and it removes an existing video asset from your Mux account. If you need to wipe out a stream setup, the `delete_live_stream` tool handles that cleanup for you.

***Performance Metrics and Deep Analytics***

Tracking performance is critical. The `get_recent_views` tool calculates and returns recent viewing metrics. This tells you exactly how many people watched your content and gives you key performance indicators regarding usage. You can also get the complete metadata details for any asset using its ID, which is crucial whether you're debugging a playback issue or just scripting against specific file attributes.

## Tools

### create_asset
Starts the process of making a new video asset from a provided source URL.

### create_direct_upload
Generates temporary, secure credentials for uploading large video files directly to Mux storage.

### create_live_stream
Sets up and configures a new live streaming session in the Mux platform.

### delete_asset
Removes an existing video asset from your Mux account.

### delete_live_stream
Decommissions and deletes a configured live stream session.

### get_asset
Retrieves all metadata and the current status for one specific video asset ID.

### get_live_stream
Pulls detailed information about a single live stream configuration.

### get_recent_views
Calculates and returns recent viewing metrics, showing how many people watched the content recently.

### list_assets
Provides a summary list of all your video assets, including their status and IDs.

### list_direct_uploads
Lists recent or configured direct upload sessions you've set up.

### list_live_streams
Shows a summary list of all live streams currently managed by your account.

## Prompt Examples

**Prompt:** 
```
List all my video assets and show their status.
```

**Response:** 
```
I've retrieved your video assets. You have 12 assets, including 'asset-123' (Status: ready) and 'asset-456' (Status: processing). Shall I check if 'asset-456' is finished now?
```

**Prompt:** 
```
Create a new video asset from https://example.com/video.mp4.
```

**Response:** 
```
I've initiated the creation of a new video asset from the URL provided. The new Asset ID is 'new-asset-789' and its current status is 'preparing'. I'll let you know when it's ready for playback.
```

**Prompt:** 
```
Check recent views for my videos.
```

**Response:** 
```
Fetching recent analytics... You had 156 views in the last 15 minutes, with a 98% player success rate. Shall I breakdown the views by country?
```

## Capabilities

### List all video assets
The agent retrieves a list of every existing Mux video asset, detailing their current status and metadata.

### Create new video assets
You provide a public URL for source material, and the server initiates the creation process for a brand-new video asset in Mux.

### Manage live streams
The agent can monitor all active or planned live stream configurations and their associated operational status.

### Generate secure upload links
It creates temporary, secure endpoints for uploading large video files directly to Mux storage.

### Get view analytics
The server pulls recent viewing data and performance metrics for your video content.

### Fetch asset metadata by ID
You supply a specific Asset ID, and the agent returns all associated deep metadata, ensuring you have every detail about that single file.

## Use Cases

### Checking asset processing status.
A developer needs to know if a source video uploaded yesterday is finished encoding. Instead of refreshing the Mux dashboard every five minutes, they ask their agent, which runs `get_asset` with the specific ID. The agent confirms: 'The asset is ready for playback.' Problem solved in seconds.

### Rapidly creating marketing assets.
A content team member has a raw video file online but needs it tracked as an official Mux asset immediately. They prompt their agent with the public URL and ask to `create_asset`. The agent handles the creation process, giving them a new Asset ID they can use for tracking.

### Debugging live stream failures.
A broadcast team gets an alert that a live stream is failing. They prompt their agent to `get_live_stream` using the stream's unique ID. The agent instantly pulls the detailed metadata, allowing them to see if the issue is configuration-related or network-related.

### Building a content audit report.
A manager needs to know how many videos are currently in the system and their status. They simply ask the agent to `list_assets`. The agent returns a categorized list, allowing them to see which assets need attention (e.g., '12 assets are pending review').

## Benefits

- **Instant Status Checks:** Don't wait for the Mux dashboard to load. Use `list_assets` or `get_asset` to check if a file is ready, processed, or stuck, getting immediate feedback directly from your agent.
- **Automated Asset Creation:** Need to build content? Give the agent a public URL and run `create_asset`. It handles the initial setup, letting you skip manual API calls for basic content ingestion.
- **Live Stream Health Monitoring:** For broadcasters, use `list_live_streams` or `get_live_stream` to quickly verify configurations before going live. You see status updates without logging into a separate panel.
- **High-Volume Uploads, Zero Friction:** Use `create_direct_upload` when you have massive source files. The agent generates the secure endpoint; all you do is upload and get confirmation.
- **Data-Driven Content Decisions:** Stop guessing about performance. Run `get_recent_views` to pull actual analytics showing viewer count, success rates, and activity trends for optimization.

## How It Works

The bottom line is you manage complex video operations using natural language commands instead of navigating multiple web dashboards.

1. First, subscribe to the Mux server and provide your required Mux Token ID and Secret credentials.
2. Next, tell your AI client what you want—for example, 'List all assets' or 'Create an asset from this URL.'
3. The agent executes the request, talks to the Mux API, and returns a formatted summary of the status (e.g., 'Asset ID X is 80% complete.')

## Frequently Asked Questions

**How do I check if my video asset is finished using get_asset?**
Run `get_asset` with the specific Asset ID. The metadata will contain a 'status' field, telling you if it's 'ready,' 'processing,' or something else.

**Can I list all my video assets using list_assets?**
Yes, `list_assets` fetches a summary of every asset in your account. This is useful for getting a quick count and knowing which IDs you need to track further.

**What if I want to upload a huge file using create_direct_upload?**
Don't send the file through an API call. Use `create_direct_upload` first. It gives you temporary, secure credentials that let your client handle the large transfer safely.

**How do I monitor a live stream after I create it with create_live_stream?**
After creating the stream, use `get_live_stream` and provide the unique ID. This fetches the most current configuration and operational status in one go.

**Do I need to delete assets manually after using delete_asset?**
No. The server handles the full deletion process through the Mux API, removing both the asset record and associated metadata from your account.

**How can I check my video performance data using get_recent_views?**
You call `get_recent_views` to pull analytics on your content's reach. It returns metrics like view counts and player success rates, letting you track how well your videos are performing over a set time period.

**What tools do I have available for listing live streams using list_live_streams?**
The `list_live_streams` tool gives you an overview of all configured live feeds. You can use this to check the status and configurations of multiple active or archived broadcasts at once.

**If I need detailed information, what does get_asset provide about a specific video asset?**
The `get_asset` tool pulls comprehensive metadata for any given video ID. This includes not just the status, but also full details like duration and playback IDs you might need for coding.

**How do I create a Mux API Token?**
Go to the Mux Dashboard, navigate to Settings > API Tokens, and click 'Create new token'. Ensure you copy the Token Secret immediately as it will only be shown once.

**What format should the asset URL be?**
The URL must be publicly accessible and point directly to a video file (e.g., MP4, MOV). Mux will then fetch and process the file from that location.

**Is the analytics data real-time?**
Yes, the `get_recent_views` tool retrieves near real-time data about video views occurring in your account.