mk-download
Downloads Bilibili videos via yt-dlp and ffmpeg, with quality and size probing, audio-only mode, clips, subtitles/transcripts, live recording, and browser impersonation.
Downloads magnet links, .torrent URLs and uploaded torrent files through libtorrent, with file selection and pause/resume/stop controls.
Downloads Facebook Reels and videos via yt-dlp, with quality selection, audio-only mode, clips, subtitles, and live recording where supported.
Downloads Instagram videos and Reels via yt-dlp, with quality selection, audio-only mode, clips, subtitles, and browser impersonation.
Downloads TikTok videos via yt-dlp, with quality selection, audio-only mode, clips, subtitles, and browser impersonation.
Downloads YouTube videos and live broadcasts via yt-dlp/ffmpeg, with quality selection, audio-only mode, clips, subtitles/transcripts, live recording from start, and browser impersonation.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
mk-download
A headless download service that an AI agent operates over MCP. It runs as one MapleKiosk tenant (see deploy/mk-provisioning.md).
Video sites through yt-dlp + ffmpeg: YouTube, TikTok, Instagram and Facebook Reels, Bilibili, ~1800 others, raw
.m3u8/.mpdstreams. Quality choice, audio only, clips, subtitles and transcripts, live recording.BitTorrent through libtorrent: magnet links,
.torrentURLs and uploaded files, with file selection.eD2k through Kelpie (Go engine, MIT; its Python control module is vendored in
mkdownload/kelpie/).Browser impersonation (curl_cffi): TLS, HTTP/2 and header fingerprints of Chrome, Safari, Firefox or Edge.
Expiring signed links to finished files, signed webhooks on completion, every limit on a settings page.
Entry points
Path | Who | Protection |
| the agent (Streamable HTTP, stateless) |
|
| you |
|
| anyone with the link | HMAC-signed path and expiry ( |
| the provisioner | open; says only that the process is up |
Related MCP server: AI-IDM MCP Server
MCP tools
Tool | Does |
| Title, length, qualities with sizes, subtitle languages, live state; torrent file list; eD2k name and size |
| Starts a job, returns |
| Torrent job from an uploaded |
| Subtitle text in the reply, no file |
| Status, percent, speed, ETA, recorded time, error, files with links |
|
|
| Stored files, cuts, signed links |
| Quota, login cookies per site, read-only limits |
Job states: queued → waiting (scheduled live only) → downloading / recording → finalizing → completed;
or paused, failed, cancelled. Files land in /data/downloads/<job_id>/.
Tool errors are JSON: {"error": "<code>", "message": "<one sentence>"}, with codes quota_exceeded,
login_required, blocked_by_challenge, drm_protected, not_live, is_live, unsupported_url,
source_unavailable, queue_full, site_blocked, engine_disabled, invalid_request, not_found,
download_failed, internal_error.
Webhooks
Pass callback_url (and optionally callback_ref, your own id) to download, add_torrent_file or clip_file,
or set a default on the settings page. When the job reaches completed, failed or cancelled, the service POSTs:
{
"event_id": "…", "type": "job.completed", "job_id": "20261124-ab12cd34", "callback_ref": "order-42",
"status": "completed", "kind": "video", "url": "https://…",
"files": [{"path": "20261124-ab12cd34/Title [id].mp4", "size": 12345, "link": "https://…/f/…", "link_expires_at": "…"}],
"error": null, "progress": null, "created": "…", "finished": "…", "sent": "…"
}X-MK-Signature: sha256=<hex>is the HMAC-SHA256 of the raw body withWEBHOOK_SECRET. Verify it.The event is written to an outbox in the same SQLite transaction as the job's status, so a crash can't lose it.
Any non-2xx reply or timeout is retried after 30 s, 2 min, 10 min, 1 h, then every 6 h, for 24 h; after that it shows as undelivered on the settings page, with a Retry button.
Delivery is at-least-once: deduplicate on
event_id.notify_progress: trueaddsjob.startedandjob.progress(25 / 50 / 75 %) events.
Live recording
download(url, live=true) records to 5-minute .ts segments under the job folder, so a crash or redeploy loses
nothing: after a restart the job continues and the segments are joined into one MP4 at the end. A dropped
connection reconnects. stop, the stream's end, max_duration (content time) and the disk quota all end the
recording and keep it. wait_for_start waits for a scheduled stream; from_start records a YouTube broadcast
from its beginning.
Development
uv venv -p 3.13 .venv && uv pip install -p .venv -r requirements.txt # needs ffmpeg on PATH; deno for YouTube
DATA_DIR=/tmp/mkd MCP_TOKEN=dev-token-0123456789 ADMIN_PASSWORD=dev-password-0123456 WEBHOOK_SECRET=dev \
PORT=8765 .venv/bin/python -m mkdownload
MCP_TOKEN=dev-token-0123456789 tests/rpc.sh probe '{"url":"https://www.youtube.com/watch?v=jNQXAC9IVRw"}'tests/smoke.py is the end-to-end check the release workflow runs against the built image.
Release
Actions → Release Container → Run workflow with a version (e.g. 1.0.0). It builds the image, proves it
(refuses to start without secrets, engines present, a real download with clip, signed link and webhook, clean
stop), pushes ghcr.io/ericngo1972/mk-download:<version> and :latest, and prints the catalog row. Then set
the tenant's ImageTag and Redeploy.
Video sites change often. When downloads start failing with download_failed or blocked_by_challenge, bump
yt-dlp (and curl_cffi for newer browser fingerprints) in requirements.in, recompile requirements.txt, and
release.
Licences
MIT. Kelpie and its control module: MIT, © XiaoYouChR (mkdownload/kelpie/LICENSE.kelpie). yt-dlp: Unlicense.
libtorrent: BSD. ffmpeg: from Debian, run as a separate program.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Turn any video or audio link into files, transcripts and metadata, right from your AI agent.
Video, audio, and image processing for AI agents: convert, transcribe, upscale - 150+ operations.
Download video and audio from TikTok, YouTube, Instagram and 1800+ sites; get transcripts.
Download video and audio from public media URLs, or extract their metadata, with one async REST API.
Related MCP Servers
- AlicenseAqualityBmaintenanceEnables AI agents to download, transcribe, and read metadata for any video or audio URL - YouTube, TikTok, X, podcasts and 1000+ sites - working from agent sandboxes and servers where direct downloads usually get blocked. $3 free credit, no card.1027 npmMIT
- AlicenseBqualityBmaintenanceEnables AI agents to drive a multi-connection download engine over stdio: probe URLs, start, monitor, wait on and cancel downloads, fetch HLS streams, and manage a persistent SQLite-backed queue. Agents can carry out instructions like downloading several URLs in parallel and reporting which ones failed.122MIT
- AlicenseAqualityCmaintenanceEnables agents to submit YouTube and TikTok download jobs, wait for and save completed videos, and list, inspect, cancel, retry, or delete jobs through the downloader's REST API.8MIT
- AlicenseAqualityBmaintenanceEnables AI agents and MCP clients to fetch details about, and download, videos and audio from YouTube, Instagram, TikTok, Facebook, X and Pinterest as MP4 video or MP3 audio through tool calls, returning a temporary download link rather than file bytes. It also supports checking, waiting on and cancelling download jobs with structured, machine-readable errors.4MIT