360 Secure SkillHub
360 安全技能中心

Bootleg Link

以守护进程式 MCP 服务器形式提供 YouTube 音乐下载能力,支持提交任务、查询进度、列出任务、暂停/恢复、取消与清理已完成任务;当前为原型实现,采用内存任务队列和模拟下载进度。

分类:自动化
esanle
esanle
热度 8.31
最近更新 2026-05-14 17:38:31

安装

发给 Agent
帮我安装这个技能:npx secure-skills-cli add esanle/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)