Back to MCP directory
publicPublicdnsLocal runtime

mcp-youtube-transcript

一个MCP服务器,用于获取YouTube视频的字幕。

article

README

🚀 YouTube 简体中文 字幕 提取 MCP 服务器

本 MCP 服务器可用于提取指定 YouTube 视频的字幕,为用户获取视频字幕提供了便捷的途径。

Python 应用程序 GitHub 许可证 pre-commit Ruff smithery badge

🚀 快速开始

此 MCP 服务器提供了提取 YouTube 视频字幕的功能,下面为你详细介绍其工具、安装方法及使用代理服务器的步骤。

✨ 主要特性

  • 提供 get_transcript 工具,可获取指定 YouTube 视频的字幕。
  • 支持多平台安装,如 Goose CLI、Goose Desktop 等。
  • 在受限环境下可使用代理服务器提取字幕。

📦 安装指南

适用于 Goose CLI

若要在 Goose CLI 中启用 YouTube 字幕扩展,需编辑配置文件 ~/.config/goose/config.yaml,添加以下条目:

extensions:
  youtube-transcript:
    name: YouTube 字幕
    cmd: uvx
    args: [--from, git+https://github.com/jkawamoto/mcp-youtube-transcript, mcp-youtube-transcript]
    enabled: true
    type: stdio

适用于 Goose Desktop

添加一个新的扩展,设置如下: | 属性 | 详情 | |------|------| | 类型 | 标准输入输出 | | ID | youtube-transcript | | 名称 | YouTube 字幕 | | 描述 | 提取 YouTube 视频的字幕 | | 可执行文件路径 | mcp-youtube-transcript |

适用于 Claude Desktop

若要在 Claude Desktop 中配置,请参考其文档。

📚 详细文档

工具介绍

此 MCP 服务器提供以下工具:

get_transcript

该工具用于获取指定 YouTube 视频的字幕。

参数

| 属性 | 详情 | |------|------| | url | YouTube 视频的完整 URL,此字段是必需的。 | | lang | 所需字幕的语言,默认为 en(英语),若未指定则使用该默认值。 |

使用代理服务器

在受限环境下,可以使用代理服务器来提取字幕,具体步骤如下:

  1. 配置环境变量:
export HTTP_PROXY=http://proxy.example.com:8080
export HTTPS_PROXY=https://proxy.example.com:8080
  1. 或直接在 get_transcript 函数中传递代理参数。

📄 许可证

此项目受 MIT 许可证约束。请参阅 LICENSE 了解详细信息。

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