Skip to content
This repository was archived by the owner on Apr 15, 2025. It is now read-only.

aliencube/mcp-youtube-subtitles-extractor

Repository files navigation

MCP Server: Youtube Subtitles Extractor

👉👉👉 MOVED TO https://github.com/microsoft/mcp-dotnet-samples 👈👈👈

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

Prerequisites

Getting Started

Run Azure Functions MCP server locally

  1. Get the repository root

    # bash/zsh
    REPOSITORY_ROOT=$(git rev-parse --show-toplevel)
    # PowerShell
    $REPOSITORY_ROOT = git rev-parse --show-toplevel
  2. Run the function app

    cd $REPOSITORY_ROOT/src/McpYouTubeSubtitlesExtractor.FunctionApp
    func start

Run Azure Functions MCP server remotely

  1. Login to Azure

    # Login with Azure CLI
    az login
    
    # Login with Azure Developer CLI
    azd auth login
  2. Deploy the Function app to Azure

    azd up

    While provisioning and deploying, you'll be asked to provide subscription ID, location, environment name and vNet

  3. After the deployment is complete, get the information by running the following commands:

    • function app name:

      azd env get-value AZURE_FUNCTION_NAME
    • MCP server access key:

      # 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
      # 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

VS Code + Agent Mode + Local MCP server

  1. Open Command Palette by typing F1 or Ctrl+Shift+P on Windows or Cmd+Shift+P on Mac OS, and search MCP: List Servers.

  2. Choose mcp-youtube-subtitles-extractor-function-local then click Start Server.

  3. Enter prompt like:

    Summarise this YouTube video link in 5 bullet points: https://youtu.be/XwnEtZxaokg?si=V39ta45iMni_Uc_m
    
  4. It will ask you to run get_available_languages followed by get_subtitle. You might be asked to choose language for the subtitle.

  5. Confirm the summary of the video.

MCP Inspector + Local MCP server

  1. Run MCP Inspector

    npx @modelcontextprotocol/inspector node build/index.js
  2. Open a web browser and navigate to the MCP Inspector web app from the URL displayed by the app (e.g. http://0.0.0.0:5173)

  3. Set the transport type to SSE

  4. Set the URL to your running Function app's SSE endpoint and Connect:

    http://0.0.0.0:7071/runtime/webhooks/mcp/sse
    
  5. Click List Tools.

  6. Click on a tool and Run Tool with a YouTube link and language code like en or ko.

VS Code + Agent Mode + Remote MCP server

  1. Open Command Palette by typing F1 or Ctrl+Shift+P on Windows or Cmd+Shift+P on Mac OS, and search MCP: List Servers.

  2. Choose mcp-youtube-subtitles-extractor-function-remote then click Start Server.

  3. Enter the function app name.

  4. Enter the MCP server access key.

  5. Enter prompt like:

    Summarise this YouTube video link in 5 bullet points: https://youtu.be/XwnEtZxaokg?si=V39ta45iMni_Uc_m
    
  6. It will ask you to run get_available_languages followed by get_subtitle. You might be asked to choose language for the subtitle.

  7. Confirm the summary of the video.

MCP Inspector + Remote MCP server

  1. Run MCP Inspector

    npx @modelcontextprotocol/inspector node build/index.js
  2. Open a web browser and navigate to the MCP Inspector web app from the URL displayed by the app (e.g. http://0.0.0.0:5173)

  3. Set the transport type to SSE

  4. Set the URL to your running Function app's SSE endpoint and Connect:

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

  6. Click on a tool and Run Tool with a YouTube link and language code like en or ko.

About

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

Topics

Resources

License

Stars

Watchers

Forks