YouTube MCP Server

YouTube MCP Server

Mirror of

MCP-Mirror

Research & Data
Visit Server

README

YouTube MCP Server

smithery badge

A Model Context Protocol (MCP) server for interacting with YouTube data. This server provides resources and tools to query YouTube videos, channels, comments, and transcripts through a stdio interface.

Features

  • Search for YouTube videos with advanced filtering options
  • Get detailed information about specific videos and channels
  • Compare statistics across multiple videos
  • Discover trending videos by region and category
  • Analyze channel performance and video statistics
  • Retrieve video comments and transcripts/captions
  • Generate video analysis and transcript summaries

Prerequisites

  • Node.js (v16+)
  • YouTube Data API key

Installation

Installing via Smithery

To install YouTube MCP Server for Claude Desktop automatically via Smithery:

npx -y @smithery/cli install @coyaSONG/youtube-mcp-server --client claude

Installing Manually

  1. Clone this repository:

    git clone https://github.com/coyaSONG/youtube-mcp-server.git
    cd youtube-mcp-server
    
  2. Install dependencies:

    npm install
    
  3. Create a .env file in the root directory:

    YOUTUBE_API_KEY=your_youtube_api_key_here
    PORT=3000
    

Usage

Building and Running

  1. Build the project:

    npm run build
    
  2. Run the server:

    npm start
    
  3. Run in development mode:

    npm run dev
    
  4. Clean build artifacts:

    npm run clean
    

Docker Deployment

The project includes a Dockerfile for containerized deployment:

# Build the Docker image
docker build -t youtube-mcp-server .

# Run the container
docker run -p 3000:3000 --env-file .env youtube-mcp-server

API Reference

Resources

  • youtube://video/{videoId} - Get detailed information about a specific video
  • youtube://channel/{channelId} - Get information about a specific channel
  • youtube://transcript/{videoId} - Get transcript for a specific video
    • Optional query parameter: ?language=LANGUAGE_CODE (e.g., en, ko, ja)

Tools

Basic Tools

  • search-videos - Search for YouTube videos with advanced filtering options
  • get-video-comments - Get comments for a specific video
  • get-video-transcript - Get transcript for a specific video with optional language

Statistical Tools

  • get-video-stats - Get statistical information for a specific video
  • get-channel-stats - Get subscriber count, view count, and other channel statistics
  • compare-videos - Compare statistics across multiple videos

Discovery Tools

  • get-trending-videos - Retrieve trending videos by region and category
  • get-video-categories - Get available video categories for a specific region

Analysis Tools

  • analyze-channel-videos - Analyze performance trends of videos from a specific channel

Prompts

  • video-analysis - Generate an analysis of a YouTube video
  • transcript-summary - Generate a summary of a video based on its transcript

Examples

Accessing a Video Transcript

youtube://transcript/dQw4w9WgXcQ

Getting a Transcript in a Specific Language

youtube://transcript/dQw4w9WgXcQ?language=en

Using the Statistical Tools

// Get video statistics
{
  "type": "tool",
  "name": "get-video-stats",
  "parameters": {
    "videoId": "dQw4w9WgXcQ"
  }
}

// Compare multiple videos
{
  "type": "tool",
  "name": "compare-videos",
  "parameters": {
    "videoIds": ["dQw4w9WgXcQ", "9bZkp7q19f0"]
  }
}

Using the Transcript Summary Prompt

{
  "type": "prompt",
  "name": "transcript-summary",
  "parameters": {
    "videoId": "dQw4w9WgXcQ",
    "language": "en"
  }
}

Error Handling

The server handles various error conditions, including:

  • Invalid API key
  • Video or channel not found
  • Transcript not available
  • Network issues

License

MIT

Acknowledgements

Recommended Servers

Crypto Price & Market Analysis MCP Server

Crypto Price & Market Analysis MCP Server

A Model Context Protocol (MCP) server that provides comprehensive cryptocurrency analysis using the CoinCap API. This server offers real-time price data, market analysis, and historical trends through an easy-to-use interface.

Featured
TypeScript
MCP PubMed Search

MCP PubMed Search

Server to search PubMed (PubMed is a free, online database that allows users to search for biomedical and life sciences literature). I have created on a day MCP came out but was on vacation, I saw someone post similar server in your DB, but figured to post mine.

Featured
Python
dbt Semantic Layer MCP Server

dbt Semantic Layer MCP Server

A server that enables querying the dbt Semantic Layer through natural language conversations with Claude Desktop and other AI assistants, allowing users to discover metrics, create queries, analyze data, and visualize results.

Featured
TypeScript
mixpanel

mixpanel

Connect to your Mixpanel data. Query events, retention, and funnel data from Mixpanel analytics.

Featured
TypeScript
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
Nefino MCP Server

Nefino MCP Server

Provides large language models with access to news and information about renewable energy projects in Germany, allowing filtering by location, topic (solar, wind, hydrogen), and date range.

Official
Python
Vectorize

Vectorize

Vectorize MCP server for advanced retrieval, Private Deep Research, Anything-to-Markdown file extraction and text chunking.

Official
JavaScript
Mathematica Documentation MCP server

Mathematica Documentation MCP server

A server that provides access to Mathematica documentation through FastMCP, enabling users to retrieve function documentation and list package symbols from Wolfram Mathematica.

Local
Python
kb-mcp-server

kb-mcp-server

An MCP server aimed to be portable, local, easy and convenient to support semantic/graph based retrieval of txtai "all in one" embeddings database. Any txtai embeddings db in tar.gz form can be loaded

Local
Python
Research MCP Server

Research MCP Server

The server functions as an MCP server to interact with Notion for retrieving and creating survey data, integrating with the Claude Desktop Client for conducting and reviewing surveys.

Local
Python