- Home
- MCP servers
- YouTube
YouTube
- javascript
407
GitHub Stars
javascript
Language
6 months ago
First Indexed
2 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"zubeidhendricks-youtube-mcp-server": {
"command": "zubeid-youtube-mcp-server",
"args": [],
"env": {
"YOUTUBE_API_KEY": "AIza...",
"YOUTUBE_TRANSCRIPT_LANG": "en"
}
}
}
}You can run a YouTube MCP Server to let AI models query YouTube data, fetch transcripts, and explore videos, channels, and playlists through a standardized interface. This guide gives you practical steps to install, configure, and use the server with an MCP client today.
How to use
You will run the MCP server locally or via a client, then connect to it from your MCP-enabled assistant. Use it to retrieve video details, fetch transcripts in preferred languages, search videos, and explore channels and playlists. When you issue requests through your MCP client, you can: obtain video metadata, retrieve and search transcripts, list channel content, and explore playlist items.
How to install
Prerequisites: you need Node.js and npm installed on your system. You will install the MCP server globally or run it via a local runtime.
# Install the MCP server globally
npm install -g zubeid-youtube-mcp-server
# Then configure your client with the API key you obtain below
Configuration and runtime options
You must provide a YouTube Data API key to run the server. The transcripts language can be set to a default language if you wish to customize the transcript language.
{
"mcpServers": {
"zubeid-youtube-mcp-server": {
"command": "zubeid-youtube-mcp-server",
"env": {
"YOUTUBE_API_KEY": "your_youtube_api_key_here"
}
},
"youtube_npx": {
"command": "npx",
"args": ["-y", "zubeid-youtube-mcp-server"],
"env": {
"YOUTUBE_API_KEY": "your_youtube_api_key_here"
}
}
}
}
Examples of usage with a client
Get video details, fetch transcripts, and search for videos using your MCP client connected to the YouTube MCP Server.
// Get video details
const video = await youtube.videos.getVideo({ videoId: "video-id" });
// Get video transcript
const transcript = await youtube.transcripts.getTranscript({ videoId: "video-id", language: "en" });
// Search videos
const searchResults = await youtube.videos.searchVideos({ query: "search term", maxResults: 10 });
Development
To test and build locally, install dependencies, run tests, and build the project.
# Install dependencies
npm install
# Run tests
npm test
# Build
npm run build
# Lint
npm run lint
Notes
This server provides endpoints to access video information, transcript management, channel management, and playlist management. Ensure you keep your API key secure and set a default transcript language if needed.
Security considerations
Treat your API key like a secret. Do not expose it in client-side code or public repositories. Use environment variables in your MCP client configuration and limit access to trusted environments.
Available tools
getVideo
Retrieve video details such as title, description, duration, and other metadata.
listVideos
List videos within a channel or playlist to explore content.
getTranscript
Retrieve transcripts for a video, with optional language support.
searchVideos
Search YouTube for videos matching a query.
getChannel
Fetch details about a channel.
listChannelVideos
List videos associated with a channel.
getPlaylistItems
List items within a playlist.
getPlaylist
Get details about a playlist.