mcp-youtube-subtitles-extractor

mcp-youtube-subtitles-extractor

3.4

This is an MCP server that extracts subtitles from a given YouTube link.

The MCP Server: YouTube Subtitles Extractor is a specialized server designed to extract subtitles from YouTube videos using the Model Context Protocol (MCP). It leverages Azure Functions to run both locally and remotely, providing a flexible and scalable solution for subtitle extraction. The server is built using .NET 9 SDK and integrates with various tools such as Visual Studio Code, Azure CLI, and Docker Desktop to facilitate development and deployment. Users can connect the MCP server to an MCP host or client using different modes, including VS Code Agent Mode and MCP Inspector, to interact with the server and extract subtitles in various languages. The server supports both local and remote deployments, making it suitable for different use cases and environments.

Features

  • Subtitle Extraction: Extracts subtitles from YouTube videos in multiple languages.
  • Azure Functions Integration: Supports both local and remote deployment using Azure Functions.
  • Flexible Connectivity: Connects to MCP host/client using VS Code or MCP Inspector.
  • Multi-language Support: Allows users to choose subtitle languages like 'en' or 'ko'.
  • Scalable Deployment: Utilizes Azure CLI and Docker for scalable and efficient deployment.

Usage with Different Platforms

Run Azure Functions MCP server locally

bash
# bash/zsh
REPOSITORY_ROOT=$(git rev-parse --show-toplevel)


powershell
# PowerShell
$REPOSITORY_ROOT = git rev-parse --show-toplevel


bash
cd $REPOSITORY_ROOT/src/McpYouTubeSubtitlesExtractor.FunctionApp
func start

Run Azure Functions MCP server remotely

bash
# Login with Azure CLI
az login

# Login with Azure Developer CLI
azd auth login


bash
azd up


bash
azd env get-value AZURE_FUNCTION_NAME


bash
# bash/zsh
az functionapp keys list \
    -g rg-$(azd env get-value AZURE_ENV_NAME) \
    -n $(azd env get-value AZURE_FUNCTION_NAME) \
    --query "systemKeys.mcp_extension" -o tsv


bash
# PowerShell
az functionapp keys list `
    -g rg-$(azd env get-value AZURE_ENV_NAME) `
    -n $(azd env get-value AZURE_FUNCTION_NAME) `
    --query "systemKeys.mcp_extension" -o tsv

Connect MCP server to an MCP host/client

text
Summarise this YouTube video link in 5 bullet points: https://youtu.be/XwnEtZxaokg?si=V39ta45iMni_Uc_m

MCP Inspector + Local MCP server

bash
npx @modelcontextprotocol/inspector node build/index.js


text
http://0.0.0.0:7071/runtime/webhooks/mcp/sse

MCP Inspector + Remote MCP server

bash
npx @modelcontextprotocol/inspector node build/index.js


text
https://<functionapp-name>.azurewebsites.net/runtime/webhooks/mcp/sse?code=<functions-mcp-extension-system-key>