YouTube MCP Server

YouTube MCP Server

An MCP server that allows Claude and other AI assistants to interact with the YouTube API, providing tools to search videos/channels and retrieve detailed information about them.

Nocodeboy

Developer Tools
Visit Server

README

YouTube MCP Server

<div align="center"> <img src="https://img.shields.io/badge/YouTube_API-v3-red" alt="YouTube API Version"> <img src="https://img.shields.io/badge/MCP-Model_Context_Protocol-green" alt="MCP"> <img src="https://img.shields.io/badge/Claude-compatible-blue" alt="Claude Compatible"> <img src="https://img.shields.io/badge/license-MIT-orange" alt="License"> </div>

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

  1. Clone this repository:
git clone https://github.com/Nocodeboy/youtube-mcp-server.git
cd youtube-mcp-server
  1. Install dependencies:
npm install
  1. Create a .env file 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 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

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 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

To get 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 in the 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 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:

  1. Reporting bugs or issues
  2. Suggesting new features
  3. Sending pull requests with improvements or fixes
  4. Improving documentation

Connect & Support

  • Follow me on X (Twitter): @Nocodeboy
  • If you find this project useful and want to show your support:

<a href="https://www.buymeacoffee.com/germanhuertas" target="_blank"><img src="https://cdn.buymeacoffee.com/buttons/v2/default-yellow.png" alt="Buy Me A Coffee" style="height: 60px !important;width: 217px !important;" ></a>

License

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

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
MCP Package Docs Server

MCP Package Docs Server

Facilitates LLMs to efficiently access and fetch structured documentation for packages in Go, Python, and NPM, enhancing software development with multi-language support and performance optimization.

Featured
Local
TypeScript
Claude Code MCP

Claude Code MCP

An implementation of Claude Code as a Model Context Protocol server that enables using Claude's software engineering capabilities (code generation, editing, reviewing, and file operations) through the standardized MCP interface.

Featured
Local
JavaScript
@kazuph/mcp-taskmanager

@kazuph/mcp-taskmanager

Model Context Protocol server for Task Management. This allows Claude Desktop (or any MCP client) to manage and execute tasks in a queue-based system.

Featured
Local
JavaScript
Linear MCP Server

Linear MCP Server

Enables interaction with Linear's API for managing issues, teams, and projects programmatically through the Model Context Protocol.

Featured
JavaScript
mermaid-mcp-server

mermaid-mcp-server

A Model Context Protocol (MCP) server that converts Mermaid diagrams to PNG images.

Featured
JavaScript
Jira-Context-MCP

Jira-Context-MCP

MCP server to provide Jira Tickets information to AI coding agents like Cursor

Featured
TypeScript
Linear MCP Server

Linear MCP Server

A Model Context Protocol server that integrates with Linear's issue tracking system, allowing LLMs to create, update, search, and comment on Linear issues through natural language interactions.

Featured
JavaScript
Sequential Thinking MCP Server

Sequential Thinking MCP Server

This server facilitates structured problem-solving by breaking down complex issues into sequential steps, supporting revisions, and enabling multiple solution paths through full MCP integration.

Featured
Python