360 Secure SkillHub
360 安全技能中心

Bootleg Link

核心功能含提交下载任务、查询进度、任务管理(列表/取消/暂停/恢复)及清理已完成任务,支持自定义输出目录、音质、并发数。典型场景为批量下载YouTube音乐频道或单曲。输入为带链接、参数的JSON指令,输出任务ID、进度状态等信息。需依赖Node.js≥18,当前为原型,后续将支持真实下载与数据持久化,适配多平台。

esanle
esanle
热度 52.09
最近更新 2026-05-14 17:38:31
分类:开发依赖:MCP 服务 / 读写文件 / 第三方 API应用场景:任务管理 / 自动化脚本 / API 集成

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add bootleg-link
Metadata
name
bootleg-link-mcp
version
0.1.0
description
MCP server for YouTube music downloading with task queue, progress tracking, and cross-platform support
metadata
{"openclaw":{"emoji":"🎵","os":["linux","darwin","win32"],"requires":{"bins":["node>=18"]}}}

Bootleg-Link MCP

Daemon-style MCP server for YouTube music downloading with task queue, progress tracking, and concurrent download support.

Architecture

┌─────────────────────────────────────────────────────────┐
│                    OpenClaw                             │
│  ┌─────────────┐    ┌─────────────────────────────┐   │
│  │   Skill     │───►│   MCP Client (stdio bridge)  │   │
│  └─────────────┘    └──────────────┬──────────────┘   │
│                                    │                    │
│                         ┌──────────▼──────────┐        │
│                         │  bootleg-link-mcp   │        │
│                         │  ┌───────────────┐  │        │
│                         │  │  Task Queue   │  │        │
│                         │  │  (In-Memory)  │  │        │
│                         │  └───────┬───────┘  │        │
│                         │          │          │        │
│                         │  ┌───────▼───────┐  │        │
│                         │  │  Downloader   │  │        │
│                         │  │   (yt-dlp)    │  │        │
│                         │  └───────────────┘  │        │
│                         └─────────────────────┘        │
└─────────────────────────────────────────────────────────┘

MCP Tools

submit_download_task

Submit a new YouTube music download task.

{
  "url": "https://www.youtube.com/@ChannelName",
  "outputDir": "/path/to/output",
  "quality": "320"
}

Returns: taskId for tracking

query_progress

Query the progress of a download task.

{
  "taskId": "task_1234567890_abc123"
}

Returns:

{
  "taskId": "task_1234567890_abc123",
  "status": "downloading",
  "progress": 45,
  "message": "Downloading... 45%",
  "outputDir": "/path/to/output"
}

list_tasks

List all download tasks.

{
  "status": "all",
  "limit": 50
}

cancel_task

Cancel a pending or running task.

pause_task / resume_task

Pause or resume a downloading task.

clear_completed

Clear all completed/failed tasks.

Task States

State Description
pending Task created, waiting in queue
downloading Currently downloading
completed Download finished successfully
failed Download failed with error
paused Download paused by user
cancelled Download cancelled by user

Configuration

Environment Variables

Variable Default Description
BOOTLEG_OUTPUT_DIR ~/Downloads/bootleg-link Default output directory
BOOTLEG_QUALITY 320 Default MP3 quality
BOOTLEG_CONCURRENCY 4 Max concurrent downloads
BOOTLEG_DB_PATH ./tasks.db SQLite database path

Platform-Specific Paths

OS Default Output
Linux ~/Downloads/bootleg-link
macOS ~/Downloads/bootleg-link
Windows %USERPROFILE%\Downloads\bootleg-link

Installation

# Install dependencies
cd bootleg-link-mcp
npm install

# Build
npm run build

# Run
npm start

OpenClaw Configuration

Add to your OpenClaw MCP config:

{
  "mcpServers": {
    "bootleg-link": {
      "command": "node",
      "args": ["/path/to/bootleg-link-mcp/dist/server.js"],
      "env": {
        "BOOTLEG_OUTPUT_DIR": "/mnt/e/bootleg-link-downloader/output"
      }
    }
  }
}

Usage Example

// Submit a task
const result = await callTool('submit_download_task', {
  url: 'https://www.youtube.com/@VeryHouseMusic',
  quality: '320'
});
// Returns: { taskId: "task_xxx", status: "pending" }

// Query progress
const progress = await callTool('query_progress', {
  taskId: "task_xxx"
});
// Returns: { status: "downloading", progress: 45 }

// List all tasks
const tasks = await callTool('list_tasks', {
  status: 'downloading',
  limit: 10
});

Production vs Prototype

Prototype (Current)

  • In-memory task storage
  • Simulated download progress
  • No real yt-dlp integration

Production (Planned)

  • SQLite task persistence
  • Real yt-dlp download with progress parsing
  • Concurrent download management
  • Event notification to OpenClaw
  • Webhook notifications

Dependencies

  • @modelcontextprotocol/sdk - MCP server framework
  • yt-dlp-wrap - yt-dlp Node.js wrapper (future)
  • better-sqlite3 - SQLite for task persistence (future)