- Home
- MCP servers
- YouTube Watch Later
YouTube Watch Later
- javascript
9
GitHub Stars
javascript
Language
6 months ago
First Indexed
2 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"rados10-youtube-watchlater-mcp": {
"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"
}
}
}
}You can use this MCP Server to access a custom YouTube playlist and retrieve the URLs of videos added within a configurable number of days. It authenticates with YouTube data using OAuth2, keeping your data access secure while providing a simple, focused result set.
How to use
You run this MCP server through your MCP client and call its single tool to fetch video URLs from your chosen playlist. By default, it returns videos added in the last day, but you can expand that window to cover the last week or more.
When you request video URLs, you receive a plain array of YouTube watch URLs for the videos that match your time window. This makes it easy to feed the results into other automation or content workflows.
How to install
Prerequisites: you need Node.js installed on your machine. If you plan to run the server locally, ensure you have an environment capable of executing Node scripts.
-
Create the server entry and install dependencies locally if you are not using an automatic installer.
-
Build the project so the runtime index.js is generated.
-
Start the MCP server using the exact runtime command shown in the setup instructions.
# Example: run the built server directly
node /path/to/youtube-watchlater/build/index.js
Additional setup and configuration
You must configure Google OAuth credentials to access YouTube Data API v3. Create a Google Cloud project, enable the YouTube Data API, and obtain OAuth 2.0 client credentials. You will then generate a refresh token that the MCP server uses to obtain access tokens on demand.
The MCP server can be wired as a local stdio server. The configuration below demonstrates how to run the server as a local process with the necessary OAuth credentials passed through environment variables.
{
"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"
}
}
}
}
Security and token management
Token lifecycle is tied to your Google account. The refresh token remains valid until you revoke access or reset security settings. If you revoke access or invalidate the token for any reason, you will need to generate a new refresh token by re-running the token retrieval flow.
Usage patterns and tips
- Use daysBack to control the range of videos returned: 1 for the last day, 7 for the last week, etc. - The tool returns only URLs, making it straightforward to pipe results into other applications or workflows. - Keep OAuth credentials secure and avoid embedding them in shared scripts.
Notes and troubleshooting
If you encounter authentication failures, re-run the token generation flow to refresh credentials. Ensure the redirect URI matches the one configured in your Google Cloud project and that the client ID and secret are correctly passed to the server at runtime.
Development and contributions
The server is written in TypeScript and relies on the MCP SDK and Google APIs client library for YouTube Data API v3. To modify the server, edit the source, rebuild, and restart the MCP server to apply changes.
Available tools
get_watch_later_urls
Retrieves URLs of videos added to the specified playlist within a configurable number of days and returns a simple array of YouTube watch URLs.