SL

sinco-lab/mcp-youtube-transcript

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

40 stars 5 forks 质量 77 趋势 16MIT

TypeScript MCP 服务器,用于在 Claude Desktop、Cursor、Cline、Codex 及其他 MCP 客户端中检索 YouTube 文字稿

概览

这是一个 TypeScript 模型上下文协议服务器,可获取 Claude Desktop、Cursor、Cline、Codex 及其他兼容 MCP 客户端的 YouTube 文字记录。它专为本地 npx 使用设计,因此转录请求可以从您自己的机器发出,而非远程代理。 主要功能:- 从 YouTube 视频中提取文字稿 - 支持多语言 - Android InnerTube 备份用于当前 YouTube 字幕回复 - 兼容工具名称:get_transcripts 和 get_transcript - 带时间戳的文字输出及 get_timed_transcript - 视频元数据及可用文字语言 - 采用连续或段落模式格式化文本 - 检索视频标题和元数据 - 自动段落分割 - 文本规范化和 HTML 实体解码 - 稳健的错误处理 - 时间戳和重叠检测 使用本地NPX配置,这样转录请求是从你自己的机器发送,而不是远程MCP代理。 1.

概述(AI 翻译)

一个TypeScript模型上下文协议服务器,可获取Claude Desktop、Cursor、Cline、Codex及其他兼容MCP客户端的YouTube文字记录。它设计用于本地npx,因此文字记录请求可从您自己的电脑发出,而非远程代理。

目录

  • 特色
  • 入门指南
  • 先决条件
  • 安装
  • 使用情况
  • 基本配置
  • Docker
  • 测试
  • 故障排查与维护
  • 工具
  • 发展
  • 贡献
  • 许可证

特色

主要能力:

  • 摘录YouTube视频文字稿
  • 支持多种语言
  • Android InnerTube 当前 YouTube 字幕回复的备选
  • 兼容工具名称:get_transcripts 和 get_transcript
  • 带有时间戳的转录输出,带有get_timed_transcript
  • 视频元数据及可用的文字稿语言
  • 采用连续或段落格式化文本
  • 检索视频标题和元数据
  • 自动段落分割
  • 文本规范化与HTML实体解码
  • 鲁棒错误处理
  • 时间戳和重叠检测

开始

先决条件

  • Node.js 18岁及以上

安装

本页由 AI 翻译,技术细节请以原文为准。

README

以下为原文 README 节选,完整内容请查看原文。

MCP YouTube Transcript Server

A TypeScript Model Context Protocol server that retrieves YouTube transcripts for Claude Desktop, Cursor, Cline, Codex, and other MCP-compatible clients. It is designed for local npx usage so transcript requests are made from your own machine instead of a remote proxy.

Table of Contents

Features

Key capabilities:

  • Extract transcripts from YouTube videos
  • Support for multiple languages
  • Android InnerTube fallback for current YouTube caption responses
  • Compatible tool names: get_transcripts and get_transcript
  • Timestamped transcript output with get_timed_transcript
  • Video metadata and available transcript languages
  • Format text with continuous or paragraph mode
  • Retrieve video titles and metadata
  • Automatic paragraph segmentation
  • Text normalization and HTML entity decoding
  • Robust error handling
  • Timestamp and overlap detection

Getting Started

Prerequisites

  • Node.js 18 or higher

Installation

Use a local npx configuration so transcript requests are sent from your own machine instead of a remote MCP proxy.

  1. Create or edit the Claude Desktop configuration file:

    • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
    • Windows: %APPDATA%\Claude\claude_desktop_config.json
  2. Add the following configuration:

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

Quick setup script for macOS:

# Create directory if it doesn't exist
mkdir -p ~/Library/Application\ Support/Claude

# Create or update config file
cat > ~/Library/Application\ Support/Claude/claude_desktop_config.json << 'EOL'
{
  "mcpServers": {
    "youtube-transcript": {
      "command": "npx",
在 GitHub 查看完整 README

安装

npx -y @sinco-lab/mcp-youtube-transcript
新手?先看 mcpskill.org 教程 →

配置

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