VidSnatch logo

VidSnatch

Community
sahajamit

YouTube toolkit for humans and AI agents — CLI, web UI, and MCP server. Search, download, trim clips, stitch compilations, and extract transcripts. Works natively with Claude, Cursor, and GitHub Copilot.

Publishersahajamit
RepositoryVidSnatch
LanguagePython
Forks
6
Stars
23
Available tools
0
Transport typestdio, streamable-http
Categories
Links
  • Connect tools to AI workflows

    VidSnatch exposes MCP capabilities that can be used by compatible AI clients and agents.

  • 0 available tools

    Browse the callable actions below, including names and descriptions when provided by the server.

  • Ready-to-copy setup

    Use the installation snippets to configure this server in your preferred MCP client.

  • Open source signals

    23 stars and 6 forks from the linked repository.

VidSnatch 🚀

The future of YouTube video downloading - Web App, CLI & MCP Server

VidSnatch is a futuristic YouTube video downloader with a sleek web interface, a full-featured CLI, and a Model Context Protocol (MCP) server for AI assistants and programmatic access. Built for the next generation with a stunning UI that appeals to Gen Z and Gen Alpha users.

Install

Recommended — pipx (installs CLI tools globally, no venv needed)

bash
pipx install vidsnatch

Don't have pipx? Install it first:

bash
brew install pipx   # macOS
pipx ensurepath

Alternative — pip (inside a virtual environment)

bash
pip install vidsnatch

Upgrade

bash
pipx upgrade vidsnatch   # if installed via pipx
pip install --upgrade vidsnatch   # if installed via pip

Global commands installed

After installation, these four commands are available anywhere in your terminal:

CommandDescription
vidsnatchMain CLI — search, download, trim, list
vidsnatch-webStart the web UI on http://localhost:8080
vidsnatch-mcpStart the MCP stdio server (for AI assistants)
vidsnatch-mcp-httpStart the MCP HTTP server on port 8090

Prerequisites

  • Python 3.10+
  • ffmpeg — required for high-quality video downloads and trimming
bash
brew install ffmpeg   # macOS

Features

  • 🔍 YouTube Search: Search YouTube by keyword and browse results before downloading
  • 🌟 Futuristic Web Interface: Beautiful glassmorphism UI with aurora background
  • 📱 Mobile-First Design: Responsive design that works on all devices
  • 🎥 High-Quality Downloads: Support for up to 4K video downloads with automatic audio merging
  • 🎵 Audio Extraction: Download audio-only files as MP3, M4A, or WAV
  • 📝 Transcript Download: Extract video transcripts with timestamps
  • ✂️ Video Trimming: Download specific segments of videos with precise timestamp control
  • 🎬 Stitch clips: Join multiple downloaded clips into a single compilation video
  • ⚡ Real-Time Processing: Live video info fetching and download progress
  • 💻 Full-Featured CLI: Subcommand-based CLI (vidsnatch info/download/trim/list) for automation, scripting, and LLM skill usage
  • 🤖 MCP Server: Model Context Protocol server (stdio & HTTP) for AI assistants and programmatic access
  • 🧠 LLM Skill Integration: Ships with a skill file for Claude Code, Cursor, and GitHub Copilot — install with vidsnatch install --skills
  • 🚀 Modern Tech Stack: Built with UV, FastAPI, Click, and Tailwind CSS

Local Development Setup

Clone the repo and install dependencies with UV:

bash
git clone https://github.com/sahajamit/VidSnatch.git
cd VidSnatch
curl -LsSf https://astral.sh/uv/install.sh | sh   # install UV if needed
uv sync

Releasing a New Version

Use the /release slash command inside Claude Code to bump the version, commit, tag, and push in one step (triggers the GitHub Action that publishes to PyPI):

bash
/release          # patch bump: 0.1.3 → 0.1.4
/release minor    # minor bump: 0.1.3 → 0.2.0
/release major    # major bump: 0.1.3 → 1.0.0
/release 0.2.5    # explicit version

The command updates pyproject.toml, asks for confirmation, then runs git commit → git push origin main → git tag → git push origin <tag>.

