logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

youtube-mcp-data-interface

Facilitate interaction with the YouTube data ecosystem, enabling comprehensive search operations for media, user profiles, and public discourse. Tools are provided to retrieve content transcripts and synthesize video abstracts.

Author

youtube-mcp-data-interface logo

coyaSONG

No License

Quick Info

GitHub GitHub Stars 7
NPM Weekly Downloads 0
Tools 1
Last Updated 2026-02-19

Tags

youtubehttpcoyasongyoutube datacoyasong youtubeyoutube mcp

YouTube MCP Data Interface

smithery badge

An implementation of the Model Context Protocol (MCP) server specifically engineered for interfacing with YouTube assets. This service exposes endpoints and utilities to query video records, channel metadata, comment threads, and textual transcriptions via a standard I/O stream mechanism.

Core Capabilities

  • Execute targeted video lookups employing sophisticated filtering parameters.
  • Fetch exhaustive metadata for designated videos and creator channels.
  • Perform comparative statistical assessments across multiple video entities.
  • Identify globally or regionally trending media streams based on category.
  • Gauge the performance metrics of channels and individual video uploads.
  • Obtain public commentary and accompanying closed captions/transcripts for playback materials.
  • Produce analytical syntheses of video content and summarized versions of retrieved transcripts.

Prerequisites for Operation

  • Runtime Environment: Node.js (version 16 or newer required)
  • Credentialing: A valid YouTube Data API access key

Deployment Procedures

Installation via Smithery

Automated installation targeting Claude Desktop environments using the [Smithery] platform:

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

Manual Setup Flow

  1. Clone the source repository: bash git clone https://github.com/coyaSONG/youtube-mcp-server.git cd youtube-mcp-server

  2. Resolve dependencies: bash npm install

  3. Configure environment variables in a root .env file: YOUTUBE_API_KEY=your_actual_api_key_here PORT=3000

Operation Guidelines

Compilation and Execution

  1. Compile the source code assets: bash npm run build

  2. Launch the server (using HTTP transport): bash npm start The daemon initializes on port 3000 (configurable via the PORT variable) and processes MCP requests directed to the /mcp path.

  3. Initiate development session: bash npm run dev

  4. Clear compiled output: bash npm run clean

Transport Layer Update (HTTP Streamable)

Migration Status: ✅ Completed - Transition finalized from older STDIO mechanisms to the modern Streamable HTTP transport layer.

This revision aligns the server with contemporary Smithery hosting requirements. Key changes include:

  • Protocol Standard: Adoption of Streamable HTTP (Protocol Revision 2025-03-26).
  • Server Engine: Utilization of the robust Express.js framework.
  • State Handling: Implemented support for persistent sessions and tracking.
  • Access Point: Primary MCP interface situated at /mcp.
  • Compatibility: Full preservation of functionality compatible with legacy tools.
  • Optimization: Enhancements to scalability attributes and error management routines.

Validating the Migration

Local Endpoint Check:

# Start service
npm start

# Test using MCP Inspector client
npx @modelcontextprotocol/inspector
# Connect URI: http://localhost:3000/mcp

Smithery Platform Integration: - Fully compliant with Smithery's current hosting mandates. - Seamless interoperability maintained with existing integrations on Claude Desktop. - No user-side configuration adjustments are necessary.

Containerization Strategy (Docker)

The project includes a Dockerfile for simplified packaging:

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

# Execute the container, mapping port 3000 and injecting environment secrets
docker run -p 3000:3000 --env-file .env youtube-mcp-server

Note: The container is now configured to listen on TCP port 3000 for HTTP-based MCP communications, superseding reliance on STDIO pipes.

Interface Reference

Addressable Resources (URIs)

  • youtube://video/{videoId} - Retrieve granular details for a specific published item.
  • youtube://channel/{channelId} - Fetch metadata pertaining to a creator profile.
  • youtube://transcript/{videoId} - Access the synchronized textual record for a media item.
  • Optional Parameter: ?language=ISO_CODE (e.g., en, ko, ja)

