New:Microsoft Teams Notifications Are Now Available in Socket.Learn more
Get Started

@mrsknetwork/ytmcp

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@mrsknetwork/ytmcp

YouTube MCP Server

Source
npmnpm
Version
1.0.10
Version published
Weekly downloads
56
-3.45%
Maintainers
1
Weekly downloads
 
Created
Source

YouTube MCP

Connect AI assistants to YouTube: search, transcripts, metadata, and more.

npm Downloads Socket Badge MIT MCP

What can it do?

Once connected, your AI can:

  • Extract clean, word-for-word video transcripts. No credentials required.
  • Search YouTube by keyword, date range, duration, quality, and region.
  • Fetch trending videos for any country and category.
  • Retrieve video stats, metadata, comments, captions, and channel details.
  • Look up channels by @handle (e.g. @MrBeast).
  • Access your own subscriptions, members, and membership tiers via OAuth.

Getting Started

The server supports three access tiers. Pick the one that fits your use case.

Guest Mode (No Setup)

Works out of the box. The get_video_transcript tool uses yt-dlp to extract transcripts without any API credentials.

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

Unlocks all public data tools. Best for search, metadata, comments, trending videos, and transcripts.

1. Get a Google API Key

  • Open the Google Cloud Console.
  • Enable YouTube Data API v3 for your project.
  • Go to Credentials and create an API Key.

2. Add to your MCP client config

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

OAuth 2.0

Required for private subscriptions, memberships, and account activity.

1. Create an OAuth 2.0 Client

  • Open the Google Cloud Console.
  • Enable YouTube Data API v3 for your project.
  • Go to Credentials > Create Credentials > OAuth 2.0 Client ID.
  • Set Application type to Web application.
  • Add this exact Redirect URI: http://localhost:31415/oauth2callback.
  • Go to OAuth Consent Screen > Test Users and add your Gmail address.

2. Add to your MCP client config

Credentials are passed securely via environment variables in the MCP config. They are never stored in files.

{
  "mcpServers": {
    "youtube-mcp": {
      "command": "npx",
      "args": ["-y", "@mrsknetwork/ytmcp@latest"],
      "env": {
        "GOOGLE_CLIENT_ID": "your-client-id.apps.googleusercontent.com",
        "GOOGLE_CLIENT_SECRET": "your-client-secret"
      }
    }
  }
}

3. First-time login

On your first tool call, the AI will share a login link. Click it, authorize the app in your browser, then tell the AI you are done. Your session is saved. You will not need to log in again unless you revoke access.

4. Signing out

Ask your AI to call revoke_oauth_token to sign out and delete your stored credentials at any time.

Available Tools

ToolAuth RequiredDescription
get_video_transcriptNoneExtract a full video transcript via yt-dlp. Supports language_code (e.g. 'es') and prefers manual captions by default.
search_contentAPI Key / OAuthSearch for videos, channels, or playlists. Filter by date range, duration (short/medium/long), quality (hd/standard), region, and sort order.
get_video_metadataAPI Key / OAuthFetch metadata, duration, and stats (views, likes, comments) for specific videos.
get_channel_metadataAPI Key / OAuthFetch channel profile, subscriber count, and uploads playlist. Accepts channel ID or @handle.
list_trending_videosAPI Key / OAuthFetch currently trending videos for a country and optional category.
list_playlistsAPI Key / OAuthRetrieve playlists for a channel.
list_playlist_itemsAPI Key / OAuthList videos inside a playlist.
list_video_commentsAPI Key / OAuthGet top-level comment threads for a video or channel. Supports keyword filtering.
list_comment_repliesAPI Key / OAuthGet replies to a specific comment thread.
list_video_captionsAPI Key / OAuthList available caption tracks (language, type) for a video.
list_video_categoriesAPI Key / OAuthList YouTube video categories by region.
list_supported_languagesAPI Key / OAuthList all languages supported by YouTube.
list_supported_regionsAPI Key / OAuthList all regions supported by YouTube.
list_channel_activitiesAPI Key / OAuthGet a channel's recent upload and activity feed.
list_channel_sectionsAPI Key / OAuthGet the shelf layout of a channel page.
list_subscriptionsAPI Key (public) / OAuth (own)List subscriptions for a channel or your own account.
list_channel_membersOAuth onlyList paying members of your channel.
list_membership_levelsOAuth onlyList membership tiers for your channel.
revoke_oauth_tokenOAuth onlySign out and delete your stored Google credentials.

Building from Source

Instructions for running the server locally.
git clone https://github.com/mrsknetwork/ytmcp.git
cd ytmcp
npm install
npm run build
node build/server/index.js "YOUR_API_KEY"

License

Licensed under the MIT License.

Keywords

mcp

FAQs

Package last updated on 20 Apr 2026

Related posts