Testing

To run the test suite:

bash
# Run all tests
uv run python -m pytest tests/ -v

# Run specific test file
uv run python -m pytest tests/test_transcript.py -v

Usage

🐳 Running with Docker

You can run VidSnatch using the pre-built Docker image from Docker Hub.

  1. Pull the Docker image:

    bash
    docker pull sahajamit/vidsnatch:0.3
  2. Run the Docker container:

    bash
    docker run -p 8080:8080 sahajamit/vidsnatch:0.3
  3. Open your browser: Navigate to http://localhost:8080

🌐 Web Interface (Recommended)

VidSnatch features a stunning futuristic web interface that's perfect for everyday use:

VidSnatch Web Interface

Launch the Web App

  1. Start the server:

    bash
    vidsnatch serve web

    Or alternatively: uv run python web_app.py

  2. Open your browser: Navigate to http://localhost:8080

  3. Start downloading:

    • Paste any YouTube URL into the input field and click "Snatch", or
    • Toggle to "Search YouTube" to find videos by keyword, then click a result
    • Select your desired video quality or transcript language
    • Click "Download Video", "Download MP3", or "Download Transcript"

✂️ Video Trimming Feature

VidSnatch now supports precise video trimming to download specific segments:

  1. Load a video: Paste a YouTube URL and click "Snatch Video Info"
  2. Navigate to Trim Video section: Scroll down to the "✂️ Trim Video" panel
  3. Select time range using sliders:
    • Start Time Slider: Drag to set the beginning of your segment
    • End Time Slider: Drag to set the end of your segment
    • Visual Timeline: See your selection highlighted on the progress bar
    • Time Display: View exact start/end times and segment duration
  4. Choose quality: Select video quality for the trimmed segment
  5. Download: Click "Download Trimmed Video" to get your custom segment

Features:

  • Precise Control: Frame-accurate trimming with visual feedback
  • Real-time Preview: See exact timestamps and duration as you adjust
  • Quality Selection: Choose from available video qualities
  • Smart Validation: Prevents invalid time ranges automatically

The web interface features:

  • Real-time video info fetching
  • Quality selection with visual feedback
  • Video trimming with interactive sliders
  • Transcript download with timestamps
  • Fancy loading animations
  • Automatic file downloads
  • Mobile-responsive design

💻 As a Python module

python
from youtube_downloader import YouTubeDownloader

# Create downloader instance
downloader = YouTubeDownloader()

# Download video
downloader.download_video("https://www.youtube.com/watch?v=VIDEO_ID", output_path="./downloads")

# Download audio only
downloader.download_audio("https://www.youtube.com/watch?v=VIDEO_ID", output_path="./downloads")

# Download transcript with timestamps
downloader.download_transcript("https://www.youtube.com/watch?v=VIDEO_ID", output_path="./downloads")

# Download a trimmed video segment (start_time and end_time in seconds)
downloader.download_video_segment("https://www.youtube.com/watch?v=VIDEO_ID", 
                                 start_time=30, end_time=120, 
                                 output_path="./downloads", quality="720p")

⚡ Command Line Interface

VidSnatch provides a full-featured CLI covering all download operations. Install with pip install vidsnatch (or uv sync for local development), then use the vidsnatch command directly.

Command Overview

vidsnatch search "query" [--sort relevance|date|views]     # search YouTube videos
vidsnatch info <url>                                      # video metadata, formats, duration
vidsnatch download video <url> [--quality LEVEL]          # download video file
vidsnatch download audio <url> [--format mp3|m4a|wav]     # extract audio
vidsnatch download transcript <url> [--language LANG]     # get timestamped transcript
vidsnatch trim <url> --start HH:MM:SS --end HH:MM:SS      # download a clip
vidsnatch stitch <file1> <file2> [<file3>...]             # join clips into one video
vidsnatch list [--output DIR]                             # list downloaded files
vidsnatch serve web [--port PORT]                         # start the web app
vidsnatch serve mcp                                       # start MCP stdio server
vidsnatch serve mcp-http [--port PORT]                    # start MCP HTTP server
vidsnatch install --skills                                # install LLM skill files
vidsnatch uninstall --skills                              # remove LLM skill files

