About YouTube MCP Server
YouTube MCP Server connects AI assistants to YouTube for video and channel searches and details, plus a resource listing popular videos.
Key features
- 01Search videos with pagination
- 02Retrieve video details
- 03Search YouTube channels
- 04Retrieve channel details
- 05List popular videos
Use cases
- 01Find videos on a topic
- 02Inspect a video's information
- 03Discover channels by subject
MCP support
The MCP server exposes YouTube search and detail tools, along with a resource for currently popular videos, to MCP clients. It requires a YouTube API key.
Configuration
Local server config is the same for every client. Copy it into your client’s MCP config file.
We haven’t collected a package or remote endpoint for this server. Follow the instructions in the project README.
Tools
Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.
Details
From the project READMEYouTube MCP Server
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.
What is MCP?
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.
Requirements
- Node.js v16 or higher
- A YouTube API key (obtained from the Google Developer Console)
Installation
- Clone this repository:
git clone https://github.com/Nocodeboy/youtube-mcp-server.git
cd youtube-mcp-server
- Install dependencies:
npm install
- Create a
.envfile in the project root and add your YouTube API key:
YOUTUBE_API_KEY=your_api_key_here
Execution
To start the server, run:
npm start
Integration with Claude Desktop
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.
Available Tools
1. Search Videos
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 results
2. Get Video Details
Get detailed information about a specific video.
get_video_details
Parameters:
videoId(string, required): YouTube video ID
3. Get Channel Details
Get detailed information about a specific channel.
get_channel_details
Parameters:
channelId(string, required): YouTube channel ID
4. Search Channels
Search 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 results
Available Resources
youtube://popular/videos: List of currently popular videos on YouTube
Usage Examples
With Claude Desktop, you can ask questions like:
- "Search for Python programming videos"
- "Show me details of video with ID dQw4w9WgXcQ"
- "Search for cooking-related channels"
- "Give me information about the GoogleDevelopers channel"
- "What are the most popular videos right now?"
Getting a YouTube API Key
To get a YouTube API key:
- Go to the Google Developer Console
- Create a new project (or select an existing one)
- In the sidebar, select "API Library"
- Search for "YouTube Data API v3" and enable it
- In the sidebar, select "Credentials"
- Click on "Create credentials" and select "API key"
- Copy the generated key and use it in your
.envfile or in the Claude Desktop configuration
Troubleshooting
If you encounter errors, check:
- That you have installed all dependencies with
npm install - That your YouTube API key is valid
- That you have the YouTube Data API v3 enabled in your Google project
- That you are using Node.js version 16 or higher
- If you use Claude Desktop, check the logs in
%APPDATA%\Claude\logs\(Windows) or~/Library/Logs/Claude/(macOS)
Contributions
Contributions are welcome. You can collaborate in several ways:
- Reporting bugs or issues
- Suggesting new features
- Sending pull requests with improvements or fixes
- Improving documentation
Connect & Support
- Follow me on X (Twitter): @Nocodeboy
- If you find this project useful and want to show your support:
License
This project is licensed under the MIT License. See the LICENSE file for more details.
Comments
New to MCP?
From what the protocol is to installing your first server, these answers cover most first questions.
An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.
