YouTube MCP Server
YouTube MCP 서버
YouTube 동영상과 상호작용하기 위한 모델 컨텍스트 프로토콜(MCP) 서버입니다. 이 서버는 동영상 메타데이터와 자막을 추출하고 다양한 템플릿을 사용하여 마크다운 형식으로 변환하는 도구를 제공합니다.
특징
비디오 메타데이터 : 포괄적인 비디오 정보 가져오기
캡션 추출 : 자동 생성 및 수동 캡션 지원
여러 언어 : 영어와 프랑스어에 대한 기본 지원
템플릿 시스템 : 3가지 기본 제공 마크다운 템플릿:
기본: 간단한 대본 형식
세부 정보: 타임스탬프가 포함된 전체 메타데이터
검색: 컨텍스트를 사용하여 강조 표시된 결과
검색 기능 : 비디오 자막 내에서 검색
유연한 인증 : API 키와 OAuth2 인증을 모두 지원합니다.
Related MCP server: YouTube Video Summarizer MCP Server
필수 조건
Node.js(v16 이상)
npm 또는 yarn
YouTube 데이터 API 키 및/또는 OAuth2 자격 증명
설치
저장소를 복제합니다.
지엑스피1
종속성 설치:
npm install프로젝트를 빌드하세요:
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 OAuth2MCP 구성
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 인증(비공개 비디오 액세스에 필요):
Google Cloud Console 에서 프로젝트 만들기
YouTube 데이터 API v3 활성화
OAuth2 자격 증명 생성(웹 애플리케이션 유형)
인증 스크립트를 실행합니다.
node src/get-api-key.js브라우저의 지시에 따라 애플리케이션을 승인하세요.
구성에 새로 고침 토큰을 복사하세요
템플릿 사용자 정의
src/index.ts 의 DEFAULT_TEMPLATES 배열을 수정하여 사용자 정의 템플릿을 추가할 수 있습니다. 템플릿은 다음 구조를 따릅니다.
interface MarkdownTemplate {
name: string;
description: string;
format: {
header?: string;
chapter_format?: string;
caption_block: string;
timestamp_format?: string;
search_result_format?: string;
}
}특허
MIT
기여하다
저장소를 포크하세요
기능 브랜치를 생성합니다(
git checkout -b feature/amazing-feature)변경 사항을 커밋하세요(
git commit -m 'Add some amazing feature')브랜치에 푸시(
git push origin feature/amazing-feature)풀 리퀘스트 열기
Available Tools
1 toolget_transcriptC
YouTubeの字幕をURLまたは動画IDから取得します
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | YouTube動画のURLまたはID | |
| lang | Yes | 字幕の言語コード(例: 'ja', 'en') | en |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries full burden for behavioral disclosure. It mentions retrieving transcripts but doesn't describe what happens if no transcript exists, rate limits, authentication requirements, error conditions, or the format/scope of returned data. This leaves significant behavioral gaps for a tool that interacts with external APIs.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, efficient sentence in Japanese that clearly communicates the core functionality without any wasted words. It's appropriately sized and front-loaded with the essential information.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a tool with no annotations, no output schema, and interaction with an external service (YouTube), the description is insufficient. It doesn't explain what format the transcript returns, error handling, availability constraints, or any behavioral aspects needed for reliable use by an AI agent.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the schema already fully documents both parameters (url and lang with their descriptions and default). The description adds no additional parameter semantics beyond what's in the schema, maintaining the baseline score for high schema coverage.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action ('取得します' - get/retrieve) and resource ('YouTubeの字幕' - YouTube subtitles/transcripts) with the input source specified ('URLまたは動画IDから' - from URL or video ID). It's specific about what the tool does, though it doesn't need to distinguish from siblings since there are none.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives, prerequisites, or limitations. It simply states what the tool does without context about appropriate use cases or constraints.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
1 tool update
- First observed
get_transcript
TDQS
Scored across 1 tool
With only one tool, there is no possibility of ambiguity or overlap between tools. The single tool has a clear and distinct purpose focused on retrieving transcripts from YouTube.
A single tool inherently has perfect naming consistency as there are no other tools to compare it against. The tool name 'get_transcript' follows a clear verb_noun pattern.
One tool is too few for a server named 'YouTube MCP Server', which suggests a broader scope. A single transcript retrieval tool feels incomplete for typical YouTube operations like searching videos, listing playlists, or managing uploads.
The tool surface is severely incomplete for a YouTube server. It only covers transcript retrieval, with no tools for core YouTube functionalities such as video search, metadata retrieval, playlist management, or user interactions, leaving significant gaps.
Maintenance
Related MCP Connectors
Transcripts of YouTube videos, playlists and channels with timestamps; SRT or WebVTT too.
Fetch transcripts, subtitles, chapters, metadata and frames from YouTube and 10+ video platforms
YouTube transcripts, search, channel browsing, and playlists for AI agents via MCP.
Search YouTube, read video metadata, and fetch transcripts with language preferences
Related MCP Servers
- AlicenseBqualityCmaintenanceEnables extraction of transcripts, keyword-based video search with metadata retrieval, and channel information discovery from YouTube videos through natural language interaction.34MIT
- AlicenseBqualityDmaintenanceEnables AI assistants to analyze and summarize YouTube videos by extracting captions, subtitles, and comprehensive metadata including title, description, and duration in multiple languages.127 npm62MIT
- AlicenseNot gradedqualityDmaintenanceExtracts captions, metadata, and descriptions from YouTube videos to enable AI assistants to summarize their content.6 npmMIT
- FlicenseNot gradedqualityDmaintenanceEnables LLMs to interact with YouTube videos by fetching transcripts, summarizing content, and answering questions based on video context.-