Skip to main content
Glama

YouTube MCP Server

by nattyraz

YouTube MCP 서버

YouTube 동영상과 상호작용하기 위한 모델 컨텍스트 프로토콜(MCP) 서버입니다. 이 서버는 동영상 메타데이터와 자막을 추출하고 다양한 템플릿을 사용하여 마크다운 형식으로 변환하는 도구를 제공합니다.

특징

  • 비디오 메타데이터 : 포괄적인 비디오 정보 가져오기
  • 캡션 추출 : 자동 생성 및 수동 캡션 지원
  • 여러 언어 : 영어와 프랑스어에 대한 기본 지원
  • 템플릿 시스템 : 3가지 기본 제공 마크다운 템플릿:
    • 기본: 간단한 대본 형식
    • 세부 정보: 타임스탬프가 포함된 전체 메타데이터
    • 검색: 컨텍스트를 사용하여 강조 표시된 결과
  • 검색 기능 : 비디오 자막 내에서 검색
  • 유연한 인증 : API 키와 OAuth2 인증을 모두 지원합니다.

필수 조건

  • Node.js(v16 이상)
  • npm 또는 yarn
  • YouTube 데이터 API 키 및/또는 OAuth2 자격 증명

설치

  1. 저장소를 복제합니다.

지엑스피1

  1. 종속성 설치:
npm install
  1. 프로젝트를 빌드하세요:
npm run build

구성

YouTube 자격 증명을 사용하여 루트 디렉토리에 .env 파일을 만듭니다.

YOUTUBE_API_KEY=your_api_key YOUTUBE_CLIENT_ID=your_client_id YOUTUBE_CLIENT_SECRET=your_client_secret YOUTUBE_REFRESH_TOKEN=your_refresh_token # Optional, for OAuth2

MCP 구성

MCP 설정 파일(일반적으로 ~/.config/Code/User/globalStorage/rooveterinaryinc.roo-cline/settings/cline_mcp_settings.json )에 서버를 추가합니다.

{ "mcpServers": { "youtube": { "command": "node", "args": ["path/to/youtube-mcp/build/index.js"], "env": { "YOUTUBE_API_KEY": "your_api_key", "YOUTUBE_CLIENT_ID": "your_client_id", "YOUTUBE_CLIENT_SECRET": "your_client_secret" }, "disabled": false, "alwaysAllow": [] } } }

용법

서버는 다음과 같은 도구를 제공합니다.

1. 비디오 정보 얻기

use_mcp_tool youtube get_video_info { "url": "https://www.youtube.com/watch?v=VIDEO_ID" }

2. 캡션 받기

use_mcp_tool youtube get_captions { "url": "https://www.youtube.com/watch?v=VIDEO_ID", "language": "en" // Optional, defaults to "en" }

3. 마크다운으로 변환

use_mcp_tool youtube convert_to_markdown { "url": "https://www.youtube.com/watch?v=VIDEO_ID", "template_name": "detailed", // Optional, "basic", "detailed", or "search" "language": "en", // Optional "options": { // Optional "include_chapters": true, "search_term": "keyword" // Only for search template } }

4. 목록 템플릿

use_mcp_tool youtube list_templates

종속성

{ "dependencies": { "@modelcontextprotocol/sdk": "latest", "googleapis": "^146.0.0", "google-auth-library": "^9.0.0", "youtube-captions-scraper": "^2.0.0", "express": "^4.18.2", "open": "^9.1.0" }, "devDependencies": { "@types/node": "^20.0.0", "typescript": "^5.0.0", "tsx": "^4.0.0" } }

OAuth2 설정

OAuth2 인증(비공개 비디오 액세스에 필요):

  1. Google Cloud Console 에서 프로젝트 만들기
  2. YouTube 데이터 API v3 활성화
  3. OAuth2 자격 증명 생성(웹 애플리케이션 유형)
  4. 인증 스크립트를 실행합니다.
node src/get-api-key.js
  1. 브라우저의 지시에 따라 애플리케이션을 승인하세요.
  2. 구성에 새로 고침 토큰을 복사하세요

템플릿 사용자 정의

src/index.tsDEFAULT_TEMPLATES 배열을 수정하여 사용자 정의 템플릿을 추가할 수 있습니다. 템플릿은 다음 구조를 따릅니다.

interface MarkdownTemplate { name: string; description: string; format: { header?: string; chapter_format?: string; caption_block: string; timestamp_format?: string; search_result_format?: string; } }

특허

MIT

기여하다

  1. 저장소를 포크하세요
  2. 기능 브랜치를 생성합니다( git checkout -b feature/amazing-feature )
  3. 변경 사항을 커밋하세요( git commit -m 'Add some amazing feature' )
  4. 브랜치에 푸시( git push origin feature/amazing-feature )
  5. 풀 리퀘스트 열기
-
security - not tested
-
license - not tested
-
quality - not tested

remote-capable server

The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.

다양한 템플릿을 사용하여 메타데이터와 여러 언어의 자막을 추출하고 콘텐츠를 마크다운으로 변환하여 YouTube 비디오와의 상호작용을 가능하게 합니다.

  1. 특징
    1. 필수 조건
      1. 설치
        1. 구성
          1. MCP 구성
            1. 용법
              1. 비디오 정보 얻기
              2. 캡션 받기
              3. 마크다운으로 변환
              4. 목록 템플릿
            2. 종속성
              1. OAuth2 설정
                1. 템플릿 사용자 정의
                  1. 특허
                    1. 기여하다

                      Related MCP Servers

                      • A
                        security
                        F
                        license
                        A
                        quality
                        This server allows AI language models to interact with YouTube content through a standardized interface, providing features such as video and channel information retrieval, transcript management, and playlist operations.
                        Last updated -
                        7
                        182
                        205
                        TypeScript
                        • Linux
                        • Apple
                      • A
                        security
                        F
                        license
                        A
                        quality
                        An MCP server that enables users to generate summaries of YouTube videos in multiple languages and formats through integration with DeepSRT's API.
                        Last updated -
                        1
                        33
                        JavaScript
                        • Apple
                      • -
                        security
                        F
                        license
                        -
                        quality
                        Enables extraction of transcript text from YouTube videos by providing the video URL, supporting standard, shortened, and embed URL formats.
                        Last updated -
                        1
                        JavaScript
                      • -
                        security
                        A
                        license
                        -
                        quality
                        A Model Context Protocol server that enables retrieval of transcripts from YouTube videos with language-specific support.
                        Last updated -
                        526
                        MIT License

                      View all related MCP servers

                      MCP directory API

                      We provide all the information about MCP servers via our MCP API.

                      curl -X GET 'https://glama.ai/api/mcp/v1/servers/nattyraz/youtube-mcp'

                      If you have feedback or need assistance with the MCP directory API, please join our Discord server