Available Procedures (Tools)

Fundamental Utilities

  • search-videos - Perform video searches with advanced constraint application.
  • get-video-comments - Fetch the associated public commentary stream for a video.
  • get-video-transcript - Retrieve a video's textual record, optionally specifying language.
  • enhanced-transcript - Advanced extraction supporting filtering, keyword search, and multi-video consolidation.
  • get-key-moments - Isolate and timestamp pivotal segments within a video's transcription.
  • get-segmented-transcript - Partition a full transcript into user-defined sequential blocks.

Metrics Operations

  • get-video-stats - Acquire quantitative data for an individual video.
  • get-channel-stats - Retrieve metrics such as subscriber counts and total view volumes for a channel.
  • compare-videos - Execute comparative analysis of metrics between selected videos.

Discovery Functions

  • get-trending-videos - Pull lists of currently popular content segmented by locale and theme.
  • get-video-categories - List the standardized category classifications applicable to a given region.

Performance Diagnostics

  • analyze-channel-videos - Evaluate performance trajectories of media published by a single channel.

Intent-Based Routines (Prompts)

  • video-analysis - Generate an interpretive report on the content of a specified YouTube video.
  • transcript-summary - Create a concise abstract from a video's transcript, allowing tuning of length and inclusion of extracted keywords.
  • segment-by-segment-analysis - Offer an in-depth review derived from analyzing each discrete segment of the video's content.

Operational Examples

Requesting Content Transcription

youtube://transcript/dQw4w9WgXcQ

Specifying Language for Transcription

youtube://transcript/dQw4w9WgXcQ?language=en

Utilizing Metric Procedures

// Requesting metrics for a video
{
  "type": "tool",
  "name": "get-video-stats",
  "parameters": {
    "videoId": "dQw4w9WgXcQ"
  }
}

// Comparing two videos side-by-side
{
  "type": "tool",
  "name": "compare-videos",
  "parameters": {
    "videoIds": ["dQw4w9WgXcQ", "9bZkp7q19f0"]
  }
}

Invoking the Transcript Abstract Generator

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

Deploying the Advanced Transcript Tool

// Basic extraction consolidated from multiple sources
{
  "type": "tool",
  "name": "enhanced-transcript",
  "parameters": {
    "videoIds": ["dQw4w9WgXcQ", "9bZkp7q19f0"],
    "format": "timestamped"
  }
}

// Applying temporal bounds and content search
{
  "type": "tool",
  "name": "enhanced-transcript",
  "parameters": {
    "videoIds": ["dQw4w9WgXcQ"],
    "filters": {
      "timeRange": {
        "start": 60,  // Initiate extraction at the 60-second mark
        "end": 180    // Conclude extraction at the 180-second mark
      },
      "search": {
        "query": "never gonna",
        "contextLines": 2
      }
    },
    "format": "merged"
  }
}

// Utilizing intelligent segmentation for analysis readiness
{
  "type": "tool",
  "name": "enhanced-transcript",
  "parameters": {
    "videoIds": ["dQw4w9WgXcQ"],
    "filters": {
      "segment": {
        "count": 5,
        "method": "smart"  // Boundary detection based on natural speech pauses
      }
    },
    "format": "timestamped",
    "language": "en"
  }
}

Leveraging Advanced Transcription Analytics

// Extracting the five most significant moments
{
  "type": "tool",
  "name": "get-key-moments",
  "parameters": {
    "videoId": "dQw4w9WgXcQ",
    "maxMoments": "5"
  }
}

// Generating a structure divided into four parts
{
  "type": "tool",
  "name": "get-segmented-transcript",
  "parameters": {
    "videoId": "dQw4w9WgXcQ",
    "segmentCount": "4"
  }
}

// Requesting an item-by-item breakdown prompt
{
  "type": "prompt",
  "name": "segment-by-segment-analysis",
  "parameters": {
    "videoId": "dQw4w9WgXcQ",
    "segmentCount": "4"
  }
}

