MCP.so
登录

YouTube Transcript API

@minhleathvn

关于 YouTube Transcript API

A MCP server helps to transcript a youtube video

基本信息

分类

媒体与设计

运行时

python

传输方式

stdio

发布者

minhleathvn

配置

使用下面的配置,将此服务器添加到你的 MCP 客户端。

{
  "mcpServers": {
    "youtube_transcript": {
      "command": "python",
      "args": [
        "apps/flask_server.py"
      ]
    }
  }
}

工具

未检测到工具

工具是从 README 中自动提取的。维护者可以在 ## Tools 标题下列出工具,即可填充这部分内容。

概览

What is YouTube Transcript API?

YouTube Transcript API is a Python service that provides APIs to fetch and transcribe YouTube video content. It supports both a REST API (Flask) and an MCP server implementation, making it suitable for developers who need to extract video transcripts programmatically.

How to use YouTube Transcript API?

Install dependencies with pip install -r requirements.txt, then start the MCP server with python apps/mcp_server.py. Use the exposed MCP tools such as get_transcript(video_id, language) and extract_transcript(video_id, language) to retrieve transcripts. Alternatively, start the Flask server with python apps/flask_server.py and call its REST endpoints.

Key features of YouTube Transcript API

  • Fetch transcripts in multiple languages (English, Vietnamese)
  • Auto-detect and use available transcripts
  • Fallback to audio transcription via Whisper when captions are missing
  • Support for both REST API and MCP server interfaces
  • Automatic language detection with langdetect
  • Temporary file cleanup after audio processing

Use cases of YouTube Transcript API

  • Get video transcripts for content analysis or subtitle generation
  • Automatically fall back to Whisper‑based transcription when no captions exist
  • Search for YouTube videos and extract their transcripts in one workflow
  • Integrate transcript extraction into MCP‑compatible tools or Flask web apps

FAQ from YouTube Transcript API

Which languages are supported for transcripts?

English (en) and Vietnamese (vi) are explicitly supported, and the system can auto‑detect other languages using the langdetect library.

How can I get a transcript if no captions are available?

The API falls back to downloading the audio and transcribing it using Whisper (via the extract_transcript tool or endpoint).

What are the main dependencies?

Key dependencies include youtube-transcript-api, pytube, whisper, torch, langdetect, flask (for the REST API), and mcp (for the MCP server).

How do I run the MCP server versus the REST API?

Run python apps/mcp_server.py for the MCP server, or python apps/flask_server.py for the Flask‑based REST API. Both are located under the apps/ directory.

Are there health check or video info endpoints?

Yes, the Flask server exposes /health and /video/info?video_id=<id> endpoints. The MCP server provides search_youtube_video(query) to find videos.

评论

媒体与设计 分类下的更多 MCP 服务器