YouTube Transcript API
@minhleathvn
YouTube Transcript API について
A MCP server helps to transcript a youtube video
基本情報
設定
以下の設定を使って、このサーバーを 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.
「メディアとデザイン」の他のコンテンツ
yt-dlp-mcp
kevinwattA Model Context Protocol (MCP) server that bridges Video & Audio content with Large Language Models using yt-dlp.
Figma MCP Server
JayArrowzFigma MCP Server with full API functionality
YouTube Transcript Server
kimtaeyoon83This is an MCP server that allows you to directly download transcripts of YouTube videos.
Video Editor MCP server
burningionMCP Interface for Video Jungle
NS Travel Information MCP Server
r-huijtsA Model Context Protocol (MCP) server that provides access to NS (Dutch Railways) travel information through Claude AI. This server enables Claude to fetch real-time train travel information and disruptions using the official Dutch NS API.
コメント