Global options available on all commands:

  • --output DIR — save to a specific directory (overrides config default)
  • --json — output structured JSON instead of human-readable text
  • --help — show command help

Examples

Search YouTube:

bash
vidsnatch search "python tutorial"
vidsnatch search "lo-fi music" --sort views
vidsnatch search "react hooks" --sort date --json

Search then download:

bash
# Step 1: search for videos
vidsnatch search "python tutorial" --sort views

# Step 2: pick a result URL and download
vidsnatch download video "https://youtube.com/watch?v=RESULT_ID" --quality high

Inspect a video before downloading:

bash
vidsnatch info "https://www.youtube.com/watch?v=VIDEO_ID"

Download video:

bash
# Highest quality (default)
vidsnatch download video "https://www.youtube.com/watch?v=VIDEO_ID"

# Specific quality level, custom output directory
vidsnatch download video "https://www.youtube.com/watch?v=VIDEO_ID" --quality high --output ./my_videos

Download audio only:

bash
# MP3 (default format)
vidsnatch download audio "https://www.youtube.com/watch?v=VIDEO_ID"

# Specific format
vidsnatch download audio "https://www.youtube.com/watch?v=VIDEO_ID" --format m4a

Download transcript:

bash
vidsnatch download transcript "https://www.youtube.com/watch?v=VIDEO_ID"

# Different language
vidsnatch download transcript "https://www.youtube.com/watch?v=VIDEO_ID" --language es

Trim a specific segment:

bash
vidsnatch trim "https://www.youtube.com/watch?v=VIDEO_ID" --start 00:01:30 --end 00:03:00

Stitch clips together:

bash
# Join two trimmed clips into one video
vidsnatch stitch ./downloads/clip1.mp4 ./downloads/clip2.mp4

# Stitch three clips with a custom output filename
vidsnatch stitch clip1.mp4 clip2.mp4 clip3.mp4 --filename my_compilation.mp4

# Save to a specific output directory
vidsnatch stitch clip1.mp4 clip2.mp4 --output ./final/

# JSON output for scripting
vidsnatch stitch clip1.mp4 clip2.mp4 --json

AI-powered topic compilation:

bash
# 1. Search for videos on a topic
vidsnatch search "Python async programming" --json

# 2. Get transcripts to find relevant timestamps
vidsnatch download transcript <url1> --json
vidsnatch download transcript <url2> --json

# 3. Download the relevant segments
vidsnatch trim <url1> --start 00:02:10 --end 00:03:45
vidsnatch trim <url2> --start 00:05:00 --end 00:07:20

# 4. Stitch the clips into a compilation
vidsnatch stitch ./downloads/clip1.mp4 ./downloads/clip2.mp4

List downloaded files:

bash
vidsnatch list
vidsnatch list --output ~/Videos --json

Quality levels: highest (default), high, medium, low

Audio formats: mp3 (default), m4a, wav

JSON output

Add --json to any command for machine-readable output, useful for scripting:

bash
vidsnatch info "https://www.youtube.com/watch?v=VIDEO_ID" --json
vidsnatch download video "https://www.youtube.com/watch?v=VIDEO_ID" --json

LLM Skill Integration

VidSnatch ships with a skill file that teaches AI coding assistants (Claude Code, Cursor, GitHub Copilot) how to use the CLI. Install it with:

bash
vidsnatch install --skills

# Remove skill files from all directories
vidsnatch uninstall --skills

This copies SKILL.md into the appropriate directory for each detected tool:

  • Claude Code → ~/.claude/skills/vidsnatch/SKILL.md
  • OpenClaw → ~/.openclaw/workspace/skills/vidsnatch/SKILL.md
  • Copilot → ~/.copilot/skills/vidsnatch/SKILL.md
  • Cursor → ~/.cursor/rules/vidsnatch.md
  • GitHub Copilot → .github/copilot-instructions.md (appended in current repo)

