Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add YouTube transcript server #98

Conversation

kimtaeyoon83
Copy link

Description

Adding a new MCP server that enables extraction of transcripts from YouTube videos. This server provides a simple and robust interface for retrieving video captions with multi-language support.

Server Details

  • Server: youtube-transcript
  • Changes to: New tools for transcript extraction
    • get_transcript tool for fetching video transcripts
    • Support for both URL and video ID inputs
    • Language specification options

Motivation and Context

LLMs often need to analyze or understand video content through transcripts. This server provides a standardized way to access YouTube video transcripts, enabling better video content analysis and making video content more accessible to LLMs through the MCP protocol.

How Has This Been Tested?

  • Tested with various YouTube video formats:
    • Standard youtube.com URLs
    • Short youtu.be URLs
    • Direct video IDs
  • Tested multi-language support
  • Verified error handling with:
    • Invalid URLs/IDs
    • Non-existent videos
    • Unavailable transcripts
    • Network errors

Breaking Changes

No breaking changes. This is a new server that doesn't affect existing functionality.

Types of changes

  • New MCP Server
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update

Checklist

  • I have read the MCP Protocol Documentation
  • My server follows MCP security best practices
  • I have updated the server's README accordingly
  • I have tested this with an LLM client
  • My code follows the repository's style guidelines
  • New and existing tests pass locally
  • I have added appropriate error handling
  • I have documented all environment variables and configuration options

Additional context

feat: Add YouTube transcript server
Add new MCP server for extracting YouTube video transcripts:
- Implement transcript extraction functionality
- Add detailed README with usage examples
- Update package dependencies

The server provides:
- Transcript extraction from YouTube URLs/IDs
- Multi-language support
- Detailed error messages
CallToolResult,
} from "@modelcontextprotocol/sdk/types.js";
// @ts-ignore
import { getSubtitles } from 'youtube-captions-scraper';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would be nice to use Youtube Data API V3 for management of the YouTube channel / automated posting.

This API for getting captions is not really official.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would be nice to use Youtube Data API V3 for management of the YouTube channel / automated posting.

This API for getting captions is not really official.

Good idea. I will check Youtube Data API V3. I will modify it so that it can be changed to the corresponding API. Thank you.

@jspahrsummers
Copy link
Member

Thank you for taking the time to build this! We've now made some changes to how we'll manage the servers repo going forward.

TLDR: We're restructuring the MCP servers repository to focus on reference implementations only. New server implementations should be developed in separate repositories and can be added as links to our README, rather than submitted as PRs to this repository.

In line with that new approach, I'll close out this PR, but we would love to include a link to this server once it's in its own repo. Please do submit a new PR when it's ready!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants