Skip to main content

YouTube search and download MCP server using yt-dlp and FastMCP 2.0

Project description

Logo

YouTube Search & Download MCP Server

YouTube API 키 없이 동영상을 검색하고 다운로드하는 MCP 서버
Bug Report · Feature Request

License Release Code style: black Ruff

English · 한국어


🚀 What is YouTube Search MCP?

This is a production-quality Model Context Protocol (MCP) server that allows you to search, get information about, and download YouTube videos and audio without needing a YouTube API key. It's designed to work seamlessly with MCP clients like Claude Desktop and Cursor.

The server is built with / for robust backend operations and FastMCP for a high-performance server framework.

✨ Key Features

  • No API Key Required: Search and download freely using yt-dlp.
  • Easy Installation: Simple setup with uv or pip. Works seamlessly with MCP clients.
  • Video & Audio Downloads: Download content in various formats (mp4, mkv, mp3, wav, etc.) and qualities.
  • Playlist Support: Search for playlists, get playlist details, and retrieve all videos from any playlist.
  • Rich Metadata: Get detailed video information, including duration, view count, and chapters.
  • Client Compatibility: Works great with Claude, Cursor, and other MCP-compliant clients.
  • Robust & Type-Safe: Built on a SOLID architecture with full type safety using Pydantic.

🏁 Getting Started (For Users)

Prerequisites

  • Python 3.10 or higher
  • uv (recommended) or pip
  • FFmpeg (must be installed and available in your system's PATH)
    • Windows: choco install ffmpeg (with Chocolatey) or download from gyan.dev/ffmpeg
    • macOS: brew install ffmpeg
    • Linux: sudo apt install ffmpeg (Ubuntu/Debian) or sudo dnf install ffmpeg (Fedora)

Installation

Install the package using uv (recommended) or pip:

# Using uv (recommended)
uv pip install youtube-search-mcp

# Or using pip
pip install youtube-search-mcp

Running the Server

After installation, you can run the server directly:

youtube-search-mcp

💻 Client Configuration

Configure your MCP client to connect to the server.

For Claude Desktop or Cursor:

Add this to your MCP client configuration (usually claude_desktop_config.json):

{
  "mcpServers": {
    "youtube-search": {
      "command": "youtube-search-mcp"
    }
  }
}

Or if using uvx (no installation required):

{
  "mcpServers": {
    "youtube-search": {
      "command": "uvx",
      "args": ["youtube-search-mcp"]
    }
  }
}

🔧 Configuration

You can customize the server's behavior by setting environment variables. These can be added to your MCP client configuration (e.g., claude_desktop_config.json) or set via a .env file in the project root.

Variable Description Default
YT_MCP_DOWNLOAD_DIR Directory where videos/audio will be saved downloads
YT_MCP_DEFAULT_VIDEO_QUALITY Default video quality (best, high, medium, low) best
YT_MCP_DEFAULT_MAX_RESULTS Number of search results to return by default 10
YT_MCP_LOG_LEVEL Logging level (DEBUG, INFO, WARNING, ERROR) INFO

🛠️ For Developers & Contributors

Interested in contributing? Here’s how to set up your development environment.

Prerequisites

  • Git
  • Python 3.10+
  • uv (recommended) or pip
  • FFmpeg (must be installed and available in your system's PATH for development)
    • Windows: choco install ffmpeg (with Chocolatey) or download from gyan.dev/ffmpeg
    • macOS: brew install ffmpeg
    • Linux: sudo apt install ffmpeg (Ubuntu/Debian) or sudo dnf install ffmpeg (Fedora)

Setup

  1. Clone the Repository

    git clone https://github.com/JIHAK-dev/youtube-search-mcp.git
    cd youtube-search-mcp
    
  2. Install Dependencies Using uv (recommended):

    uv sync
    

    Using pip:

    python -m venv .venv
    # Activate the virtual environment
    # Windows: .venv\Scripts\activate
    # macOS/Linux: source .venv/bin/activate
    pip install -e ".[dev]"
    
  3. Run the Server Using uv:

    uv run python -m youtube_search_mcp.main
    

    Or with activated virtual environment:

    python -m youtube_search_mcp.main
    

Code Quality & Testing

  • Format Code: uv run black .
  • Lint Code: uv run ruff check .
  • Type Check: uv run mypy .
  • Run Tests: uv run pytest

🤝 Contributing

Contributions are what make the open-source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

Please refer to the Contributing Guidelines for more details.

📜 License

Distributed under the MIT License. See LICENSE for more information.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

youtube_search_mcp-1.0.3.tar.gz (3.6 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

youtube_search_mcp-1.0.3-py3-none-any.whl (41.8 kB view details)

Uploaded Python 3

File details

Details for the file youtube_search_mcp-1.0.3.tar.gz.

File metadata

  • Download URL: youtube_search_mcp-1.0.3.tar.gz
  • Upload date:
  • Size: 3.6 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.8

File hashes

Hashes for youtube_search_mcp-1.0.3.tar.gz
Algorithm Hash digest
SHA256 657506c7ca611ac29fb6b745309d302cb1587daf3d4408f7c0d6a453e9f656a8
MD5 502deeeeedf0d99b2fee55b4fe9a8454
BLAKE2b-256 ed1857e73333135eb32f5c10d9afbd756da2ce173007ba7afe6d7564102093ca

See more details on using hashes here.

File details

Details for the file youtube_search_mcp-1.0.3-py3-none-any.whl.

File metadata

File hashes

Hashes for youtube_search_mcp-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 12770f3d663a948f0e24207038d46f09363ac777c6973061d1467e93ddc4c5bd
MD5 b375a512c3ef45c9db67cd9bbe5d501c
BLAKE2b-256 01ba0c04f92d6271164a85bd81192a9e0c5e842a3b32640cf039cba22777268a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page