# Youtube Watchlater Mcp

> MCP server for fetching your YouTube Watch Later playlist via yt-dlp

- **Type:** MCP server
- **Install:** `agentstack add mcp-tulaman-youtube-watchlater-mcp`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [tulaman](https://agentstack.voostack.com/s/tulaman)
- **Installs:** 0
- **Category:** [Content & Media](https://agentstack.voostack.com/c/content-and-media)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [tulaman](https://github.com/tulaman)
- **Source:** https://github.com/tulaman/youtube-watchlater-mcp

## Install

```sh
agentstack add mcp-tulaman-youtube-watchlater-mcp
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# youtube-watchlater-mcp

MCP server for fetching your YouTube Watch Later playlist via [yt-dlp](https://github.com/yt-dlp/yt-dlp).

## Why This Exists

**The YouTube Watch Later playlist is invisible to the YouTube Data API.**

Most YouTube MCP servers and integrations use the official [YouTube Data API v3](https://developers.google.com/youtube/v3) with OAuth authentication. This works well for public playlists, subscriptions, search, and liked videos — but Watch Later is a special private playlist (`WL`) that Google has explicitly excluded from the API. Even with full OAuth scopes and a valid token, the API returns an empty result or a `403 Forbidden` error for this playlist.

This means:
- **OAuth-based MCPs cannot access Watch Later** — the endpoint simply does not exist in the API.
- **Scraping the YouTube web UI** requires managing session cookies, handling anti-bot measures, and is fragile against layout changes.
- **yt-dlp with browser cookies** is the only reliable approach: it reads the authentication cookies that your browser already holds from your active YouTube login, and uses them to fetch the playlist directly — exactly as your browser would.

This server wraps that mechanism as an MCP tool so AI assistants can read your Watch Later queue without you needing API keys, OAuth flows, or exposing credentials.

## Requirements

- Node.js 18+
- `yt-dlp` installed and available on `$PATH`
- YouTube account logged in to a browser on your machine

## Installation

**1. Install yt-dlp:**

```bash
# macOS
brew install yt-dlp

# Linux
sudo curl -L https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp -o /usr/local/bin/yt-dlp
sudo chmod a+rx /usr/local/bin/yt-dlp

# Windows (winget)
winget install yt-dlp
```

**2. Install Node.js dependencies:**

```bash
npm install
```

## Running

```bash
npm start
```

The server communicates over stdio and is intended to be connected to an MCP host (e.g. Claude Desktop), not run directly in a browser.

## Claude Desktop Setup

Add to `claude_desktop_config.json`:

```json
{
  "mcpServers": {
    "youtube-watchlater": {
      "command": "node",
      "args": ["/path/to/youtube-watchlater-mcp/server.mjs"]
    }
  }
}
```

## Tool: `get_watch_later`

Returns videos from your Watch Later playlist.

| Parameter | Type | Default | Description |
|---|---|---|---|
| `browser` | `chrome` \| `brave` \| `edge` \| `firefox` | `chrome` | Browser to read YouTube cookies from |
| `limit` | number (1–500) | `50` | Number of videos to return |
| `profile` | string | — | Browser profile name, e.g. `"Default"` or `"Profile 1"` |

Example response:

```json
{
  "items": [
    {
      "videoId": "dQw4w9WgXcQ",
      "title": "Never Gonna Give You Up",
      "url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
      "channel": "Rick Astley"
    }
  ]
}
```

## Tool: `get_subtitles`

Downloads auto-generated subtitles for a YouTube video and returns the VTT content.

| Parameter | Type | Default | Description |
|---|---|---|---|
| `video` | string | — | YouTube video URL or bare video ID (e.g. `dQw4w9WgXcQ`) |
| `lang` | string | `"en"` | Subtitle language code, e.g. `"en"` or `"ru"` |
| `browser` | `chrome` \| `brave` \| `edge` \| `firefox` | `chrome` | Browser to read YouTube cookies from |
| `profile` | string | — | Browser profile name, e.g. `"Default"` or `"Profile 1"` |

Example response:

```json
{
  "lang": "en",
  "videoId": "dQw4w9WgXcQ",
  "subtitles": "WEBVTT\n..."
}
```

## How It Works

The server calls `yt-dlp --cookies-from-browser  --flat-playlist --dump-json` against the `WL` playlist. Cookies are read directly from the local browser — no tokens or passwords are transmitted anywhere.

## Source & license

This open-source MCP server is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [tulaman](https://github.com/tulaman)
- **Source:** [tulaman/youtube-watchlater-mcp](https://github.com/tulaman/youtube-watchlater-mcp)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** yes
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/mcp-tulaman-youtube-watchlater-mcp
- Seller: https://agentstack.voostack.com/s/tulaman
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
