home / mcp / youtube mcp server
Provides YouTube data access and transcripts via the YouTube Data API v3 for MCP clients.
Configuration
View docs{
"mcpServers": {
"anirudhyadavms-youtube_mcp": {
"command": "node",
"args": [
"/absolute/path/to/youtube-mcp-server/dist/server.js"
],
"env": {
"YOUTUBE_API_KEY": "YOUR_API_KEY_HERE"
}
}
}
}You can run an MCP server that lets you browse YouTube content and generate summaries using YouTube Data API v3. This server exposes powerful tools for searching videos, pulling details and transcripts, and exploring channels and playlists, all accessible through any MCP-compatible client.
Connect with your MCP client and enable the YouTube tools. You can perform tasks such as searching for videos, retrieving detailed video data, fetching transcripts for summarization, and exploring channels and playlists. Use natural language prompts to guide the AI assistant, and the MCP client will delegate to the corresponding tool to return structured results.
Prerequisites you need before installation:
- Node.js v18 or higher
- npm (comes with Node.js) or another package manager you prefer
Install from npm (coming soon)
npm install -g youtube-mcp-serverInstall from source
# Clone the repository
git clone https://github.com/anirudhyadavMS/youtube_mcp.git
cd youtube-mcp-server
# Install dependencies
npm install
# Build the project
npm run buildConfigure your MCP client to connect to the YouTube MCP server using a stdio transport. The server is started by running Node with the built server file and an API key for the YouTube Data API v3.
{
"mcpServers": {
"youtube": {
"type": "stdio",
"command": "node",
"args": ["/absolute/path/to/youtube-mcp-server/dist/server.js"],
"env": {
"YOUTUBE_API_KEY": "YOUR_API_KEY_HERE"
}
}
}
}After you start the MCP client with this configuration, the following tools become available:
- Search YouTube for videos by keyword and sort results by relevance, date, view count, or rating.
- Retrieve comprehensive video details including title, description, duration, views, likes, and tags.
- Fetch transcripts or captions for videos to enable summarization and analysis.
- Get information about channels, including subscriber counts and recent videos.
- List all videos from a specific channel with sorting options.
- Obtain playlist information and list videos with their positions.
The YouTube Data API has a daily quota. Plan usage to stay within limits, and leverage transcripts (web scraping) for data without consuming API quota where possible.
Build the project and run the server to verify everything is wired correctly.
# Build the project
npm run build
# Start the server (example using the compiled file)
npm startTo use the API key securely, restrict the key to YouTube Data API v3 and avoid exposing it in client-side code.
Search YouTube for videos by keyword with optional max results and order parameters.
Retrieve comprehensive metadata for a specific video, including title, description, duration, views, and tags.
Fetch the transcript or captions for a given video, with optional language and timestamps.
Obtain channel details such as name, description, subscriber count, and optional recent videos.
List videos from a specific channel with sorting and pagination options.
Get metadata for a YouTube playlist, including title, description, and video count.
List all videos in a playlist with their positions and metadata.