An MCP (Model Context Protocol) server that allows allows access to YouTube video transcripts for summarization and analysis. Perfect for creating summaries, outlines, and extracting key insights from video content.
- Extract captions/transcripts from YouTube videos using youtube-caption-extractor
- Support for multiple languages (English, Spanish, French, etc.)
- Provide structured transcript data for analysis
- Get basic video information (duration, word count, etc.)
- Handle various transcript formats (plain text or structured)
- Optional timestamp inclusion
- Robust error handling for various failure scenarios
- Works with both auto-generated and manual captions
- Node.js 18.0.0 or higher
npm install -g @ryanmarc/youtube-summarizer-mcp-server
- Clone or create this project in a directory:
mkdir youtube-summarizer-mcp-server
cd youtube-summarizer-mcp-server
-
Save the provided code files (
index.js
,package.json
) -
Install dependencies:
npm install
{
"mcpServers": {
"youtube-summarizer": {
"command": "npx",
"args": ["-y", "@ryanmarc/youtube-summarizer-mcp-server"]
}
}
}
{
"mcpServers": {
"youtube-summarizer": {
"command": "youtube-summarizer-mcp-server"
}
}
}
{
"mcpServers": {
"youtube-summarizer": {
"command": "node",
"args": ["/absolute/path/to/your/youtube-summarizer-mcp-server/index.js"]
}
}
}
Important: Replace /absolute/path/to/your/youtube-summarizer-mcp-server/index.js
with the actual absolute path to your index.js file.
Restart your MCP client after configuration.
Once configured, you can ask to summarize YouTube videos. The server provides transcript data to create summaries. Here are example requests:
Summarize this YouTube video: https://www.youtube.com/watch?v=VIDEO_ID
Please analyze this YouTube video and create a comprehensive outline with key points: https://www.youtube.com/watch?v=VIDEO_ID
Get the transcript of this Spanish video: https://www.youtube.com/watch?v=VIDEO_ID
Get the transcript of this video with timestamps and summarize the main topics: https://www.youtube.com/watch?v=VIDEO_ID
What's the basic information about this YouTube video: https://www.youtube.com/watch?v=VIDEO_ID
The MCP server provides these tools:
-
get_youtube_transcript: Extracts and formats video captions/transcripts
- Options: include timestamps, plain or structured format, language selection
-
get_youtube_video_info: Gets basic video information
- Returns: duration, word count, transcript availability
https://www.youtube.com/watch?v=VIDEO_ID
https://youtube.com/watch?v=VIDEO_ID
https://youtu.be/VIDEO_ID
https://www.youtube.com/embed/VIDEO_ID
https://www.youtube.com/v/VIDEO_ID
Create summaries at different levels of detail based on how you ask:
- Brief: Ask for a "quick summary" or "brief overview"
- Detailed: Ask for a "detailed analysis" or "comprehensive summary"
- Comprehensive: Ask for "in-depth analysis" or "thorough breakdown"
The level of detail depends on how you phrase your request.
The server handles various error conditions:
- Invalid YouTube URLs
- Videos with disabled transcripts
- Videos without available transcripts
- API failures
npm test
npm run test:watch
npm run test:coverage
npm run dev
- Check that Node.js version is 18.0.0 or higher
- Ensure all dependencies are installed (
npm install
) - Verify the path in configuration is absolute and correct
- Check your internet connection
- Verify the MCP server is running correctly
- Some videos may not have captions/transcripts available
- Auto-generated captions may not be available for all languages
- Private or age-restricted videos may not work
- The server uses youtube-caption-extractor for reliable caption extraction
Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature
) - Commit your changes (
git commit -m 'Add some AmazingFeature'
) - Push to the branch (
git push <remote> feature/AmazingFeature
) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Built with Model Context Protocol (MCP) by Anthropic
- Uses youtube-caption-extractor for reliable transcript extraction
- π Report Issues
β If this project helped you, please consider giving it a star! β