nocodeboy_youtube_mcp_server

nocodeboy_youtube_mcp_server

by Nocodeboy
An MCP server enabling Claude and other AI assistants to interact with the YouTube API for video and channel searches.

YouTube MCP Server for Claude Integration

YouTube API Version MCP Claude Compatible License

Overview

The YouTube MCP Server is a specialized server that enables Claude and other AI assistants to interact with the YouTube API. It provides tools for searching videos, retrieving video details, searching channels, and obtaining channel information. This implementation leverages the Model Context Protocol (MCP), an open standard developed by Anthropic to connect AI models with external data sources.

What is MCP?

The Model Context Protocol (MCP) is a universal bridge for AI, allowing models like Claude to access external data sources and tools in a standardized way. It ensures seamless integration with various content repositories, business services, or applications.


Requirements

  • Node.js v16 or higher
  • A YouTube API key (obtained from the Google Developer Console)

Installation

  1. Clone the repository:
    shell git clone https://github.com/Nocodeboy/youtube-mcp-server.git cd youtube-mcp-server

  2. Install dependencies:
    shell npm install

  3. Create a .env file in the project root and add your YouTube API key:
    plaintext 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:

{
  "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.

Function:

search_videos

Parameters:
- query (string, required): Search terms
- maxResults (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

Retrieve detailed information about a specific video.

Function:

get_video_details

Parameters:
- videoId (string, required): YouTube video ID


3. Get Channel Details

Retrieve detailed information about a specific channel.

Function:

get_channel_details

Parameters:
- channelId (string, required): YouTube channel ID


4. Search Channels

Search for channels on YouTube based on a query.

Function:

search_channels

Parameters:
- query (string, required): Search terms
- maxResults (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

  1. Go to the Google Developer Console.
  2. Create a new project (or select an existing one).
  3. In the sidebar, select API Library.
  4. Search for YouTube Data API v3 and enable it.
  5. In the sidebar, select Credentials.
  6. Click on Create credentials and select API key.
  7. Copy the generated key and use it in your .env file or Claude Desktop configuration.

Troubleshooting

If you encounter errors, check:
1. That you have installed all dependencies with npm install.
2. That your YouTube API key is valid.
3. That you have the YouTube Data API v3 enabled in your Google project.
4. That you are using Node.js version 16 or higher.
5. If using Claude Desktop, check the logs in %APPDATA%\Claude\logs\ (Windows) or ~/Library/Logs/Claude/ (macOS).


Contributions

Contributions are welcome! You can:
1. Report bugs or issues.
2. Suggest new features.
3. Submit pull requests with improvements or fixes.
4. Improve documentation.


Connect & Support

  • Follow me on X (Twitter): @Nocodeboy
  • Support the project:
    Buy Me A Coffee

License

This project is licensed under the MIT License. See the LICENSE file for details.

Features & Capabilities

Categories
mcp_server model_context_protocol javascript claude youtube_api api_integration search

Implementation Details

Stats

0 Views
0 Favorites
1 GitHub Stars

Repository Info

Nocodeboy Organization

Similar Servers

continuedev_continue by continuedev
0
0
0