ytt-mcp is an open source MCP (Model Context Protocol) server tool specialized in capturing subtitles from YouTube videos and processing them. Developed by the cottongeeks team and hosted on GitHub, it is designed to help users quickly extract video subtitles with simple commands or AI tools, and support further content analysis and summarization. Users can invoke the tool directly through platforms such as Raycast, making it suitable for content creators, researchers or users who need video content. The project code is open, easy to install and extend, suitable for developers or technology enthusiasts.
Function List
- Extract auto-generated subtitles for YouTube videos or user uploaded subtitles.
- Supports calling the subtitle acquisition function from the command line or via the Raycast extension.
- Provides a subtitle content summary function that generates a concise analysis of key points and themes.
- Compatible with the MCP protocol, it can be integrated with AI tools to enhance subtitle processing.
- Supports customizable cue words, allowing users to process subtitle content on demand.
- Open source project that allows users to contribute code or customize features.
Using Help
Installation process
To use ytt-mcp, you first need to make sure your system environment meets the basic requirements. The following are the detailed installation steps:
- Preparing the environment
- Ensure that Node.js is installed (recommended version 16 or above).
- Install Python 3.8+ as some of the dependencies may require Python support.
- If using Raycast, install the Raycast app and enable the MCP extension.
- Make sure you have Git tools for cloning code repositories.
- Cloning Project Code
Open a terminal and run the following command to clone the ytt-mcp repository:git clone https://github.com/cottongeeks/ytt-mcp.git
Go to the project catalog:
cd ytt-mcp
- Installation of dependencies
Run the following command in the project directory to install the necessary dependencies:npm install
If the project requires Python dependencies, run:
pip install -r requirements.txt
- Configuring the MCP Server
Find the configuration file in the project directory (usually theconfig.json
(or similar file). Follow the prompts to set the YouTube API key (optional, for enhanced subtitle extraction). Example configuration file:{ "mcpServers": { "ytt-mcp": { "command": "uvx", "args": ["ytt-mcp"] } } }
- Start the server
Run the following command to start the ytt-mcp server:npm start
Or, if using Raycast, open Raycast and run
Install Server
command, enter@youtube-transcript
You can register the server. - Verify Installation
After startup, access thehttp://localhost:端口号
(the port number is specified in the configuration file and defaults to 3000) to confirm that the server is functioning properly.
Usage
The core function of ytt-mcp is to extract YouTube video subtitles and process them. Here are the specific steps to do it:
subtitle extraction
- Used via Raycast
In Raycast, type@youtube-transcript
and then paste the YouTube video URL (e.g.https://www.youtube.com/watch?v=视频ID
). Raycast will automatically call the ytt-mcp server to extract subtitles and display them.
Example command:@youtube-transcript fetch the Youtube transcript of the video: https://www.youtube.com/watch?v=aO1-6X_f74M
- Used from the command line
Run the following command in the terminal:uvx ytt-mcp --url https://www.youtube.com/watch?v=视频ID
After running, the subtitles will be saved as a text file or output directly in the terminal.
Subtitle content summary
ytt-mcp supports generating subtitle summaries from custom cue words. For example, use the following cue word:
@youtube-transcript fetch the Youtube transcript of the video: {clipboard | raw}
Comprehensively summarize the transcript with the following format:
"""
### Key Takeaways
- 关键点1
- 关键点2
- 关键点3
"""
### Theme Wise Breakdown
- 主题1:内容概述
- 主题2:内容概述
"""
Copy the YouTube video URL to the clipboard and run the above prompts in Raycast. ytt-mcp extracts the subtitles and generates a structured summary with three key points and a content analysis by topic.
Integration of AI tools
ytt-mcp supports the MCP protocol and can be integrated with AI tools such as Claude or Cursor. Users can invoke ytt-mcp via MCP clients to perform complex tasks. For example:
- Configure the MCP server URL in Cursor to be
http://localhost:3000
The - Use natural language commands such as "extract video subtitles and summarize key points" to trigger ytt-mcp processing.
Custom extensions
Developers can modify the source code of ytt-mcp to add new features. For example, adding support for other video platforms or optimizing the subtitle formatting logic. After modification, submit the code to the GitHub repository to participate in community development.
caveat
- Make sure that the YouTube video has automatic subtitles enabled or subtitles are uploaded, otherwise extraction may fail.
- The Raycast extension needs to maintain a network connection to access the MCP server.
- If using the YouTube API, API usage quota restrictions apply.
application scenario
- content creator
Content creators can use ytt-mcp to extract YouTube video subtitles and quickly generate video content summaries for social media copywriting or blog posts. For example, extracting instructional video subtitles and organizing them into key points for posting to Weibo. - Educational research
Students or researchers can extract subtitles from academic lecture videos to generate structured notes for easy review or citation. For example, organize the topics and key content of a TED talk. - multilingual translation
After subtitle extraction, users can combine with AI tools to translate the subtitle content and generate multi-language versions, suitable for multinational teams or multi-language content distribution. - Automated workflows
Developers can integrate ytt-mcp into automation scripts to batch process multiple video captions for data analysis or content archiving.
QA
- Which video platform does ytt-mcp support?
Currently it only supports subtitle extraction for YouTube videos, and may support other platforms through community contributions in the future. - Need a YouTube API key?
Not mandatory, but configuring the API key can improve the stability and accuracy of subtitle extraction. - How to deal with subtitle extraction failure?
Check if subtitles are enabled for the video, make sure the internet connection is working, or try updating ytt-mcp to the latest version. - How to install Raycast extension?
Search for the MCP extension in Raycast, run theInstall Server
command, enter@youtube-transcript
and configure it as prompted.