Building and Publishing Docker Images

To build and push multi-platform Docker images:

  1. Create or use a buildx builder:

    bash
    # Option 1: Create new builder (remove existing if needed)
    docker buildx rm multiplatform 2>/dev/null || true
    docker buildx create --name multiplatform --use
    
    # Option 2: Use existing builder
    docker buildx use multiplatform
    
    # Option 3: Use default builder
    docker buildx use default
  2. Build and push for multiple platforms:

    bash
    docker buildx build --platform linux/amd64,linux/arm64 -t sahajamit/vidsnatch:latest -t sahajamit/vidsnatch:0.3 --push .
  3. Build for linux/amd64 only (cloud platform compatible):

    bash
    docker buildx build --platform linux/amd64 -t sahajamit/vidsnatch:latest -t sahajamit/vidsnatch:0.3 --push .
  4. Clean up Docker system (optional):

    bash
    docker system prune -a

🤖 Model Context Protocol (MCP) Server

VidSnatch can also run as an MCP server, allowing AI assistants and other MCP clients to download YouTube videos and audio programmatically.

MCP Features

The MCP server exposes the following tools:

  • search_videos: Search YouTube for videos by keyword
  • get_video_info: Get detailed information about a YouTube video
  • download_video: Download video with specified quality/resolution
  • download_audio: Download audio in various formats and qualities
  • download_transcript: Download video transcripts in different languages
  • download_video_segment: Download specific time segments from videos
  • stitch_videos: Join multiple local clips into a single compilation video
  • list_downloads: List all downloaded files
  • get_config: View current server configuration

Starting the MCP Server

VidSnatch supports both stdio and HTTP transports for maximum flexibility:

stdio Transport (Local)

bash
# Start stdio MCP server via the unified CLI
vidsnatch serve mcp

# Or using the legacy script
vidsnatch-mcp

HTTP Transport (Local & Remote)

bash
# Start HTTP MCP server via the unified CLI
vidsnatch serve mcp-http

# With a custom port
vidsnatch serve mcp-http --port 9090

# Or using the legacy script
vidsnatch-mcp-http

The HTTP server provides:

  • Remote accessibility - Run on one machine, access from another
  • SSE streaming - Real-time progress updates for downloads
  • Web compatibility - CORS support for browser-based clients
  • Multiple clients - Handle concurrent connections

Default HTTP endpoint: http://localhost:8090/mcp

MCP Configuration

The MCP server can be configured in two ways:

1. Configuration File (mcp_config.json)

json
{
  "download_directory": "./downloads",
  "default_video_quality": "highest",
  "default_audio_quality": "highest",
  "max_file_size_mb": 500,
  "allowed_formats": ["mp4", "webm", "mp3", "m4a"],
  "create_subdirs": true
}

2. Environment Variables (Override config file)

  • VIDSNATCH_DOWNLOAD_DIR - Custom download directory
  • VIDSNATCH_VIDEO_QUALITY - Default video quality (e.g., "1080p", "720p", "highest")
  • VIDSNATCH_AUDIO_QUALITY - Default audio quality (e.g., "highest", "128kbps")
  • VIDSNATCH_MAX_FILE_SIZE_MB - Maximum file size in MB

Environment variables take precedence over the config file, allowing client-level customization.

MCP Client Integration

Claude Desktop Configuration

To use VidSnatch with Claude Desktop, add this to your Claude Desktop configuration file:

Location of config file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json

Recommended Configuration (after pip install vidsnatch):

json
{
  "mcpServers": {
    "vidsnatch": {
      "command": "vidsnatch",
      "args": ["serve", "mcp"]
    }
  }
}

Alternative with UV (for development):

json
{
  "mcpServers": {
    "vidsnatch": {
      "command": "/opt/homebrew/bin/uv",
      "args": [
        "run",
        "--directory",
        "/path/to/VidSnatch",
        "vidsnatch",
        "serve",
        "mcp"
      ],
      "cwd": "/path/to/VidSnatch"
    }
  }
}

With custom download directory and settings:

json
{
  "mcpServers": {
    "vidsnatch": {
      "command": "vidsnatch",
      "args": ["serve", "mcp"],
      "env": {
        "VIDSNATCH_DOWNLOAD_DIR": "/Users/you/Downloads/VidSnatch",
        "VIDSNATCH_VIDEO_QUALITY": "1080p",
        "VIDSNATCH_AUDIO_QUALITY": "highest"
      }
    }
  }
}

Other MCP Clients

For other MCP clients, use the general configuration format:

json
{
  "mcpServers": {
    "vidsnatch": {
      "command": "vidsnatch",
      "args": ["serve", "mcp"]
    }
  }
}

MCP Tool Examples

Download Video:

python
# Download highest quality video
result = download_video("https://youtube.com/watch?v=VIDEO_ID")

# Download specific resolution
result = download_video("https://youtube.com/watch?v=VIDEO_ID", resolution="720p")

Download Audio:

python
# Download highest quality audio as MP3
result = download_audio("https://youtube.com/watch?v=VIDEO_ID")

# Download specific quality
result = download_audio("https://youtube.com/watch?v=VIDEO_ID", quality="128kbps")

Download Video Segment:

python
# Download 30-second clip from 1:00 to 1:30
result = download_video_segment(
    "https://youtube.com/watch?v=VIDEO_ID", 
    start_time=60, 
    end_time=90
)

Multiple Running Modes

The vidsnatch CLI is the universal entry point for all three channels:

  • CLI Mode: vidsnatch <command> — download, search, trim, and more from the terminal
  • Web App Mode: vidsnatch serve web — interactive web interface on port 8080
  • MCP Server Mode (stdio): vidsnatch serve mcp — for AI assistants (local)
  • MCP Server Mode (HTTP): vidsnatch serve mcp-http — for remote AI assistants and web clients

All modes can run independently without interference. Legacy scripts (vidsnatch-web, vidsnatch-mcp, vidsnatch-mcp-http) are still available for backward compatibility.

📖 For detailed HTTP transport documentation, see MCP_HTTP_README.md

Requirements

  • Python 3.10+ (3.8+ for web app only)
  • pytubefix library
  • youtube-transcript-api library
  • mcp library (for MCP server functionality)
  • UV package manager
  • ffmpeg (for audio conversion and video merging)

License

MIT License

Installation

TypingMind
{
  "mcpServers": {
    "vidsnatch": {
      "command": "vidsnatch-mcp",
      "args": []
    }
  }
}

Use VidSnatch MCP with multiple AI models

TypingMind connects MCP tools at the workspace level, so once VidSnatch is connected, you can use it with different AI models in TypingMind instead of setting it up separately for each model. You can run MCP locally on your device or connect to a remote MCP server URL.

Option 1: Use the local connector

Use this when the MCP server needs access to local files, apps, or private resources on your computer.

1

Open the MCP settings

In TypingMind, go to Settings, Advanced Settings, then Model Context Protocol and choose Setup Connector.

  1. Open TypingMind in your browser.
  2. Click the Settings icon.
  3. Go to Advanced Settings.
  4. Open the Model Context Protocol section.
  5. Click Setup Connector and choose This Device.
TypingMind MCP connector setup screen with This Device selected
2

Run the connector command

Choose This Device, copy the command from TypingMind, and run it in Terminal. Keep the process running while you use MCP.

  1. Copy the setup command shown by TypingMind.
  2. Open Terminal on macOS or Windows Terminal on Windows.
  3. Paste and run the command.
  4. Approve the package install if Terminal asks you to proceed.
  5. Keep the Terminal window running while using MCP tools.
3

Add VidSnatch as a server

When the connector status is Ready, click Edit Servers and paste the MCP server configuration.

  1. Wait until the connector status shows Ready.
  2. Click Edit Servers.
  3. Paste the VidSnatch MCP server configuration.
  4. Save the server list.
  5. Refresh if you want to confirm the connector is still ready.
TypingMind MCP settings showing active server and Edit Servers button
{
  "mcpServers": {
    "vidsnatch": {
      "command": "npx",
      "args": [
        "-y",
        "<mcp-server-package>"
      ]
    }
  }
}
4

