sergey-kvachenok
MCP Serversergey-kvachenokpublic

youtube parser context7

Testing context7

Repository Info

0
Stars
0
Forks
0
Watchers
0
Issues
TypeScript
Language
-
License

About This Server

Testing context7

Model Context Protocol (MCP) - This server can be integrated with AI applications to provide additional context and capabilities, enabling enhanced AI interactions and functionality.

Documentation

YouTube Transcript API

MCP-compatible server for retrieving YouTube video transcripts.

Installation

# Clone repository
git clone <repository-url>
cd youtube-transcript-api

# Install dependencies
npm install

# Create .env file
cp .env.example .env

Running

# Development mode
npm run dev

# Production mode
npm start

By default, the server runs on port 3000. You can change the port by setting the PORT environment variable in the .env file.

API Endpoints

Get Video Transcript

URL: /api/youtube/transcript Method: POST Content-Type: application/json

Request Body:

{
  "url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
}

or

{
  "videoId": "dQw4w9WgXcQ"
}

Optional Parameters:

  • lang: Language code for transcript (e.g., "en", "ru", "fr")
  • generateIfNotFound: Boolean indicating whether to generate captions if not found (default: true)

Successful Response:

{
  "success": true,
  "data": {
    "videoId": "dQw4w9WgXcQ",
    "transcript": [
      {
        "text": "Never gonna give you up",
        "start": 15.5,
        "duration": 2.3
      },
      {
        "text": "Never gonna let you down",
        "start": 17.8,
        "duration": 2.1
      }
      // ...
    ],
    "generated": false
  }
}

Errors:

  • 400 Bad Request: Invalid URL or video ID
  • 404 Not Found: Video not found or no captions available (and generation disabled)
  • 500 Internal Server Error: Server error or caption generation error

Caption Generation

If captions are not found on YouTube, the server can automatically generate them using speech recognition. For this:

  1. Audio is extracted from the video using ytdl-core
  2. Audio is converted to WAV format using ffmpeg
  3. Speech is recognized using Whisper API

To disable automatic caption generation, set the generateIfNotFound parameter to false:

{
  "videoId": "dQw4w9WgXcQ",
  "generateIfNotFound": false
}

Usage Examples

cURL

curl -X POST http://localhost:3000/api/youtube/transcript \
  -H "Content-Type: application/json" \
  -d '{"url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ"}'

JavaScript (Fetch API)

fetch('http://localhost:3000/api/youtube/transcript', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    videoId: 'dQw4w9WgXcQ',
    lang: 'en', // optional
    generateIfNotFound: true // optional
  }),
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));

License

ISC

Quick Start

1

Clone the repository

git clone https://github.com/sergey-kvachenok/youtube-parser-context7
2

Install dependencies

cd youtube-parser-context7
npm install
3

Follow the documentation

Check the repository's README.md file for specific installation and usage instructions.

Repository Details

Ownersergey-kvachenok
Repoyoutube-parser-context7
LanguageTypeScript
License-
Last fetched8/10/2025

Recommended MCP Servers

💬

Discord MCP

Enable AI assistants to seamlessly interact with Discord servers, channels, and messages.

integrationsdiscordchat
🔗

Knit MCP

Connect AI agents to 200+ SaaS applications and automate workflows.

integrationsautomationsaas
🕷️

Apify MCP Server

Deploy and interact with Apify actors for web scraping and data extraction.

apifycrawlerdata
🌐

BrowserStack MCP

BrowserStack MCP Server for automated testing across multiple browsers.

testingqabrowsers

Zapier MCP

A Zapier server that provides automation capabilities for various apps.

zapierautomation