Shaka Packager MCP Server
⚠️ EXPERIMENTAL STATUS DISCLAIMER
This project is in early alpha stage and is highly experimental. It is not recommended for production use. It is also likely MESSY!
Current limitations:
You may run into inconsistent behavior
Advanced features (packaging, conversion, etc.) are still under active development
Path translation between Docker and host environments may require manual configuration
Expect frequent breaking changes and potential instability
Please report any issues you encounter to help improve the project.
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
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
Using pip or uv (coming soon)
Install the package with pip:
Or with uv:
From source (recommended)
Or with uv:
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.json
Windows:
%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:
Replace:
/PATH/TO/VIDEOS/DIRECTORY
with the path to the directory containing your video files/ABSOLUTE/PATH/TO/uv
with the full path to your uv executable/ABSOLUTE/PATH/TO/shaka_packager_mcp.py
with the full path to the script file/PATH/TO/PACKAGER
with the full path to your Shaka Packager executable
For example:
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*.log
Windows:
%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:
Tools
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_PATH
andVIDEO_PATH
)Your environment variables
A
.env
file in the same directory as the script
Example .env
file:
Development
Setting up a development environment
Running tests
Code formatting
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_documentation
tool 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
local-only server
The server can only run on the client's local machine because it depends on local resources.
An MCP server that integrates Shaka Packager with Claude AI applications, enabling Claude to analyze, transcode, and package video files for streaming in formats like HLS and DASH.
Related MCP Servers
- AsecurityFlicenseAqualityAn MCP server that allows Claude AI to perform filesystem operations including reading, writing, listing, moving files, and searching directories within specified allowed paths.Last updated -9132
- AsecurityAlicenseAqualityAn MCP server implementation that enables Claude AI to interact with Clickhouse databases. Features include secure database connections, query execution, read-only mode support, and multi-query capabilities.Last updated -22MIT License
- AsecurityAlicenseAqualityAn MCP server that implements Claude Code-like functionality, allowing the AI to analyze codebases, modify files, execute commands, and manage projects through direct file system interactions.Last updated -15267MIT License
- -securityFlicense-qualityAn MCP server that integrates with Claude to provide smart documentation search capabilities across multiple AI/ML libraries, allowing users to retrieve and process technical information through natural language queries.Last updated -