YouTube Transcript MCP Server

YouTube Transcript MCP Server

Enables fetching, searching, and summarizing YouTube video transcripts with multi-language support.

Category
Visit Server

README

YouTube Transcript MCP Server

A powerful Model Context Protocol (MCP) server that provides seamless access to YouTube video transcripts using the youtube-transcript-api library.

๐Ÿš€ Features

  • ๐Ÿ“ Get Full Transcripts - Fetch complete video transcripts in text or JSON format
  • ๐ŸŒ Multi-Language Support - Discover and fetch transcripts in different languages
  • ๐Ÿ” Smart Search - Search for specific text within video transcripts with context
  • ๐Ÿ“‹ Transcript Summaries - Get concise summaries of video content
  • ๐Ÿ”— URL Flexibility - Works with any YouTube URL format or direct video IDs

๐Ÿ› ๏ธ MCP Tools Available

1. get_transcript

Fetch the complete transcript for a YouTube video.

Parameters:

  • video_url_or_id: YouTube video URL or video ID
  • languages: (Optional) List of language codes (e.g., ['en', 'es'])
  • format_type: (Optional) Output format - 'text' or 'json' (default: 'text')

2. get_available_languages

Get all available transcript languages for a video.

Parameters:

  • video_url_or_id: YouTube video URL or video ID

3. search_transcript

Search for specific text within a video's transcript.

Parameters:

  • video_url_or_id: YouTube video URL or video ID
  • query: Text to search for
  • languages: (Optional) List of language codes to search in

4. get_transcript_summary

Get a summary of the video's transcript.

Parameters:

  • video_url_or_id: YouTube video URL or video ID
  • max_length: (Optional) Maximum summary length in characters (default: 1000)
  • languages: (Optional) List of language codes to use

๐Ÿ“ฆ Installation

  1. Clone the repository:
git clone https://github.com/Ayaanisthebest/MCP-tool-for-YouTube-.git
cd MCP-tool-for-YouTube-
  1. Install dependencies:
pip install -e .
  1. Or install manually:
pip install youtube-transcript-api mcp[cli] fastmcp

โš™๏ธ MCP Configuration

Add to your MCP client configuration:

{
  "mcpServers": {
    "youtube-transcript": {
      "command": "python3",
      "args": ["-m", "youtube_transcript_mcp_server.server"]
    }
  }
}

Note: On macOS, use python3 instead of python. If you have a different Python setup, you can also use the full path:

{
  "mcpServers": {
    "youtube-transcript": {
      "command": "/opt/homebrew/bin/python3",
      "args": ["-m", "youtube_transcript_mcp_server.server"]
    }
  }
}

๐ŸŽฏ Usage Examples

Get a transcript:

get_transcript("https://www.youtube.com/watch?v=dQw4w9WgXcQ")

Search within a transcript:

search_transcript("dQw4w9WgXcQ", "never gonna give you up")

Get available languages:

get_available_languages("https://youtu.be/dQw4w9WgXcQ")

Get a summary:

get_transcript_summary("dQw4w9WgXcQ", max_length=500)

๐Ÿ”— Supported URL Formats

The server can extract video IDs from various YouTube URL formats:

  • https://www.youtube.com/watch?v=VIDEO_ID
  • https://youtu.be/VIDEO_ID
  • https://www.youtube.com/embed/VIDEO_ID
  • https://www.youtube.com/shorts/VIDEO_ID
  • Direct video ID: VIDEO_ID

๐Ÿงช Testing

Run the test script to verify everything works:

python3 test_server.py

๐Ÿ“‹ Dependencies

  • youtube-transcript-api>=0.6.2 - Core YouTube transcript functionality
  • mcp[cli]>=1.3.0 - Model Context Protocol support
  • fastmcp>=0.4.0 - FastMCP framework for easy MCP server development

๐Ÿ› Error Handling

The server includes comprehensive error handling for:

  • Invalid video URLs or IDs
  • Videos without transcripts
  • Network connectivity issues
  • Unsupported languages
  • Rate limiting

๐Ÿ“„ License

MIT License - see LICENSE file for details.

๐Ÿ‘จโ€๐Ÿ’ป About the Developer

Ayaan Ahmad - Full-Stack Developer & AI Enthusiast

I'm passionate about creating innovative tools that bridge the gap between AI and real-world applications. This YouTube Transcript MCP Server is part of my ongoing work to make AI more accessible and powerful through the Model Context Protocol ecosystem.

Connect with me:

  • GitHub: @Ayaanisthebest
  • Building the future of AI-powered tools, one MCP server at a time! ๐Ÿš€

๐Ÿค Contributing

Contributions are welcome! Please feel free to submit issues and pull requests.

๐Ÿ“ˆ Roadmap

  • [ ] Support for YouTube Shorts transcripts
  • [ ] Batch transcript processing
  • [ ] Transcript translation capabilities
  • [ ] Enhanced search with fuzzy matching
  • [ ] Transcript export to various formats

Made with โค๏ธ for the AI community

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured