npm @mrsknetwork/ytmcpstdioMITupdated 1mo ago
Connect AI assistants to YouTube: search, transcripts, metadata, and more.
What can you do with YouTube MCP?
YouTube MCP
Connect AI assistants to YouTube: search, transcripts, metadata, and more.
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"]
}
}
}
API Key (Recommended)
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 or .env file
Pass GOOGLE_API_KEY via env in your MCP client config, or place GOOGLE_API_KEY=YOUR_KEY inside a .env file in the project directory.
{
"mcpServers": {
"youtube-mcp": {
"command": "npx",
"args": ["-y", "@mrsknetwork/ytmcp@latest"],
"env": {
"GOOGLE_API_KEY": "YOUR_GOOGLE_API_KEY"
}
}
}
}
OAuth 2.0
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
| Tool | Auth | Description |
|---|---|---|
get_video_transcript |
None | Download a full spoken transcript using yt-dlp. Specify language_code (e.g. en, es) and whether to prefer manual or auto-generated captions. Returns source metadata with the text. |
search_content |
API Key | Search YouTube for videos, channels, or playlists. Filter by order, published_after, published_before, video_duration, video_definition, and region_code. Supports pagination. |
get_video_metadata |
API Key | Fetch title, description, tags, duration, and stats (views, likes, comments) for one or more videos by ID. |
get_channel_metadata |
API Key | Fetch channel profile, subscriber count, video count, and uploads playlist ID. Accepts a channel ID or @handle. |
list_trending_videos |
API Key | Fetch the most popular videos on YouTube for a given region_code and optional category_id. Supports pagination. |
list_playlists |
API Key | List playlists for a channel, or fetch specific playlists by ID. Returns title, description, and item count. |
list_playlist_items |
API Key | List all videos inside a playlist in order. Returns title, position, and video ID for each entry. |
list_video_comments |
API Key | Fetch top-level comment threads for a video or channel. Filter by keyword with search_terms. Supports pagination. |
list_comment_replies |
API Key | Fetch replies to a specific comment thread by parent_comment_id. Supports pagination. |
list_video_captions |
API Key | List available caption tracks for a video, including language code and type (manual or auto-generated). |
list_video_categories |
API Key | List YouTube video category names and IDs for a given region. Use the IDs with search_content or list_trending_videos. |
list_channel_activities |
API Key | Fetch a channel's recent activity feed, including uploads and playlist additions. |
list_channel_sections |
API Key | List the shelf sections displayed on a channel's page, in order. |
list_supported_languages |
API Key | List all languages supported by YouTube, with language codes and localized names. |
list_supported_regions |
API Key | List all regions supported by YouTube, with region codes and names. |
list_subscriptions |
API Key / OAuth | List public subscriptions for a channel by channel_id (API Key), or your own subscriptions with mine=true (OAuth). |
list_channel_members |
OAuth | List current paying members of your channel. Requires an active memberships program. |
list_membership_levels |
OAuth | List the membership tier names and levels configured for your channel. |
revoke_oauth_token |
OAuth | Sign out and permanently delete your stored Google credentials from the server. |
Building from Source
git clone https://github.com/mrsknetwork/ytmcp.git
cd ytmcp
npm install
npm run build
cp .env.example .env # Set GOOGLE_API_KEY inside .env
node build/server/index.js
License
Licensed under the MIT License.
Install
Add YouTube MCP to your client. Pick the one you use.
claude mcp add ytmcp -- npx -y @mrsknetwork/ytmcpcodex mcp add ytmcp -- npx -y @mrsknetwork/ytmcpamp mcp add ytmcp -- npx -y @mrsknetwork/ytmcp{
"mcpServers": {
"ytmcp": {
"command": "npx",
"args": [
"-y",
"@mrsknetwork/ytmcp"
]
}
}
}Add to `claude_desktop_config.json`, then restart Claude Desktop.
{
"mcpServers": {
"ytmcp": {
"command": "npx",
"args": [
"-y",
"@mrsknetwork/ytmcp"
]
}
}
}Add to `~/.cursor/mcp.json`, or `.cursor/mcp.json` for a single project.
code --add-mcp '{"name":"ytmcp","command":"npx","args":["-y","@mrsknetwork/ytmcp"]}'Or add the block manually to `.vscode/mcp.json` under `servers`.
{
"mcpServers": {
"ytmcp": {
"command": "npx",
"args": [
"-y",
"@mrsknetwork/ytmcp"
]
}
}
}Add to `~/.codeium/windsurf/mcp_config.json`.
{
"mcpServers": {
"ytmcp": {
"command": "npx",
"args": [
"-y",
"@mrsknetwork/ytmcp"
]
}
}
}Add to `cline_mcp_settings.json` via the MCP Servers panel.
{
"mcpServers": {
"ytmcp": {
"command": "npx",
"args": [
"-y",
"@mrsknetwork/ytmcp"
]
}
}
}Add to `~/.gemini/settings.json`.
{
"mcpServers": {
"ytmcp": {
"type": "local",
"command": "npx",
"args": [
"-y",
"@mrsknetwork/ytmcp"
],
"tools": [
"*"
]
}
}
}Add to `~/.copilot/mcp-config.json`, or run `/mcp add` inside the CLI.
{
"context_servers": {
"ytmcp": {
"command": {
"path": "npx",
"args": [
"-y",
"@mrsknetwork/ytmcp"
]
}
}
}
}Add to your Zed `settings.json`.
npx -y @mrsknetwork/ytmcpRun `goose configure`, choose **Add Extension → Command-line Extension**, and paste this command.
19 tools
YouTube MCP exposes 19 tools to a connected agent.
- get_video_transcript
- None
- search_content
- API Key
- get_video_metadata
- API Key
- get_channel_metadata
- API Key
- list_trending_videos
- API Key
- list_playlists
- API Key
- list_playlist_items
- API Key
- list_video_comments
- API Key
- list_comment_replies
- API Key
- list_video_captions
- API Key
- list_video_categories
- API Key
- list_channel_activities
- API Key
- list_channel_sections
- API Key
- list_supported_languages
- API Key
- list_supported_regions
- API Key
- list_subscriptions
- API Key / OAuth
- list_channel_members
- OAuth
- list_membership_levels
- OAuth
- revoke_oauth_token
- OAuth
Score
80 / 100
Excellent
- Documentation25/25
- Maintenance22/25
- Trust13/20
- Capability8/15
- Install experience12/15
- Documents what it does and how to connect
- Has a resolvable package or endpoint
- Exposes at least one tool, prompt or resource
- README has substantive content
- Includes a code example
- Documents its configuration
- Mentions credentials or security posture
- Last commit 40 days ago
- Has a release history
- Repository is not archived
- Licensed MIT
- Namespace verified in the official MCP registry
- Claimed by its owner
- Published under an organisation
- 19 tool(s) documented
- Provides prompt templates
- Provides resources
- 12 documented install method(s)
- Published to a package registry
- Offers a hosted endpoint — no local install
Version history
| Versions | Published |
|---|---|
| 1.0.14Latest | Jul 23, 2026 |
| 1.0.13 | Jul 23, 2026 |
| 1.0.12 | Jul 8, 2026 |
| 1.0.11 | Jul 8, 2026 |
| 1.0.10 | Apr 20, 2026 |
| 1.0.9 | Mar 11, 2026 |
| 1.0.8 | Mar 4, 2026 |
| 1.0.7 | Mar 3, 2026 |
| 1.0.6 | Mar 2, 2026 |
| 1.0.5 | Mar 2, 2026 |