Provides tools for downloading, converting, and processing HLS/m3u8 streaming media using FFmpeg, including stream conversion to various formats and media probing capabilities
m3u8 MCP
m3u8 MCP Server - A desktop application that provides m3u8/HLS streaming capabilities through the Model Context Protocol (MCP), built with Tauri, React, and Rust.
๐ Related article: Understanding m3u8 files and FFmpeg streaming (Japanese)
๐ Features
Core Features
MCP Server: Streamable HTTP server using Axum on configurable port (default: 37650)
m3u8 Parsing: Full support for parsing HLS playlists (master and media playlists)
FFmpeg Integration: Download and convert streaming media using FFmpeg
Segment Extraction: Extract and display all segment URLs from playlists
Internationalization: Support for English and Japanese languages
Persistent Configuration: Securely stores settings locally (~/.m3u8-mcp/config.json)
Cross-Platform: Works on macOS, Windows, and Linux
Advanced Features ๐
Folder Selection Dialog: Choose download destination with native OS dialog
Download Progress: Real-time download progress tracking with speed and size info
URL History: Automatic tracking of recently used m3u8 URLs
Segment Display: View and copy individual segment URLs with pagination
Content Disclaimer: Built-in disclaimer system for responsible usage
Menu System: Clean hamburger menu for settings organization
MCP Status Indicator: Visual indicator for MCP server connection status
Local SQLite Cache: Store parsed playlists and metadata for offline access
๐ Prerequisites
Node.js (v16 or higher)
Rust (latest stable)
npm/pnpm/yarn
FFmpeg installed on your system
Your favorite AI assistant with MCP support (Claude, Cursor, etc.)
๐ ๏ธ Installation
Clone the repository:
Install dependencies:
Start the development server:
๐ฎ Usage
Setting up FFmpeg Path
Configure FFmpeg:
Click the menu button (โฐ) in the top-left corner
Select "FFmpeg Configuration"
Enter the path to your FFmpeg binary (or use system FFmpeg if in PATH)
Start the MCP Server:
Click the menu button (โฐ) or the MCP status indicator
Select "MCP Server Control"
Choose your port and click "Connect to AI via MCP"
Copy the connection command for your AI assistant
User Interface Features
Language Toggle: Switch between English and Japanese (EN/JP button)
URL Management: Clear button and history dropdown for quick access
Three Main Operations:
Parse Playlist: Analyze m3u8 structure and variants
Extract Segments: Get all segment URLs with copy functionality
Download Stream: Save stream with folder selection dialog
Collapsible Results: Each result section has an X button for dismissal
Pagination: "Show More" and "Show Less" buttons for segment lists
Running as MCP Server
The application runs as an MCP Streamable HTTP server using Axum:
Connect with Claude Code
Connect with Claude Desktop
Add to your Claude Desktop configuration:
๐ง Available MCP Tools
URL Management
m3u8_set_url
Set the current m3u8 URL in the UI.
Parameters:
url
(string, required): URL to set in the UI
m3u8_get_url
Get the current m3u8 URL from the UI.
Parsing Tools
m3u8_parse
Parse an m3u8 playlist and extract information.
Parameters:
url
(string): URL of the m3u8 playlistcontent
(string): Raw m3u8 content (if URL not provided)
m3u8_extract_segments
Extract all segment URLs from a playlist.
Parameters:
url
(string): URL of the m3u8 playlistbase_url
(string): Base URL for relative segment URLs
Download Tools
m3u8_download
Download a complete stream using FFmpeg.
Parameters:
url
(string, required): URL of the m3u8 streamoutput_path
(string, required): Output file pathformat
(string): Output format (mp4, mkv, ts, default: mp4)
Conversion Tools
m3u8_convert
Convert a video file to HLS format.
Parameters:
input_path
(string, required): Path to input videooutput_dir
(string, required): Output directory for HLS filessegment_duration
(number): Duration of each segment in seconds (default: 10)playlist_type
(string): Playlist type (vod or event, default: vod)
Probe Tools
m3u8_probe
Probe m3u8 stream for information using FFmpeg.
Parameters:
url
(string, required): URL of the m3u8 stream
Cache Management
m3u8_cache_list
List cached playlists and downloads.
Parameters:
query
(string): Optional search querylimit
(number): Maximum results (default: 100)
m3u8_cache_clear
Clear all cached data.
๐๏ธ Tech Stack
Frontend
React 19 - UI framework
TypeScript - Type safety
Tailwind CSS v4 - Styling
Vite - Build tool
@tauri-apps/api - Tauri integration
video.js - Stream preview
Backend
Rust - Core backend language
Tauri v2 - Desktop application framework
Axum - Web framework for MCP Streamable HTTP server
Reqwest - HTTP client for downloading
Rusqlite - SQLite database for caching
Tokio - Async runtime
Tower-http - CORS and middleware support
External Dependencies
FFmpeg - Media processing and conversion
m3u8-parser - Playlist parsing library
Protocol
MCP Streamable HTTP - HTTP/SSE transport with Axum
JSON-RPC 2.0 - Message format
Server-Sent Events (SSE) - Real-time server-to-client streaming
HLS (HTTP Live Streaming) - Adaptive bitrate streaming protocol
๐ Project Structure
๐จ Build
Build the application for production:
The built application will be available in:
macOS:
src-tauri/target/release/bundle/dmg/
Windows:
src-tauri/target/release/bundle/msi/
Linux:
src-tauri/target/release/bundle/appimage/
๐งช Testing
Test the MCP server with example m3u8 streams:
๐ฆ Why Rust?
This project leverages Rust for the same reasons as the original Redmine MCP:
Performance
Native Speed - Compiled to machine code for maximum performance
Zero-Cost Abstractions - High-level code without runtime overhead
Efficient Memory Usage - Critical for handling large video streams
Reliability
Memory Safety - Prevents segfaults and memory leaks at compile time
Thread Safety - Concurrent segment downloads without data races
Error Handling - Robust Result types for network and file operations
Integration
Axum - Modern async web framework for HTTP/SSE
Tokio - Powerful async runtime for concurrent operations
FFmpeg - Seamless integration with system FFmpeg
๐ง Roadmap
MCP Streamable HTTP server with Axum
Basic m3u8 parsing
FFmpeg integration for downloads
Multi-bitrate stream support
Live stream recording
Stream preview in UI
Segment-level operations
Advanced playlist generation
Scheduled recordings
Stream quality analysis
DRM content handling (where legal)
Cloud storage integration
Batch processing
Stream monitoring dashboard
๐ค Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Fork the repository
Create your feature branch (
git checkout -b feature/AmazingFeature
)Commit your changes (
git commit -m 'Add some AmazingFeature'
)Push to the branch (
git push origin feature/AmazingFeature
)Open a Pull Request
๐ License
This project is licensed under the MIT License - see the LICENSE file for details.
๐ Acknowledgments
Tauri - For the amazing desktop framework
MCP Specification - For the protocol documentation
FFmpeg - For powerful media processing capabilities
Axum - For the excellent web framework
Original Redmine MCP project for the modular architecture
๐ Support
For issues and questions:
Open an issue on GitHub
Check the related Qiita article for m3u8/FFmpeg details
Note: Ensure FFmpeg is installed and accessible on your system before using this application. Be mindful of copyright and legal considerations when downloading streaming content.
This server cannot be installed
hybrid server
The server is able to function both locally and remotely, depending on the configuration or use case.
Enables parsing, downloading, and converting HLS (m3u8) streaming media through FFmpeg integration. Provides a desktop application with MCP server capabilities for handling streaming playlists, extracting segments, and managing video downloads.
Related MCP Servers
- -securityFlicense-qualityAn MCP server that enables LLMs to search YouTube, retrieve video information, and access video transcripts through standardized tools.
- AsecurityAlicenseAqualityA lightweight server that exposes FFmpeg's video processing capabilities to AI assistants through the Model Context Protocol (MCP), supporting operations like video format conversion, audio extraction, and adding watermarks.Last updated -84716MIT License
- AsecurityFlicenseAqualityAn MCP server designed to work with FFmpeg for media processing tasks, offering enhanced performance and secure communication for handling media processing requests.Last updated -22413
- AsecurityAlicenseAqualityAn 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.Last updated -43MIT License