Use it across models

Save the server list, open Plugins, enable the VidSnatch MCP tools, then select any supported AI model in TypingMind and use the tools in chat or assign them to an AI agent.

  1. Open the Plugins page in TypingMind.
  2. Enable the VidSnatch MCP tools.
  3. Start a chat and choose the AI model you want to use.
  4. Use the MCP tools in chat or assign them to an AI agent.
  5. Switch to another AI model whenever needed without reconnecting MCP.
TypingMind chat using enabled MCP tools with a selected AI model
Can you use VidSnatch to help me with this task?
VidSnatch
Sure. I read it.
Here is what I found using VidSnatch.

Option 2: Add an MCP server URL

Use this when VidSnatch is already hosted remotely or your team wants one shared connector that multiple users can access.

1

Open MCP connectors

In TypingMind, go to Plugins, open MCP connectors, then choose Add URL.

  1. Open TypingMind in your browser.
  2. Go to Plugins.
  3. Open MCP connectors.
  4. Click Add URL.
TypingMind Add Custom MCP Server URL form
2

Paste the server URL

Enter the MCP server URL from the provider in the Server URL field. Add a connection name, description, icon, custom HTTP headers, or OAuth client settings if the server requires them.

  1. Paste the MCP server URL from the provider into the Server URL field.
  2. Enter a connection name for VidSnatch.
  3. Add a description and icon if you want it to be easier to identify.
  4. Add custom HTTP headers or OAuth client details if the server requires authentication.
3

Create the connection

Click Create connection, then return to the Plugins list and confirm the new MCP connection is active.

  1. Click Create connection.
  2. Return to the MCP connectors list.
  3. Confirm the VidSnatch connection appears as active.
  4. Refresh the plugin list if the connection does not appear immediately.
4

Switch models without reconnecting

Start a chat with your preferred model, enable the VidSnatch tools from Plugins, and switch to another model whenever needed. The MCP connection stays available to the TypingMind workspace.

  1. Start a new chat in TypingMind.
  2. Select the AI model you want to use.
  3. Enable the VidSnatch tools from Plugins.
  4. Ask the model to use the tool when needed.
  5. Switch to another AI model and reuse the same MCP connection.
TypingMind chat using enabled MCP tools with a selected AI model
Can you use VidSnatch to help me with this task?
VidSnatch
Sure. I read it.
Here is what I found using VidSnatch.

Frequently asked questions

What is the VidSnatch MCP server used for?

VidSnatch is an MCP server that lets compatible AI clients connect to external tools and context. In TypingMind, you can add this MCP server once and make its tools available in your AI workspace.

Can I use VidSnatch MCP with multiple AI models in TypingMind?

Yes. TypingMind connects MCP tools at the workspace level, so you can use VidSnatch with different AI models such as Claude, ChatGPT, Gemini, or other models you have configured in TypingMind without setting up the MCP server separately for each model.

Why use VidSnatch MCP with TypingMind?

TypingMind is one of the best frontends for LLM chat because it brings multiple AI models, prompts, plugins, AI agents, API keys, and MCP tools into one workspace. With VidSnatch connected, you can use its MCP tools across your preferred models while keeping your chat workflow organized in TypingMind.

How do I connect VidSnatch MCP to TypingMind?

VidSnatch can be connected in TypingMind with the local MCP connector or by adding a remote MCP server URL. Use the local connector when the server needs access to files, apps, or private resources on your device, and use a server URL when the MCP server is hosted remotely.

What tools does VidSnatch MCP provide in TypingMind?

VidSnatch exposes MCP capabilities that can be enabled from the TypingMind Plugins page and used in chat or assigned to AI agents.

Do I need to share my API keys with TypingMind to use VidSnatch MCP?

No. TypingMind is local-first and lets you keep your model providers, API keys, prompts, and MCP configuration under your control. If VidSnatch requires authentication, add the required headers, OAuth settings, or local configuration for that MCP server when you create the connection.

Related MCP Servers

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