MCP Server Integration

Use Rendrift media processing with the Copilot CLI via Model Context Protocol.

Overview

The Rendrift MCP server enables you to use Rendrift's media processing capabilities directly in the GitHub Copilot CLI. Simply configure your API key, and you'll gain access to 5 tools for processing local media files.

Use cases:

Setup

1. Get Your API Key

Sign up for Rendrift and grab your free API key (or upgrade to a paid plan for higher limits).

2. Configure Copilot CLI

Add the Rendrift MCP server to your Copilot CLI configuration:

~/.copilot/config.json
{
  "mcpServers": {
    "rendrift": {
      "command": "node",
      "args": ["/path/to/rendrift/mcp/dist/index.js"],
      "env": {
        "RENDRIFT_API_KEY": "your-api-key-here",
        "RENDRIFT_API_URL": "https://rendrift.io"
      }
    }
  }
}
          

3. Verify Installation

Test that the server is accessible:

$ copilot -m rendrift:list-tools
rendrift-mcp v0.1.0
Tools:
  - probe_media
  - generate_thumbnail
  - extract_audio
  - optimize_image
  - generate_waveform
          

Available Tools

probe_media

Analyze a media file and return metadata: format, duration, codec info, bitrate, stream information.

Parameters:

file_path (string, required)
  Absolute path to the media file.
            

Example:

$ copilot -m rendrift:probe_media \
  --file_path="/home/user/video.mp4"
            

Output: JSON with duration, format, video/audio codecs, bitrate, etc.

generate_thumbnail

Capture a frame from a video/image at a specific timestamp and save it locally. Returns base64 image data (viewable by vision AI).

Parameters:

file_path (string, required)
  Absolute path to the source media file.

time (number, optional, default: 0)
  Timestamp in seconds to capture frame.

format (string, optional, default: webp)
  Output format: jpeg, webp, or png.

width (number, optional)
  Thumbnail width in pixels (aspect ratio preserved).
            

Example:

$ copilot -m rendrift:generate_thumbnail \
  --file_path="/home/user/video.mp4" \
  --time=30 \
  --format=jpeg \
  --width=320
            

Output: Saves to /home/user/video.thumb.jpeg + returns base64 image data for AI vision analysis.

extract_audio

Extract audio from a video file and save as standalone audio file (mp3, aac, wav, flac).

Parameters:

file_path (string, required)
  Absolute path to the source media file.

format (string, optional, default: mp3)
  Output format: mp3, aac, wav, or flac.

bitrate (string, optional)
  Audio bitrate (e.g., "128k", "320k").
            

Example:

$ copilot -m rendrift:extract_audio \
  --file_path="/home/user/video.mp4" \
  --format=mp3 \
  --bitrate=192k
            

Output: Saves to /home/user/video.mp3.

optimize_image

Resize, re-encode, or convert an image to modern formats (WebP, AVIF) to reduce file size.

Parameters:

file_path (string, required)
  Absolute path to the source image file.

format (string, optional, default: webp)
  Output format: webp, jpeg, png, or avif.

width (number, optional)
  Output width in pixels (aspect ratio preserved).

quality (number, optional)
  Quality level 1-100 (higher = better, larger).
            

Example:

$ copilot -m rendrift:optimize_image \
  --file_path="/home/user/photo.jpg" \
  --format=webp \
  --width=800 \
  --quality=85
            

Output: Saves to /home/user/photo.optimized.webp + returns compression stats.

generate_waveform

Analyze audio and return normalized amplitude samples for waveform visualization, plus min/max/avg statistics.

Parameters:

file_path (string, required)
  Absolute path to audio or video file.

samples (number, optional, default: 200)
  Number of data points to return (max: 10,000).
            

Example:

$ copilot -m rendrift:generate_waveform \
  --file_path="/home/user/audio.mp3" \
  --samples=500
            

Output: JSON array of normalized amplitudes (0-1) + statistics (min, max, avg).

Configuration

Configure the MCP server via environment variables:

RENDRIFT_API_KEY

Your Rendrift API key (required). Get one by signing up at rendrift.io.

RENDRIFT_API_URL

API endpoint (default: https://rendrift.io). Change for staging/testing.

POLL_INTERVAL_MS

Check job status every N milliseconds (default: 1500). Lower = faster feedback, higher = less polling.

POLL_TIMEOUT_MS

Max time to wait for job completion (default: 120000 = 2 min). Increase for large files.

Usage Examples

Example 1: Analyze a video and generate thumbnail

# First, probe the video to get metadata
$ copilot -m rendrift:probe_media --file_path="/videos/my_video.mp4"
{
  "duration_seconds": 120,
  "format": "mp4",
  "video": { "codec": "h264", "width": 1920, "height": 1080 }
}

# Generate a thumbnail at 30 seconds
$ copilot -m rendrift:generate_thumbnail \
  --file_path="/videos/my_video.mp4" \
  --time=30 \
  --width=320
          

Example 2: Extract and optimize audio

# Extract audio track
$ copilot -m rendrift:extract_audio \
  --file_path="/videos/interview.mp4" \
  --format=mp3 \
  --bitrate=128k

# Generates: /videos/interview.mp3
          

Example 3: Batch optimize images for web

# Use Copilot CLI to process multiple images
for img in *.jpg; do
  copilot -m rendrift:optimize_image \
    --file_path="$PWD/$img" \
    --format=webp \
    --width=800 \
    --quality=80
done
          

Example 4: Generate waveform for audio visualization

$ copilot -m rendrift:generate_waveform \
  --file_path="/audio/podcast.mp3" \
  --samples=1000

# Output: Array of 1000 normalized amplitudes (0-1)
# Save to visualization library or web UI
          

FAQ

How do I get my API key?

Sign up for free at rendrift.io. Free tier includes 500 ops/month.

What happens if I exceed my monthly quota?

Requests will fail with 429 Too Many Requests. Upgrade your plan or wait until the 1st of next month.

Can I use the MCP server offline?

No, the MCP server requires internet connectivity to reach the Rendrift API. For offline processing, see our standalone CLI tools (coming soon).

Where are output files saved?

Output files are saved in the same directory as the input file. For example, /path/to/video.mp4/path/to/video.thumb.webp.

How do I troubleshoot connection issues?

Check that your API key is valid, your internet is working, and the API URL is correct. You can test with: curl -H "Authorization: Bearer YOUR_KEY" https://rendrift.io/v1/health

Can I use the MCP server in production?

Yes, but ensure you have an appropriate plan quota. Consider upgrading to Pro or Business for production workloads.

Ready to integrate?

Get Your API Key

© 2026 Rendrift. All rights reserved. · System Status · API Docs