YouTube Watch Later MCP Server
YouTube 後で見る MCP サーバー
カスタムYouTubeプレイリストへのアクセスを提供するモデルコンテキストプロトコル(MCP)サーバー。このサーバーは、指定された期間内に指定されたプレイリストに追加された動画のURLを取得するためのシンプルなツールを公開しています。
特徴
設定可能な日数内にカスタム プレイリストに追加された動画の URL を取得します。
ビデオのURLだけを返すシンプルなインターフェース
YouTubeデータへの安全なアクセスのためのOAuth2認証
Related MCP server: youtube-watchlater-mcp
インストール
Smithery経由でインストール
Smithery経由で Claude Desktop に YouTube Watch Later を自動的にインストールするには:
npx -y @smithery/cli install youtube-watchlater --client claude手動インストール
このリポジトリをクローンします:
git clone https://github.com/rados10/youtube-watchlater-mcp.git
cd youtube-watchlater依存関係をインストールします:
npm installプロジェクトをビルドします。
npm run build設定
1. Google Cloud プロジェクトを作成する
新しいプロジェクトを作成するか、既存のプロジェクトを選択してください
YouTube Data API v3 を有効にする
「認証情報」→「認証情報の作成」→「OAuth 2.0 クライアントID」に進みます。
アプリケーションの種類を「Web アプリケーション」に設定します
承認済みリダイレクトURIに「 http://localhost:3000/oauth2callback 」を追加する
クライアントIDとクライアントシークレットをコピーします
2. リフレッシュトークンを取得する
提供されたスクリプトを Google Cloud 認証情報を使用して実行します。
OAUTH_CLIENT_ID="your_client_id" OAUTH_CLIENT_SECRET="your_client_secret" node get-refresh-token.jsスクリプトは次のようになります。
デフォルトのブラウザでGoogle認証ページを開きます
サインインしてアプリケーションを承認するように要求します
ターミナルでリフレッシュトークンを表示する
3. MCP設定を構成する
MCP 設定ファイルにサーバー構成を追加します。
VSCode (Claude Dev Extension) の場合: ~/Library/Application Support/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json
Claude デスクトップ アプリの場合: ~/Library/Application Support/Claude/claude_desktop_config.json
{
"mcpServers": {
"youtube-watchlater": {
"command": "node",
"args": ["/path/to/youtube-watchlater/build/index.js"],
"env": {
"OAUTH_CLIENT_ID": "your_client_id",
"OAUTH_CLIENT_SECRET": "your_client_secret",
"OAUTH_REFRESH_TOKEN": "your_refresh_token"
}
}
}
}使用法
サーバーは、オプションのdaysBackパラメータを受け入れる単一のツールget_watch_later_urlsを提供します。
// Get videos added in the last day (default)
{ "daysBack": 1 }
// Get videos added in the last week
{ "daysBack": 7 }サーバーは、一致する動画の YouTube URL の配列を返します。
[
"https://youtube.com/watch?v=video1",
"https://youtube.com/watch?v=video2",
...
]トークンリフレッシュ
明示的にアクセスを取り消さない限り、リフレッシュトークンは期限切れになりません。以下の場合にのみ、新しいトークンを取得する必要があります。
Googleアカウント設定でアプリケーションのアクセスを取り消します
Googleアカウントのセキュリティ設定をリセットする
その他の理由でトークンが無効になった場合
新しいリフレッシュ トークンを取得するには、セットアップ セクションで説明されているように、get-refresh-token.js スクリプトを再度実行するだけです。
発達
サーバーは以下を使用して構築されています:
タイプスクリプト
@モデルコンテキストプロトコル/sdk
googleapis (YouTube データ API v3)
サーバーを変更するには:
src/index.tsに変更を加えますnpm run buildを実行してコンパイルする変更を適用するには、MCP サーバーを再起動します。
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
Related MCP Connectors
Web search, data extraction and controlled browser automation for AI assistants via OAuth.
YouTube discovery, transcripts, library search, and monitors with API keys or OAuth.
Fetch YouTube transcripts with timestamps, search history, and export data for AI models.
Real-time YouTube transcripts, comments, channels & video search MCP. Local npx or hosted OAuth.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables fetching YouTube video transcripts with Google OAuth 2.0 authentication. Supports both manual and auto-generated transcripts with optional timestamps from video URLs or IDs.-
- AlicenseAqualityDmaintenanceFetches your YouTube Watch Later playlist using yt-dlp with browser cookies, bypassing YouTube API limitations. Also supports downloading video subtitles.21MIT
- FlicenseNot gradedqualityDmaintenanceEnables searching YouTube and managing playlists on your own account via OAuth 2.0 authentication.-
- FlicenseNot gradedqualityDmaintenanceEnables analyzing and managing YouTube playlists, including Watch Later, using InnerTube authentication via browser cookies.-