Back to MCP directory
publicPublicdnsLocal runtime

YouTube Subtitles

通过yt-dlp下载YouTube字幕并通过MCP协议连接Claude.ai进行处理的服务器

article

README

🚀 YouTube MCP 服务器

YouTube MCP 服务器借助 yt-dlp 从 YouTube 下载字幕,并通过 模型上下文协议 与 claude.ai 建立连接。你只需向克劳德询问“总结一下这个 YouTube 视频 <>”,就能体验其功能。

🚀 快速开始

安装 yt-dlp

你可以使用 Homebrew(适用于 macOS)或 WinGet(适用于 Windows)来安装 yt-dlp

# macOS
brew install yt-dlp

# Windows
winget install yt-dlp

✨ 主要特性

本项目具有以下特性:

  • 利用 yt-dlp 从 YouTube 下载字幕。
  • 通过模型上下文协议连接到 claude.ai。
  • 支持指定字幕语言。

📦 安装指南

安装 yt-dlp 是本项目运行的基础,你可以根据自己的操作系统选择合适的安装方式:

  • macOS:使用 Homebrew 安装,命令为 brew install yt-dlp
  • Windows:使用 WinGet 安装,命令为 winget install yt-dlp

💻 使用示例

基础用法

以下是一个配置示例,展示了如何设置 mcpServers 以使用本项目:

{
  "mcpServers": {
    "youtube": {
      "command": "npx",
      "args": ["-y", "@kazuph/mcp-youtube"]
    }
  }
}

📚 详细文档

参数说明

| 属性 | 详情 | |------|------| | url | YouTube 视频 URL,此为必填参数。 | | language | 字幕语言代码,可选参数,默认值为 ja(日语)。需使用 ISO 639-1 语言代码。常见语言代码包括 ja(日语)、en(英语)、ko(韩语)、zh(中文)、fr(法语)等。若指定语言的字幕不存在,将会抛出错误。 |

⚠️ 重要提示

如果指定语言的字幕不存在,程序将会抛出错误,请确保视频有对应语言的字幕。

💡 使用建议

在使用时,可根据视频的实际情况选择合适的字幕语言代码,以获取最佳体验。

help

Runtime guide

cloud

Hosted runtime

Hosted servers run from a provider-managed environment. You usually connect the MCP client to the hosted endpoint or follow the provider's authorization flow, without keeping a local process alive

  1. Open provider connection page
  2. Authorize or copy endpoint
  3. Connect from your MCP client
terminal

Local runtime / other methods

Local servers run on your own machine or infrastructure. You normally copy the server_config into your MCP client, install the required package, and provide env variables from env_schema when needed

  1. Copy server_config
  2. Install required package
  3. Fill env variables and restart client