# YouTube MCP [Health: Active]

**Category:** 🌐 Social Media  
**Repository:** https://github.com/mrsknetwork/ytmcp.git  
**GitHub Stars:** 6  
**npm Downloads (last month):** 246  
**Views:** 0  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/youtube-mcp-2

## Description
Interact with public YouTube data via the official Data API v3

## Tools
Capabilities this server exposes over MCP:

- **search_content** — Search YouTube for videos, channels, or playlists. Returns items[].id (videoId/channelId/playlistId) and items[].snippet (title, description, thumbnails, channelTitle, publishedAt). Use content_type to filter by resource type. Use page_token from a previous response to paginate additional pages.
- **get_video_metadata** — Fetch full metadata for one or more YouTube videos by ID, or retrieve the most popular videos chart. Returns snippet (title, description, channelId, tags, publishedAt), contentDetails (duration in ISO 8601, definition, caption), and statistics (viewCount, likeCount, commentCount). Provide comma-separated video_ids for lookup, or chart_type='mostPopular' for trending videos.
- **list_trending_videos** — Fetch the currently most popular videos on YouTube for a given region and optional category. Returns snippet (title, channelTitle, publishedAt), contentDetails (duration), and statistics (viewCount, likeCount, commentCount) for each video. Use list_video_categories to discover valid category_id values for your region. Use page_token to paginate.
- **list_video_categories** — List standard YouTube video category names and IDs for a given region (e.g., 'US', 'IN'). Returns items[].id and items[].snippet.title. Use the returned category IDs with search_content or list_trending_videos to filter content by category.
- **list_video_captions** — List available caption track metadata for a video (requires API Key or OAuth). Returns items[].snippet with language (e.g., 'en'), name, trackKind ('standard', 'asr' for auto-generated, 'forced'), and lastUpdated. Use this to discover what caption languages exist for a video; use get_video_transcript to download the actual text.
- **get_video_transcript** — Download the full spoken transcript of a YouTube video as clean plain text using yt-dlp - no API credentials required. Tries manual English captions first (or specified language_code), then auto-generated, then falls back to the first available language. Returns concatenated plain text plus metadata about which language and caption type was used. Ideal for content research without consuming YouTube API quota.
- **get_channel_metadata** — Fetch channel profile, statistics, and content details by channel ID or @handle. Returns snippet (title, description, country, thumbnails), statistics (subscriberCount, videoCount, viewCount), and contentDetails (uploads playlist ID - use with list_playlist_items to browse all channel videos). Accepts either channel_ids (comma-separated) or handle (e.g., '@MrBeast').
- **list_channel_activities** — Get a chronological feed of a channel's recent actions such as uploads, playlist additions, and recommendations. Returns snippet (type, publishedAt, title) and contentDetails (upload.videoId, playlist.playlistId). Useful for tracking what a channel has posted recently. Use page_token to paginate.
- **list_channel_sections** — Get the shelf and section layout of a YouTube channel page (e.g., 'Featured Videos', 'Popular Uploads', 'Single Playlist'). Returns snippet (title, type, style, position) and contentDetails (playlists[], channels[]). Useful for understanding how a channel organizes and surfaces its content.
- **list_playlists** — List playlists belonging to a channel or fetch specific playlists by ID. Returns snippet (title, description, channelId, thumbnails) and contentDetails (itemCount). Use list_playlist_items with the returned playlist id to browse all videos inside a playlist. Use page_token to paginate.
- **list_playlist_items** — List video entries inside a YouTube playlist in order. Returns snippet (title, description, position, videoOwnerChannelTitle, thumbnails) and contentDetails (videoId). Use the videoId values with get_video_metadata or get_video_transcript for further detail. Use page_token to walk through all items.
- **list_video_comments** — Fetch top-level comment threads for a video or all comments on a channel. Returns snippet.topLevelComment (authorDisplayName, textDisplay, likeCount, publishedAt) and replies.comments[] for threaded replies. Use search_terms to filter comments containing a specific phrase. Use page_token to paginate.
- **list_comment_replies** — Fetch replies to a specific comment thread using parent_comment_id, or fetch individual comments by comma-separated comment_ids. Returns snippet (textDisplay, authorDisplayName, likeCount, publishedAt, parentId). Use page_token to paginate through large reply threads.
- **list_subscriptions** — List a channel's public subscriptions by channel_id (requires API Key), or list your own subscriptions with mine=true (requires OAuth). Returns snippet (title, description, resourceId.channelId) and contentDetails (totalItemCount, newItemCount). Use for_channel_id to check if a channel is subscribed to specific channels. Use page_token to paginate.
- **list_channel_members** — List current paying members of the authenticated user's channel. Requires OAuth with the YouTube channel membership scope and an active memberships program on the channel. Returns snippet (memberDetails.channelId, creatorChannelId, membershipsDetails.highestActiveLevel.displayName).
- **list_membership_levels** — List the membership tier pricing levels configured for the authenticated user's channel. Requires OAuth. Returns items[].snippet.levelDetails.displayName for each tier (e.g., 'Member', 'Super Fan'). Use alongside list_channel_members to understand which tier each member belongs to.
- **revoke_oauth_token** — Revoke the stored OAuth token and sign the user out of the YouTube MCP server. Calls Google's token revocation endpoint, deletes the local token file (~/.ytmcp_tokens.json), and clears the in-process auth cache. After revoking, any tool that requires OAuth will prompt the user to re-authenticate. Requires OAuth.
- **list_supported_languages** — List all languages supported by YouTube (e.g., for caption and UI localization). Returns items[].snippet.hl (language code) and items[].snippet.name (human-readable name). Optionally pass language_code to get names localized in that language.
- **list_supported_regions** — List all geographic regions supported by YouTube content targeting. Returns items[].snippet.gl (region code, e.g., 'US') and items[].snippet.name. Use region codes with list_video_categories or search_content to geo-filter results.

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

