Access YouTube Watch Later playlist URLs with secure MCP server and OAuth2 authentication
The YouTube Watch Later MCP Server is a specialized server that integrates with Model Context Protocol (MCP) to provide access to a custom YouTube playlist in real-time. It retrieves URLs of videos added within a configurable timeframe, offering AI applications like Claude Desktop, Continue, and Cursor the ability to programmatically retrieve content from your Google Playlists. This server enhances these AI applications by providing a seamless way to integrate and interact with external data sources using MCP.
The YouTube Watch Later MCP Server offers several core features that make it indispensable for integrating with various AI workflows:
These features are implemented using MCP, which provides a standardized protocol for AI applications like Claude Desktop. This ensures seamless integration without requiring complex configurations or API setups from the application side.
The YouTube Watch Later server adheres to the MCP protocol to ensure compatibility with various AI clients, including:
This server utilizes TypeScript and the @modelcontextprotocol/sdk library along with the googleapis package (YouTube Data API v3) to build a robust and interoperable solution. The protocol flow diagram below illustrates how data is transferred between the AI application, MCP client, and the YouTube Watch Later server.
The architecture of the YouTube Watch Later server involves several key components:
graph TD
A[AI Application] -->|MCP Client| B[MCP Protocol]
B --> C[MCP Server]
C --> D[Data Source/Tool: YouTube API]
style A fill:#e1f5fe
style B fill:#a6e2dd
style C fill:#f3e5f5
style D fill:#e8f5e8
graph TD
A[Data Source] --> B[Django App]
B -->|API| C[MCP Server]
C -->|Streaming| D[AI Application]
style A fill:#b0bce4
style B fill:#e2f9ff
style C fill:#f3e5f5
style D fill:#e8f5e8
To set up and run the YouTube Watch Later MCP Server, either use Smithery or manually install it.
For automated installation using Smithery:
npx -y @smithery/cli install youtube-watchlater --client claude
Clone this repository:
git clone https://github.com/rados10/youtube-watchlater-mcp.git
cd youtube-watchlater
Install dependencies:
npm install
Build the project:
npm run build
AI applications can integrate with the YouTube Watch Later MCP Server to fetch real-time content from playlists, ensuring that users always have access to up-to-date videos.
Automatically notify users of new additions to their favorite playlist by scheduling tasks using AI workflows.
The server is compatible with Claude Desktop, Continue, Cursor, and other applications:
Here’s an example of how to configure the server in your MCP settings file:
{
"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"
}
}
}
}
The server has the following compatibility and performance characteristics:
AI Application Support:
Performance: Configurable based on the timeframe for video retrieval.
While refresh tokens typically do not expire, they can be generated again if necessary:
get-refresh-token.js script.OAUTH_CLIENT_ID="your_client_id" OAUTH_CLIENT_SECRET="your_client_secret" node get-refresh-token.js
OAUTH_CLIENT_ID and OAUTH_CLIENT_SECRET as environment variables.How do I get the OAUTH_CLIENT_ID and OAUTH_CLIENT_SECRET?
What should I do if my refresh token becomes invalid or expires?
get-refresh-token.js script to generate a new one.Can this server be used with other YouTube playlists besides Watch Later?
Does the server support multiple timeframes for video retrieval?
Is there a limit to the number of URLs that can be retrieved at once?
To modify the server:
src/index.ts.npm run build to compile.Contributions are welcome! Follow our contribution guidelines for submitting pull requests.
For more information, visit:
Explore the power of integrating YouTube playlists with your AI applications using the YouTube Watch Later MCP Server.
RuinedFooocus is a local AI image generator and chatbot image server for seamless creative control
Learn to set up MCP Airflow Database server for efficient database interactions and querying airflow data
Simplify MySQL queries with Java-based MysqlMcpServer for easy standard input-output communication
Explore CoRT MCP server for advanced self-arguing AI with multi-LLM inference and enhanced evaluation methods
Build stunning one-page websites track engagement create QR codes monetize content easily with Acalytica
Access NASA APIs for space data, images, asteroids, weather, and exoplanets via MCP integration