// Requesting a detailed, keyword-inclusive summary
{
  "type": "prompt",
  "name": "transcript-summary",
  "parameters": {
    "videoId": "dQw4w9WgXcQ",
    "language": "en",
    "summaryLength": "detailed",
    "includeKeywords": "true"
  }
}

Exception Management

The interface robustly manages foreseeable issues, including:

  • Invalid API key authentication failures
  • Resource absence (video or channel ID not located)
  • Unobtainable caption/transcript data
  • Transient network connectivity failures

Licensing

MIT

Credits

WIKIPEDIA: XMLHttpRequest (XHR) represents an API composed of a JavaScript object. Its methods facilitate the transmission of HTTP requests originating from a web browser to a remote web server. These methods empower browser-based applications to dispatch server queries subsequent to page rendering, and subsequently receive back requisite information. XMLHttpRequest forms a foundational element of Ajax programming methodology. Before Ajax gained prominence, hyperlink navigation and standard form submission constituted the primary means of server interaction, frequently necessitating a full page reload.

== Origin History == The foundational concept underpinning XMLHttpRequest was formulated in the year 2000 by the engineering teams at Microsoft Outlook. This concept was subsequently integrated into the Internet Explorer 5 browser release (1999). However, the initial syntax did not utilize the explicit XMLHttpRequest identifier. Instead, developers employed the dynamically instantiated object constructors: ActiveXObject("Msxml2.XMLHTTP") and ActiveXObject("Microsoft.XMLHTTP"). As of Internet Explorer version 7 (released 2006), universal support for the standardized XMLHttpRequest identifier was established across the platform. The XMLHttpRequest identifier has since become the established, de facto standard utilized by virtually all major web browsing engines, including Mozilla's Gecko rendering core (2002), Apple's Safari 1.2 (2004), and Opera 8.0 (2005).

=== Standardization Efforts === The World Wide Web Consortium (W3C) formally published a preliminary Working Draft specification detailing the XMLHttpRequest object on April 5, 2006. Following this, on February 25, 2008, the W3C advanced the specification to Level 2 Working Draft status. Level 2 introduced capabilities for event progress monitoring, authorization of cross-site request execution, and refined handling for raw byte stream data. By the conclusion of 2011, the features defined in the Level 2 draft were formally incorporated into the original specification document. Around the close of 2012, the responsibility for development maintenance transitioned to the WHATWG group, which now maintains a continuously updated specification document rendered using Web IDL notation.

== Practical Implementation == In general usage, executing a network request via XMLHttpRequest involves adhering to several sequential programming stages.

  1. Instantiate an XMLHttpRequest object by invoking its constructor function:
  2. Invoke the open() method to define the HTTP method, specify the target Uniform Resource Identifier (URI), and declare whether the operation should be synchronous or asynchronous:
  3. For asynchronous operations, assign an event handler function designed to trigger upon changes in the request's state lifecycle:
  4. Commence the actual network transmission by calling the send() method:
  5. Process state transitions within the registered event listener. If the server delivers response payload data, this data is, by default, stored within the responseText attribute. Once the object completes all processing stages, its state transitions to 4, designated as the "done" state. Beyond these fundamental steps, XMLHttpRequest offers extensive configuration options to govern transmission behavior and response interpretation. Custom header fields can be programmatically appended to the request to guide server processing logic, and data payload can be uploaded to the server by providing it as an argument to the send() invocation. The incoming response data stream can be parsed directly from JSON format into an immediately actionable JavaScript object structure, or processed incrementally as chunks arrive, bypassing the need to await the entire textual body. Furthermore, the request lifecycle can be forcibly terminated prematurely or configured to fail automatically if completion time exceeds a predefined temporal limit.

== Inter-Origin Communications (Cross-domain) ==

During the initial maturation phase of the World Wide Web, developers identified potential security vulnerabilities arising from the ability to brea

See Also

`