```json
"mcpServers": {
  "youtube-mcp": {
    "command": "npx",
    "args": ["-y","@mrsknetwork/ytmcp@latest"],
    "env": {
      "GOOGLE_API_KEY": "",
      "GOOGLE_CLIENT_ID": "",
      "GOOGLE_CLIENT_SECRET": ""
    }
  }
}
```

**Requires environment variables:** `GOOGLE_API_KEY`, `GOOGLE_CLIENT_ID`, `GOOGLE_CLIENT_SECRET` — the values above are empty placeholders; fill in real credentials before running (see the repository for what each one is for).

## Documentation

## What YouTube MCP does

YouTube MCP MCP server exposes YouTube research and account-data operations to MCP-compatible AI assistants. It can retrieve spoken transcripts, search for videos, channels, or playlists, and return metadata such as titles, descriptions, tags, durations, views, likes, and comment counts.

The server also covers channel and playlist inspection. Agents can look up channels by ID or `@handle`, list playlists and their items, inspect channel activity and page sections, and retrieve trending videos by region and optional category. Comment tools return top-level threads and replies, while caption tools identify available manual and auto-generated tracks.

Public-data access uses the YouTube Data API v3. OAuth extends the available account operations to personal subscriptions, channel members, and membership levels. The server includes a tool for revoking OAuth access and deleting stored Google credentials.

## How it works

The package runs as a local stdio MCP server through `npx`, using the `@mrsknetwork/ytmcp` package. In guest mode, `get_video_transcript` uses `yt-dlp` and does not need an API key. This mode is appropriate when the main requirement is extracting a video's transcript.

Supplying `GOOGLE_API_KEY` enables the public YouTube Data API tools. Search supports ordering, publication date ranges, duration, definition, region, and pagination. Other API-backed tools support pagination where applicable, including trending videos, comments, replies, and subscriptions.

OAuth requires a Google OAuth 2.0 web application and the redirect URI `http://localhost:31415/oauth2callback`. On the first OAuth-enabled tool call, the assistant provides a login link for browser authorization. The session is then retained until access is revoked.

## Setup and configuration

For a minimal configuration, add the package as an MCP command:

```json
{
  "mcpServers": {
    "youtube-mcp": {
      "command": "npx",
      "args": ["-y", "@mrsknetwork/ytmcp@latest"]
    }
  }
}
```

For public API access, enable YouTube Data API v3 in Google Cloud, create an API key, and pass it as `GOOGLE_API_KEY` in the MCP configuration or a `.env` file.

OAuth configuration uses `GOOGLE_CLIENT_ID` and `GOOGLE_CLIENT_SECRET`. The Google project must have YouTube Data API v3 enabled, and the OAuth consent screen must include the user as a test user when applicable. The client type should be a web application with the exact localhost callback listed above.

To build from source, clone the repository, run `npm install`, run `npm run build`, create `.env` from `.env.example`, and start `node build/server/index.js`.

## Tools and capabilities

The YouTube MCP MCP server provides tools for:

- Extracting full transcripts with a requested language and a preference for manual or auto-generated captions.
- Searching content and filtering results by dates, duration, quality, order, and region.
- Reading video, channel, playlist, caption, category, language, and region information.
- Listing trending videos, channel activity, channel sections, playlists, and playlist entries.
- Fetching comment threads and replies, with keyword filtering for comments.
- Listing public or personal subscriptions, channel members, and membership tiers.
- Revoking OAuth access and removing stored credentials.

## Limitations and notes

Transcript extraction is the only documented guest-mode capability; the other public-data tools require a Google API key. Membership and personal subscription operations require OAuth, and listing channel members additionally requires an active channel memberships program. The server works with public YouTube information unless the OAuth flow grants access to the specified account data.

_Full upstream README: https://allmcps.com/mcp/youtube-mcp-2/readme_

