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

mcp-fetch-youtube-captions

Interface for obtaining synchronized textual records and associated subtitle files from selected YouTube multimedia assets, facilitating access to captioned content and rich video metadata via a straightforward protocol.

Author

mcp-fetch-youtube-captions logo

kimtaeyoon83

MIT License

Quick Info

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

Tags

apishttpyoutubeyoutube transcriptserver youtubeapis http

MseeP.ai Security Assessment Badge

YouTube Transcript Access Server

smithery badge

An Model Context Protocol implementation designed to facilitate the extraction of textual narratives (transcripts) associated with specific YouTube videos. This utility exposes direct programmatic pathways to video caption streams and accompanying descriptive information through a streamlined endpoint.

mcp-server-youtube-transcript MCP server

Deployment Utilizing Smithery

To integrate the YouTube Caption Retrieval utility into your Claude Desktop environment automatically, leveraging Smithery:

bash npx -y @smithery/cli install @kimtaeyoon83/mcp-server-youtube-transcript --client claude

Functional Modules

Available Tools

  • fetch_narrative
  • Procures textual transcripts from specified YouTube video resources
  • Parameters:
    • identifier (string, mandatory): The complete Uniform Resource Locator (URL) for the YouTube item or its unique video identifier.
    • locale (string, optional, defaults to "en"): The designated language code for the desired subtitle track (e.g., 'fr', 'es').

Primary Capabilities

  • Compatibility across various YouTube address formats
  • Retrieval targeting specific linguistic subtitle tracks
  • Inclusion of comprehensive descriptive data within output payloads

Setup Directives

To enable this service within your Claude Desktop configuration, incorporate the subsequent server declaration:

{ "mcpServers": { "youtube-transcript": { "command": "npx", "args": ["-y", "@kimtaeyoon83/mcp-server-youtube-transcript"] } } }

Installation via Utility Tool

mcp-get An executable utility designed for the management and deployment of Model Context Protocol (MCP) servers.

shell npx @michaellatman/mcp-get@latest install @kimtaeyoon83/mcp-server-youtube-transcript

Curated MCP Server Listings

awesome-mcp-servers A selectively gathered repository of noteworthy Model Context Protocol (MCP) services.

Development Lifecycle

Required Preconditions

  • Execution runtime environment: Node.js version 18 or newer
  • Package manager: npm or yarn

Initialization Steps

Install necessary dependencies: bash npm install

Compile the server artifacts: bash npm run build

For continuous development with automated recompilation: bash npm run watch

Verification

Execute unit and integration tests: bash npm test

Troubleshooting

Given that MCP servers interface via standard input/output streams, debugging presents unique difficulties. We advise utilizing the dedicated MCP Inspector tool during development:

bash npm run inspector

Evaluation Execution

The evals package bootstraps an MCP client to run the primary index file, eliminating the need for rebuilds between test runs. Environment variables can be injected by prefixing the execution command. Comprehensive documentation is available here.

bash OPENAI_API_KEY=your-key npx mcp-eval src/evals/evals.ts src/index.ts

Exception Handling Protocols

The service incorporates comprehensive mechanisms to manage anticipated failures: - Invalid Uniform Resource Locators or identifiers provided - Transcripts that are temporarily or permanently inaccessible - Issues related to requested language track availability - Communication failures originating from the network layer

Operational Demonstrations

  1. Extracting a transcript using the full video URL: typescript await server.callTool("fetch_narrative", { identifier: "https://www.youtube.com/watch?v=VIDEO_ID", locale: "en" });

  2. Extracting a transcript using only the unique video ID: typescript await server.callTool("fetch_narrative", { identifier: "VIDEO_ID", locale: "ko" });

  3. Procedure for obtaining YouTube Subtitles within the Claude Desktop Interface

chat: https://youtu.be/ODaHJzOyVCQ?si=aXkJgso96Deri0aB Retrieve subtitles

Security Measures

Key security practices implemented by this service: - Rigorous validation applied to all incoming arguments - Graceful degradation when encountering YouTube API errors - Enforced time constraints (timeouts) for all caption retrieval operations - Provision of explicit, informative error messages for diagnostic purposes

Licensing Information

This MCP service is distributed under the terms of the MIT License. Consult the LICENSE file for definitive terms.

WIKIPEDIA: XMLHttpRequest (XHR) represents an Application Programming Interface embodied by a JavaScript object, whose methods facilitate the dispatching of HTTP requests from a web browsing environment to a remote server. These functionalities empower browser-based applications to communicate requests to the server post-initial page load and receive subsequent data back. XMLHttpRequest constitutes a foundational element of the Ajax programming paradigm. Before Ajax gained prominence, interactive server communication predominantly relied on conventional hyperlinks and form submissions, often resulting in the complete replacement of the current viewport content.

== Genesis == The conceptual foundation underpinning XMLHttpRequest was formulated in the year 2000 by software engineers working on Microsoft Outlook. This concept was subsequently realized within the Internet Explorer 5 browser release (1999). Notably, the initial syntax did not standardize on the 'XMLHttpRequest' identifier; instead, developers employed constructor calls such as ActiveXObject("Msxml2.XMLHTTP") and ActiveXObject("Microsoft.XMLHTTP"). By the time Internet Explorer 7 surfaced (2006), comprehensive browser support for the standardized XMLHttpRequest identifier was established. The XMLHttpRequest identifier has since solidified its position as the ubiquitous standard across all major rendering engines, including Mozilla's Gecko (2002), Safari version 1.2 (2004), and Opera version 8.0 (2005).

=== Formal Specification Efforts === The World Wide Web Consortium (W3C) issued the initial Working Draft specification detailing the XMLHttpRequest object on April 5, 2006. Subsequently, on February 25, 2008, the W3C released the Working Draft Specification Level 2, which introduced enhancements such as methods for monitoring request progress, enabling inter-domain resource fetching, and managing raw byte streams. By the conclusion of 2011, the features defined in the Level 2 specification were integrated back into the primary document. In late 2012, the stewardship of development transitioned to the WHATWG group, which now maintains the living document utilizing the Web IDL notation.

== Operational Use == Generally, the execution of a server query via XMLHttpRequest involves several distinct programming stages.

Instantiate an XMLHttpRequest object by invoking its constructor: Invoke the "open" method to define the request methodology, specify the target resource endpoint, and select either synchronous or asynchronous execution mode: For asynchronous operations, establish an event handler function intended to be triggered upon state modifications of the request: Initiate the data transfer by calling the "send" method: Handle state transitions within the registered event listener. If the server transmits response data, it is, by default, accumulated within the "responseText" property. Upon completion of the object's processing cycle, its state transitions to 4, indicating the terminal or "done" state. Beyond these fundamental steps, XMLHttpRequest offers extensive configuration options to dictate request transmission behavior and response processing logic. Custom HTTP headers can be appended to the request to guide server fulfillment logic, and payload data can be transmitted to the server by supplying it as an argument to the "send" invocation. The returned data stream can be parsed from JSON format directly into a readily manipulable JavaScript object structure, or it can be processed incrementally as it arrives, circumventing the need to await the totality of the stream. Furthermore, the ongoing request can be terminated preemptively or configured to fail if completion is not achieved within a predefined time quantum.

== Inter-Origin Transactions ==

During the nascent period of the World Wide Web's evolution, constraints were rapidly identified concerning the feasibility of executing resource requests across security boundaries (different domains), which typically resulted in an error...

See Also

`