Skip to content

ryanmarc/youtube-summarizer-mcp-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

19 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

YouTube Video Summarizer MCP Server

NPM Version npm downloads License: MIT Node.js Version PRs Welcome

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.

πŸš€ Features

  • 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

πŸ“‹ Prerequisites

  • Node.js 18.0.0 or higher

πŸ“¦ Installation

Method 1: Install from npm (Recommended)

npm install -g @ryanmarc/youtube-summarizer-mcp-server

Method 2: Local Setup

  1. Clone or create this project in a directory:
mkdir youtube-summarizer-mcp-server
cd youtube-summarizer-mcp-server
  1. Save the provided code files (index.js, package.json)

  2. Install dependencies:

npm install

βš™οΈ Configuration

With NPX

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

For Global Installation (Method 1)

{
  "mcpServers": {
    "youtube-summarizer": {
      "command": "youtube-summarizer-mcp-server"
    }
  }
}

For Local Development (Method 2)

{
  "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.

🎯 Usage

Once configured, you can ask to summarize YouTube videos. The server provides transcript data to create summaries. Here are example requests:

Basic Summary Request

Summarize this YouTube video: https://www.youtube.com/watch?v=VIDEO_ID

Detailed Analysis Request

Please analyze this YouTube video and create a comprehensive outline with key points: https://www.youtube.com/watch?v=VIDEO_ID

Request with Different Language

Get the transcript of this Spanish video: https://www.youtube.com/watch?v=VIDEO_ID

Request with Timestamps

Get the transcript of this video with timestamps and summarize the main topics: https://www.youtube.com/watch?v=VIDEO_ID

Video Information

What's the basic information about this YouTube video: https://www.youtube.com/watch?v=VIDEO_ID

πŸ› οΈ Available Tools

The MCP server provides these tools:

  1. get_youtube_transcript: Extracts and formats video captions/transcripts

    • Options: include timestamps, plain or structured format, language selection
  2. get_youtube_video_info: Gets basic video information

    • Returns: duration, word count, transcript availability

πŸ”— Supported URL Formats

  • 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

πŸ“Š Detail Levels

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.

❗ Error Handling

The server handles various error conditions:

  • Invalid YouTube URLs
  • Videos with disabled transcripts
  • Videos without available transcripts
  • API failures

πŸ§ͺ Development

Running Tests

npm test
npm run test:watch
npm run test:coverage

Development Mode

npm run dev

πŸ› Troubleshooting

Server Not Starting

  • 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

API Errors

  • Check your internet connection
  • Verify the MCP server is running correctly

Transcript Errors

  • 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

🀝 Contributing

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.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push <remote> feature/AmazingFeature)
  5. Open a Pull Request

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ™ Acknowledgments

πŸ“ž Support


⭐ If this project helped you, please consider giving it a star! ⭐

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published