YouTube MCP Server
YouTube MCP サーバー
YouTube動画を操作するためのモデルコンテキストプロトコル(MCP)サーバー。このサーバーは、動画のメタデータやキャプションを抽出し、様々なテンプレートを使用してマークダウン形式に変換するためのツールを提供します。
特徴
ビデオメタデータ: 包括的なビデオ情報を取得します
キャプション抽出:自動生成および手動キャプションのサポート
複数の言語:英語とフランス語のサポートが組み込まれています
テンプレート システム: 3 つの組み込みマークダウン テンプレート:
基本: シンプルなトランスクリプト形式
詳細: タイムスタンプ付きの完全なメタデータ
検索: コンテキストに応じた結果の強調表示
検索機能: 動画のキャプション内を検索
柔軟な認証: APIキーとOAuth2認証の両方をサポート
Related MCP server: YouTube Video Summarizer MCP Server
前提条件
Node.js (v16 以上)
npmまたはyarn
YouTube Data API キーおよび/または OAuth2 認証情報
インストール
リポジトリをクローンします。
git clone [repository-url]
cd youtube-mcp依存関係をインストールします:
npm installプロジェクトをビルドします。
npm run build構成
YouTube の認証情報を使用して、ルート ディレクトリに.envファイルを作成します。
YOUTUBE_API_KEY=your_api_key
YOUTUBE_CLIENT_ID=your_client_id
YOUTUBE_CLIENT_SECRET=your_client_secret
YOUTUBE_REFRESH_TOKEN=your_refresh_token # Optional, for OAuth2MCP構成
サーバーを MCP 設定ファイル (通常は~/.config/Code/User/globalStorage/rooveterinaryinc.roo-cline/settings/cline_mcp_settings.json ) に追加します。
{
"mcpServers": {
"youtube": {
"command": "node",
"args": ["path/to/youtube-mcp/build/index.js"],
"env": {
"YOUTUBE_API_KEY": "your_api_key",
"YOUTUBE_CLIENT_ID": "your_client_id",
"YOUTUBE_CLIENT_SECRET": "your_client_secret"
},
"disabled": false,
"alwaysAllow": []
}
}
}使用法
サーバーは次のツールを提供します。
1. ビデオ情報を取得する
use_mcp_tool youtube get_video_info {
"url": "https://www.youtube.com/watch?v=VIDEO_ID"
}2. 字幕を取得する
use_mcp_tool youtube get_captions {
"url": "https://www.youtube.com/watch?v=VIDEO_ID",
"language": "en" // Optional, defaults to "en"
}3. Markdownに変換する
use_mcp_tool youtube convert_to_markdown {
"url": "https://www.youtube.com/watch?v=VIDEO_ID",
"template_name": "detailed", // Optional, "basic", "detailed", or "search"
"language": "en", // Optional
"options": { // Optional
"include_chapters": true,
"search_term": "keyword" // Only for search template
}
}4. リストテンプレート
use_mcp_tool youtube list_templates依存関係
{
"dependencies": {
"@modelcontextprotocol/sdk": "latest",
"googleapis": "^146.0.0",
"google-auth-library": "^9.0.0",
"youtube-captions-scraper": "^2.0.0",
"express": "^4.18.2",
"open": "^9.1.0"
},
"devDependencies": {
"@types/node": "^20.0.0",
"typescript": "^5.0.0",
"tsx": "^4.0.0"
}
}OAuth2のセットアップ
OAuth2 認証の場合(プライベート ビデオ アクセスに必要):
Google Cloud Consoleでプロジェクトを作成する
YouTube Data API v3 を有効にする
OAuth2 認証情報を作成する (Web アプリケーション タイプ)
認証スクリプトを実行します。
node src/get-api-key.jsブラウザの指示に従ってアプリケーションを承認します
リフレッシュトークンを構成にコピーします
テンプレートのカスタマイズ
src/index.tsのDEFAULT_TEMPLATES配列を変更することで、カスタムテンプレートを追加できます。テンプレートは以下の構造に従います。
interface MarkdownTemplate {
name: string;
description: string;
format: {
header?: string;
chapter_format?: string;
caption_block: string;
timestamp_format?: string;
search_result_format?: string;
}
}ライセンス
マサチューセッツ工科大学
貢献
リポジトリをフォークする
機能ブランチを作成します(
git checkout -b feature/amazing-feature)変更をコミットします (
git commit -m 'Add some amazing feature')ブランチにプッシュする (
git push origin feature/amazing-feature)プルリクエストを開く
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Tools
Related MCP Servers
- AlicenseBqualityCmaintenanceEnables extraction of transcripts, keyword-based video search with metadata retrieval, and channel information discovery from YouTube videos through natural language interaction.34MIT
- AlicenseBqualityFmaintenanceEnables AI assistants to analyze and summarize YouTube videos by extracting captions, subtitles, and comprehensive metadata including title, description, and duration in multiple languages.14160MIT
- AlicenseNot gradedqualityDmaintenanceExtracts captions, metadata, and descriptions from YouTube videos to enable AI assistants to summarize their content.11MIT
- AlicenseAqualityDmaintenanceEnables fetching, searching, and summarizing YouTube video transcripts with multi-language support.4MIT
Related MCP Connectors
Fetch transcripts, subtitles, chapters, metadata and frames from YouTube and 10+ video platforms
YouTube transcripts, subtitles, and video metadata as structured JSON via an Apify Actor.
YouTube transcripts, search, channels, playlists and bulk transcript jobs for AI agents. 14 tools.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/nattyraz/youtube-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server