Shaka Packager MCP Server
This server lets Claude analyze and process video files using Shaka Packager through MCP tools and prompt templates.
Analyze video files: Extract detailed stream info, codecs, bitrates, and error suggestions using
analyze_video.Run custom Shaka Packager commands: Execute arbitrary packager commands with custom arguments via
run_shaka_packager.Get Shaka Packager options: Retrieve available command options and version info with
get_shaka_options.Get documentation and examples: Access built-in Shaka Packager docs and command examples with
get_shaka_documentation.Package media for streaming: Convert videos to HLS and DASH formats for VOD or live streaming.
Apply DRM encryption: Support Widevine, PlayReady, and FairPlay.
Convert formats and prepare ad insertion: MP4/TS conversion and ad marker configuration.
Use prompt templates: Ready-made prompts for MP4 to TS, VOD packaging, live packaging, encryption, ad insertion, analysis, and error interpretation.
Work with filesystem MCP server: Access local video files and translate Docker/host paths automatically.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Shaka Packager MCP Server analyze the video at /videos/sample.mp4 and tell me its codec and resolution"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Shaka Packager MCP Server
Status: alpha. Analysis is the most exercised path. Treat this as a working prototype rather than a production dependency.
Known limitations:
Packaging and conversion are still under active development
Path translation between Docker and host environments may need manual configuration
Interfaces may change between releases
Issue reports are welcome and genuinely useful.
An MCP (Model Context Protocol) server that integrates Shaka Packager with Claude AI applications for video transcoding, packaging, and analysis.
This server works with the Filesystem MCP Server to enable Claude Desktop to access and process video files on your computer, turning Claude into a powerful assistant for media processing tasks.
Features
Video Analysis: Analyze video files to extract detailed stream information, codecs, bitrates, and more
Media Packaging: Convert videos for streaming in HLS and DASH formats with support for VOD and live streaming
Advanced Options:
Apply DRM encryption (Widevine, PlayReady, FairPlay)
Configure ad insertion markers
Convert between formats (MP4, TS, etc.)
Intelligent Path Handling: Automatically translates paths between Docker and host environments
Robust Error Management: Provides meaningful error analysis with suggestions for resolution
Command Assistance: Helps correctly format Shaka Packager commands for optimal results
Interactive Documentation: Built-in help and examples to guide users through complex operations
Detailed Outputs: Comprehensive summaries and execution details for all operations
Related MCP server: encoding-devops
Prerequisites
Python 3.10 or higher
Shaka Packager installed and available in your PATH
Or build from source following these instructions
An MCP-compatible client (like Claude Desktop)
Installation
From source
The package is not published to PyPI yet, so install from a clone.
git clone https://github.com/coderjun/shaka-packager-mcp-server.git
cd shaka-packager-mcp-server
pip install -e .Or with uv:
git clone https://github.com/coderjun/shaka-packager-mcp-server.git
cd shaka-packager-mcp-server
uv pip install -e .Claude Desktop Integration
Since Claude Desktop doesn't directly support uploading video files, we'll use a two-server approach:
A simplified filesystem MCP server to access video files on your computer
The Shaka Packager MCP server to analyze and process those videos
Step 1: Set Up the MCP Filesystem Server
Use the official MCP filesystem server to allow Claude to access your video files:
Install the official filesystem server with Docker:
docker pull mcp/filesystemAlternatively, you can build it from source following the instructions in the Filesystem MCP Server repository
Step 2: Find the Configuration File
Locate your Claude Desktop configuration file:
macOS:
~/Library/Application Support/Claude/claude_desktop_config.jsonWindows:
%APPDATA%\Claude\claude_desktop_config.json
If the file doesn't exist, create it.
Step 3: Add Both Servers to the Configuration
Add the following configuration, making sure to use absolute paths:
{
"mcpServers": {
"filesystem": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"--mount", "type=bind,src=/PATH/TO/VIDEOS/DIRECTORY,dst=/projects/video-drop",
"mcp/filesystem",
"/projects"
]
},
"shaka-packager": {
"command": "/ABSOLUTE/PATH/TO/uv",
"args": [
"run",
"--with",
"mcp[cli]",
"/ABSOLUTE/PATH/TO/shaka_packager_mcp.py"
],
"env": {
"VIDEO_PATH": "/PATH/TO/VIDEOS/DIRECTORY",
"SHAKA_PACKAGER_PATH": "/PATH/TO/PACKAGER"
}
}
}
}Replace:
/PATH/TO/VIDEOS/DIRECTORYwith the path to the directory containing your video files/ABSOLUTE/PATH/TO/uvwith the full path to your uv executable/ABSOLUTE/PATH/TO/shaka_packager_mcp.pywith the full path to the script file/PATH/TO/PACKAGERwith the full path to your Shaka Packager executable
For example:
{
"mcpServers": {
"filesystem": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"--mount", "type=bind,src=/Users/username/Videos,dst=/projects/video-drop",
"mcp/filesystem",
"/projects"
]
},
"shaka-packager": {
"command": "/Users/username/.local/bin/uv",
"args": [
"run",
"--with",
"mcp[cli]",
"/Users/username/Development/shaka-packager-mcp-server/shaka_packager_mcp.py"
],
"env": {
"VIDEO_PATH": "/Users/username/Videos",
"SHAKA_PACKAGER_PATH": "/Users/username/.shaka/packager"
}
}
}
}Step 4: Restart Claude Desktop
After editing the configuration file, restart Claude Desktop to apply the changes.
How to Use the Two-Server Approach
First, browse your video files using the simplified filesystem server:
Ask Claude to "List the files in my video directory"
Navigate to the video file you want to analyze or process
Once you've found your video file, use its path with the Shaka Packager tools:
For analysis: "Please analyze this video: /Users/username/Videos/example.mp4"
For processing: "Please package this video for HLS: /Users/username/Videos/example.mp4"
Troubleshooting
If you encounter any issues:
Make sure both servers are properly configured with absolute paths
Verify that Shaka Packager is installed and accessible
Ensure the directory specified for the filesystem server exists and contains videos
Check Claude Desktop logs for errors at:
macOS:
~/Library/Logs/Claude/mcp*.logWindows:
%APPDATA%\Claude\logs\mcp*.log
Usage
Once both the Filesystem MCP server and the Shaka Packager MCP server are running in Claude Desktop:
Access your video files:
Please show me the files in my Videos directoryNavigate to your video file:
Please show me the files in the Movies subdirectoryCopy the file:// URI path of the video you want to process
Use the Shaka Packager tools with the file path:
Please analyze this video: file:///Users/username/Videos/my_video.mp4or
Please package this video for HLS and DASH streaming: file:///Users/username/Videos/my_video.mp4The server will execute the appropriate Shaka Packager command and provide a detailed summary of the results
You can also use direct file paths if you know the exact location of your video files:
Please analyze this video: /Users/username/Videos/my_video.mp4Tools
The server provides these tools:
analyze_video: Examines a video file and provides detailed stream information with intelligent error handling
run_shaka_packager: Executes any Shaka Packager command with custom arguments and proper path handling
get_shaka_options: Retrieves available command options and version information
get_shaka_documentation: Provides comprehensive documentation and examples for using Shaka Packager
Prompts
The server includes these prompt templates:
MP4 to TS conversion
VOD packaging in HLS and DASH
Live streaming packaging
Content encryption
Ad insertion preparation
Video analysis
Command format reminder
Error interpretation guidance
Configuration
The server can be configured using environment variables:
SHAKA_PACKAGER_PATH: Path to the Shaka Packager executable (highly recommended for Claude Desktop)VIDEO_PATH: Path to your local video directory (used for translating paths between Docker and host)DOCKER_PATH: Docker container mount path (default: "/projects/video-drop")TEMP_DIR: Custom temporary directory for file uploadsLOG_LEVEL: Logging level (DEBUG, INFO, WARNING, ERROR, CRITICAL)COMMAND_TIMEOUT: Timeout in seconds for Shaka Packager commands (default: 300)
You can set these in:
Your Claude Desktop configuration file (preferred for
SHAKA_PACKAGER_PATHandVIDEO_PATH)Your environment variables
A
.envfile in the same directory as the script
Example .env file:
SHAKA_PACKAGER_PATH=/usr/local/bin/packager
VIDEO_PATH=/Users/yourusername/Videos
LOG_LEVEL=DEBUGDevelopment
Setting up a development environment
# Clone the repository
git clone https://github.com/coderjun/shaka-packager-mcp-server.git
cd shaka-packager-mcp-server
# Install development dependencies with pip
pip install -e ".[dev]"
# Or with uv
uv pip install -e ".[dev]"Running tests
pytestCode formatting
black .
isort .Understanding the Code Structure
The main components of the Shaka Packager MCP server are:
shaka_packager_mcp.py: Main server implementation with MCP tools and promptstests/: Test suite for verifying functionality
This server is designed to work with the official MCP filesystem server for accessing video files.
Key Features in the Implementation
Robust path handling: Automatically translates paths between Docker and host environments
Smart error handling: Provides meaningful error messages and suggestions
Command syntax assistance: Helps correctly format Shaka Packager commands
Documentation integration: Provides comprehensive documentation and examples
License
This project is licensed under the MIT License - see the LICENSE file for details.
Getting Help
Feel free to use an AI code copilot, the author does.
If you encounter any issues or have questions:
Check the troubleshooting section in this README
Review the Shaka Packager documentation
Use the
get_shaka_documentationtool for interactive help within ClaudeOpen an issue on GitHub
Acknowledgements
Shaka Packager for the powerful video processing capabilities
Model Context Protocol (MCP) for the communication framework
Claude for the AI assistant capabilities
Anthropic for developing Claude and the MCP standard
Available Tools
4 toolsanalyze_videoB
Analyze a video file using Shaka Packager.
Args:
file_path: Path to the video file. Can be a local file path or a file:// URI from the filesystem MCP.
Inputs: file_path (required). Returns: result
get_shaka_documentationB
Get comprehensive Shaka Packager documentation, including command structure and examples.
Inputs: no named parameters. Returns: result
get_shaka_optionsB
Get the available options and version information for Shaka Packager.
Inputs: no named parameters. Returns: result
run_shaka_packagerC
Run a custom Shaka Packager command.
Args:
file_path: Path to the uploaded video file.
command_args: Additional arguments to pass to the shaka-packager command.
Inputs: file_path (required), command_args (required). Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 4 tools
Each tool has a clearly distinct purpose: analyze_video for file analysis, get_shaka_documentation for documentation retrieval, get_shaka_options for version/options info, and run_shaka_packager for custom command execution. There is no overlap or ambiguity between these functions.
All tools follow a consistent verb_noun pattern (analyze_video, get_shaka_documentation, get_shaka_options, run_shaka_packager) with clear, descriptive names. The naming convention is uniform throughout the set.
Four tools is reasonable for a Shaka Packager server, covering core functions like analysis, documentation, options, and execution. However, it feels slightly thin as it lacks tools for common specific operations like packaging or transmuxing, which might be expected in this domain.
The toolset covers basic Shaka Packager interactions but has notable gaps. It provides analysis, documentation, options, and custom execution, but lacks dedicated tools for standard packaging workflows (e.g., create_manifest, package_video) that would complete the surface for media processing tasks.
Maintenance
Related MCP Connectors
MCP server for Wan AI video generation
MCP server for Google Veo AI video generation
MCP server for Grok Imagine AI video generation
MCP server for Clipkit — gives AI agents a video toolbox via the Clipkit schema.
Related MCP Servers
- AlicenseNot gradedqualityNot gradedmaintenanceIntegrates Shaka Packager with Claude to enable video analysis, transcoding, and packaging for HLS and DASH streaming. It supports advanced features like DRM encryption and content conversion while working alongside the Filesystem MCP server to process local media files.MIT
- AlicenseBqualityDmaintenanceAn MCP server that connects Claude to video encoding workflows, enabling smart error translation, real-time job analysis, and automated email drafting for troubleshooting encoding issues.8MIT
- AlicenseNot gradedqualityDmaintenanceAn MCP server that uses Google's Gemini API to analyze videos and convert them to text descriptions that Claude Code can understand and act upon.143 npmMIT
- FlicenseBqualityDmaintenanceMCP server that enables video analysis capabilities to Claude, including frame extraction, scene detection, and video metadata retrieval.8-