yt-playlist-organizer-mcp
This server lets you organize YouTube playlists and playlist items via the YouTube Data API v3.
Playlists: list, create, update, and delete YouTube playlists.
Playlist items: list, add, update (e.g. reorder/position), and remove videos from playlists.
Auth status: check whether an API key and/or OAuth access token are configured.
Reads work with an API key; writes and
mine=truerequire an OAuth access token.It only touches
/playlistsand/playlistItems— no videos, channels, comments, or other YouTube resources.
Allows managing YouTube playlists and playlist items, including creating, listing, updating, and deleting playlists and their items via the YouTube Data API.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@yt-playlist-organizer-mcp Create a new playlist called 'Study Mix'"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
yt-playlist-organizer-mcp
An MCP server for organizing YouTube playlists via the YouTube Data API v3.
It does exactly one thing and nothing more: create, list, update, and delete playlists and their playlist items. It does not touch videos, channels, captions, comments, subscriptions, or any other YouTube Data API resource.
Built with the official @modelcontextprotocol/sdk
and the YouTube Data API v3 REST endpoints (no heavy googleapis dependency).
Tools
Everything this server does. There are no other tools.
Playlists (/playlists)
Tool | HTTP | Quota | Description |
| GET | 1 | List playlists by |
| POST | 50 | Create a playlist (requires |
| PUT | 50 | Modify a playlist (requires |
| DELETE | 50 | Delete a playlist (requires |
PlaylistItems (/playlistItems)
Tool | HTTP | Quota | Description |
| GET | 1 | List items by |
| POST | 50 | Add a |
| PUT | 50 | Modify a playlist item (e.g. its |
| DELETE | 50 | Remove a playlist item (requires |
Plus auth_status to check which credentials are configured.
Related MCP server: youtube-mcp
Configuration
This server only ever calls the /playlists and /playlistItems endpoints.
The rest of the YouTube Data API is out of scope.
The server reads two environment variables:
Variable | Purpose |
| Google API key. Enables public reads ( |
| OAuth2 access token. Required for write tools and |
See .env.example.
Reads (
..._list) work with just an API key (or an access token).Writes (
insert/update/delete) andmine=truerequire an OAuth2 access token with the scopesyoutube,youtube.force-ssl, oryoutubepartner.
Getting OAuth2 credentials
Create a project in Google Cloud Console.
Enable the YouTube Data API v3.
Create an OAuth2 client ID (Desktop app) and download the JSON.
Exchange credentials for an access token (e.g. via
google-auth-oauthlibon Python, or a local OAuth flow service). SetYOUTUBE_ACCESS_TOKEN=<token>.(Optional) Create an API key for simpler read-only use.
Nix
This is NixOS-friendly. Both a flake and a shell.nix are provided.
# Enter the dev shell (node + typescript toolchain)
nix develop
# or, non-flake:
nix-shellBuild
npm install # install node deps (zod + MCP SDK)
npm run build # emits dist/
npm run typecheck # tsc --noEmitRun locally
# Reads only (API key):
YOUTUBE_API_KEY=... node dist/index.js
# Reads + writes/mine (OAuth access token):
YOUTUBE_ACCESS_TOKEN=... node dist/index.jsWiring into opencode
Add the following to ~/.config/opencode/opencode.jsonc under mcp:
"mcp": {
"yt-playlist-organizer-mcp": {
"type": "local",
"command": ["node", "<path-to-repo>/dist/index.js"],
"enabled": true,
"environment": {
"YOUTUBE_API_KEY": "{file:~/.secrets/yt-api-key}",
"YOUTUBE_ACCESS_TOKEN": "{file:~/.secrets/yt-access-token}"
}
}
}Replace <path-to-repo> with the absolute path where you cloned it, or install
it via npm to run it by name:
npm install -g .
# then use: "command": ["yt-playlist-organizer-mcp"]To run it through the Nix shell instead, use the same key but change command:
"command": ["nix", "develop", "<path-to-repo>", "--command", "node", "dist/index.js"],Notes
Quota costs are per the official API docs and documented per tool.
partvalues are validated against the valid sets for each resource.playlists_list/playlistItems_listrequire exactly one filter parameter; otherwise input validation rejects the call.Update tools (
playlists_update,playlistItems_update) read the existing resource first and preserve any omitted fields (e.g.description,privacyStatus,position,contentDetails), rather than clearing them. Each update therefore costs an extra read against your quota.startAt/endAtare provided in seconds and converted to ISO 8601 durations (PT1M30S) before being sent to the API.This server cannot handle the default "Watch Later" playlist (
WL). It is a constant (not a real playlist ID) in the public YouTube API, and there is no supported way to modify it via the API. See Stack Overflow for details.
Development
npm install
npm test # vitest unit tests
npm run typecheck
npm run buildLicense
MIT
Available Tools
9 toolsauth_statusA
Check whether API key and/or OAuth access token are configured.
Inputs: no named parameters.
playlistItems_deleteA
Remove a playlist item from a playlist. Quota cost: 50 units. Requires OAuth access token.
Inputs: id (required), onBehalfOfContentOwner, onBehalfOfContentOwnerChannel.
playlistItems_insertA
Add a video (videoId) to a playlist (playlistId). startAt/endAt are in seconds and converted to ISO 8601 durations. Quota cost: 50 units. Requires OAuth access token.
Inputs: videoId (required), playlistId (required), note, part, +5 more.
playlistItems_listA
Get items in a YouTube playlist. Requires exactly one filter: playlistId or id. If both are omitted the call is rejected. Quota cost: 1 unit.
Inputs: id, part, videoId, pageToken, +4 more.
playlistItems_updateA
Modify a playlist item (e.g. its position). Omitted snippet/contentDetails fields are preserved. Quota cost: 50 units. Requires OAuth access token.
Inputs: id (required), videoId (required), playlistId (required), note, +6 more.
playlists_deleteA
Delete a YouTube playlist. Quota cost: 50 units. Requires OAuth access token.
Inputs: id (required), onBehalfOfContentOwner.
playlists_insertA
Create a YouTube playlist (requires title). Quota cost: 50 units. Requires OAuth access token.
Inputs: title (required), part, description, privacyStatus, +3 more.
playlists_listA
Get YouTube playlists. Requires exactly one filter: id, channelId, or mine=true (mine=true requires an OAuth access token, not an API key). Quota cost: 1 unit.
Inputs: hl, id, mine, part, +5 more.
playlists_updateA
Modify a YouTube playlist (id and title required; overrides snippet). If description or privacyStatus are omitted their current values are preserved. Quota cost: 50 units. Requires OAuth access token.
Inputs: id (required), title (required), part, description, +3 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 9 tools
Each tool targets a distinct resource (playlists vs playlistItems) and action, with clear separation between auth status checks and CRUD operations. No two tools overlap in purpose.
The verb_noun pattern (e.g., playlists_list, playlistItems_delete) is consistent, but the use of camelCase in 'playlistItems' vs lowercase 'playlists' and the snake_case 'auth_status' cause minor inconsistency.
Nine tools is well within the ideal range for a focused server, covering playlist and playlist item CRUD plus authentication checks without bloat.
Full CRUD for both playlists and playlist items is provided, along with auth status, covering the core workflows of a playlist organizer. Minor missing features like reordering are handled via update.
Maintenance
Related MCP Connectors
An MCP server that gives any LLM or agent clean YouTube transcripts on demand: a single video, a whole channel, or a playlist, plus AI cleanup of auto-generated captions. API-key auth, credit-based, same backend as the public v1 API. Get a free API key with 25 free credits at youtubetranscriptdownload.com/account.
YouTube transcripts, search, channel browsing, and playlists for AI agents via MCP.
YouTube MCP — wraps the YouTube Data API v3 (BYO API key)
MCP server for generating rough-draft project plans from natural-language prompts.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceAn MCP server that enables interaction with the YouTube Data API, allowing users to search videos, get video and channel details, analyze trends, and fetch video transcripts.-
- FlicenseBqualityDmaintenanceMCP server for YouTube Data API v3 enabling video search, channel lookup, trending content, comments, and playlist management.11-
- FlicenseNot gradedqualityDmaintenanceAn MCP server for managing YouTube Music playlists via Claude. Add and remove songs, create playlists, and ask Claude to suggest music — all through conversation.-
- FlicenseAqualityBmaintenanceMCP server that lets you search and list YouTube channel videos, fetch video details, and extract transcripts with timestamps using natural language.5-