YouTube Integration
STDIOAn MCP server allowing AI assistants to interact with YouTube API.
An MCP server allowing AI assistants to interact with YouTube API.
This is an MCP (Model Context Protocol) server that allows Claude and other AI assistants to interact with the YouTube API. The server provides tools to search for videos, get details about specific videos, search for channels, and obtain detailed information about channels.
Model Context Protocol (MCP) is an open standard developed by Anthropic (creators of Claude) to connect AI assistants with external data sources and tools. It allows models like Claude to access up-to-date information and perform actions in external systems in a standardized way.
MCP functions as a "universal bridge" for AI, providing a standardized way for models to access various content repositories, business services, or applications.
git clone https://github.com/Nocodeboy/youtube-mcp-server.git cd youtube-mcp-server
npm install
.env
file in the project root and add your YouTube API key:YOUTUBE_API_KEY=your_api_key_here
To start the server, run:
npm start
To use this MCP server with Claude Desktop, add the following configuration to your claude_desktop_config.json
file (usually located in %APPDATA%\Claude\
on Windows or ~/Library/Application Support/Claude/
on macOS):
{ "mcpServers": { "youtube": { "command": "node", "args": ["path/to/youtube-mcp-server/index.js"], "env": { "YOUTUBE_API_KEY": "your_api_key_here" } } } }
Replace "path/to/youtube-mcp-server/index.js"
with the absolute path to the index.js
file, and "your_api_key_here"
with your YouTube API key.
Search for videos on YouTube based on a query.
search_videos
Parameters:
query
(string, required): Search termsmaxResults
(number, optional): Maximum number of results (between 1 and 50)pageToken
(string, optional): Token to get the next page of resultsGet detailed information about a specific video.
get_video_details
Parameters:
videoId
(string, required): YouTube video IDGet detailed information about a specific channel.
get_channel_details
Parameters:
channelId
(string, required): YouTube channel IDSearch for channels on YouTube based on a query.
search_channels
Parameters:
query
(string, required): Search termsmaxResults
(number, optional): Maximum number of results (between 1 and 50)pageToken
(string, optional): Token to get the next page of resultsyoutube://popular/videos
: List of currently popular videos on YouTubeWith Claude Desktop, you can ask questions like:
To get a YouTube API key:
.env
file or in the Claude Desktop configurationIf you encounter errors, check:
npm install
%APPDATA%\Claude\logs\
(Windows) or ~/Library/Logs/Claude/
(macOS)Contributions are welcome. You can collaborate in several ways:
This project is licensed under the MIT License. See the LICENSE file for more details.