YouTube Search & Download MCP Server

YouTube Search & Download MCP Server

Enables searching, retrieving metadata, and downloading YouTube videos or audio without requiring an API key. It utilizes yt-dlp to support media retrieval and playlist management within MCP-compliant clients like Claude and Cursor.

Category
访问服务器

README

<div align="center"> <img width="400" alt="logo" src="https://github.com/user-attachments/assets/4ab98cc2-d0f7-4953-840f-d7fb43d4b893" /> <h1 align="center">YouTube Search & Download MCP Server</h1> <p align="center"> <strong>YouTube API 키 없이 동영상을 검색하고 다운로드하는 MCP 서버</strong> <br /> <a href="https://github.com/easyhak/youtube-search-mcp/issues/new/choose">Bug Report</a> · <a href="https://github.com/easyhak/youtube-search-mcp/issues/new/choose">Feature Request</a> </p>

<p align="center"> <a href="/LICENSE"><img src="https://img.shields.io/github/license/easyhak/youtube-search-mcp?style=flat-square&color=blue" alt="License"></a> <a href="https://github.com/easyhak/youtube-search-mcp/releases"><img src="https://img.shields.io/github/v/release/easyhak/youtube-search-mcp?style=flat-square&color=success" alt="Release"></a> <a href="https://github.com/psf/black"><img src="https://img.shields.io/badge/code%20style-black-000000.svg?style=flat-square" alt="Code style: black"></a> <a href="https://docs.astral.sh/ruff/"><img src="https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json&style=flat-square" alt="Ruff"></a> </p>

<p align="center"> <a href="README.md"><strong>English</strong></a> · <a href="README_ko.md"><strong>한국어</strong></a> </p> </div>


🚀 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/easyhak/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.

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选