yt
yt
에이전트 우선 YouTube CLI — 검색, 자막, 메타데이터, 그리고 AI 컨텍스트 검색을 위한 로컬 FTS5 캐시를 제공합니다.
yt-dlp를 JSON 엔벨로프, NDJSON 스트리밍 및 MCP 코바이너리(co-binary)로 래핑합니다.
YouTube Data API 키가 필요 없습니다. 할당량도 없습니다. 기본 경로에서 속도 제한 상한선도 없습니다.
██╗ ██╗████████╗
╚██╗ ██╔╝╚══██╔══╝
╚████╔╝ ██║
╚██╔╝ ██║
██║ ██║
╚═╝ ╚═╝왜 사용하는가
기존의 YouTube 도구들은 다음과 같은 한계가 있습니다:
인간을 위해 제작됨 (
ytfzf와 같은 대화형 TUI),콘텐츠 제작자를 위해 제작됨 (틈새 분석, 경쟁사 감사),
또는 MCP 전용 서버 내에 갇혀 있음.
yt는 에이전트를 위해 제작되었습니다 — Claude Code, Cursor, Codex, Gemini CLI 및 bash 스크립트용입니다. 단 한 번의 호출(yt context <url>)로 LLM이 동영상을 추론하는 데 필요한 모든 정보를 제공합니다.
설치
# Requires yt-dlp on PATH
brew install yt-dlp
# From source
git clone https://github.com/progrmoiz/yt-cli
cd yt-cli
npm install && npm run build && npm link정상 작동 확인:
yt doctor빠른 시작
# Search
yt search "rust async" --limit 5
# Grok a single video (the 80% agent use case)
yt context https://www.youtube.com/watch?v=dQw4w9WgXcQ
# Fetch transcript
yt transcript https://www.youtube.com/watch?v=dQw4w9WgXcQ --text
# Query everything you've cached
yt find "borrow checker"
# List a channel's recent videos
yt channel @ThePrimeTimeagen --limit 20파이핑(Piping)은 출력을 자동으로 JSON으로 전환합니다 (redis-cli 패턴):
yt search "typescript" | jq '.data[0].url'
yt context <url> | jq '.data.transcript.full_text'명령어
명령어 | 설명 |
| API 키 없이 YouTube 검색. |
| 타임스탬프가 포함된 자막 JSON. 캐시됨. |
| 메타데이터: 제목, 채널, 챕터, 재생 시간. 캐시됨. |
| 핵심 기능. 에이전트를 위한 정보 + 자막 + 챕터 통합 제공. |
| 캐시된 자막에 대한 FTS5 검색. 타임스탬프가 포함된 라인 단위 결과. |
| 채널의 최근 동영상. |
| 진단: yt-dlp, 캐시, 에이전트 감지. |
| 회귀 테스트 모음 — YouTube 엔드포인트 변경 사항 감지. |
| 해당 명령어 출력에 대한 JSON 스키마. |
| Stdio MCP 서버. 코바이너리. |
에이전트 통합
Claude Code / Cursor / 등 — MCP
// .mcp.json
{
"mcpServers": {
"yt": { "command": "yt", "args": ["mcp", "serve"] }
}
}CLI 명령어와 1:1로 노출되는 도구: search, info, transcript, context, find, channel, whoami.
스크립트 / 쉘
# Ingest the top 10 search hits into the local cache
yt search "machine learning ops" --limit 10 --json \
| jq -r '.data[].url' \
| xargs -I{} yt transcript {} --json >/dev/null
# Then query across all of them
yt find "feature store" --limit 5캐시
~/.cache/yt/yt.db에 위치한 SQLite 데이터베이스입니다. 포함 내용:
videos— 동영상당 한 행 (메타데이터).transcripts— (동영상, 언어) 쌍당 한 행.transcript_segments_fts— 모든 자막 세그먼트에 대한 FTS5 가상 테이블.
YT_CACHE_DIR=/path/to/dir로 재정의할 수 있습니다.
모든 transcript / info / context 호출은 먼저 캐시를 확인합니다. 강제로 새로 가져오려면 --refresh를 전달하세요.
출력 형태
기본 엔벨로프 (v2):
{
"version": "2",
"status": "success",
"command": "context",
"cli": { "name": "yt", "version": "0.1.0" },
"data": { /* command payload */ },
"metadata": {
"elapsed_ms": 1200,
"cached": true,
"has_transcript": true,
"agent": "CLAUDECODE"
}
}순수 데이터를 보려면 --raw를 사용하세요. 전체 JSON 스키마는 yt schema <command>를 통해 확인할 수 있습니다.
종료 코드
0 성공 · 1 일반 오류 · 2 사용법 오류 · 3 유효성 검사 오류 · 4 인증 오류 · 5 속도 제한 · 6 네트워크 오류 · 7 찾을 수 없음 · 75 일시적 실패
환경 변수
변수 | 목적 |
| 캐시 디렉토리 (기본값: |
|
|
| RATE_LIMIT/NETWORK/TIMEOUT 발생 시 자동 재시도 1회를 비활성화하려면 |
| JSON 출력 강제 |
| 향후 Data API 추가 기능을 위해 예약됨 |
| ANSI 색상 비활성화 |
| 비대화형 모드 강제 |
라이선스
MIT.
Related MCP Connectors
YouTube transcripts, search, channel browsing, and playlists for AI agents via MCP.
An MCP server that gives any LLM or agent clean YouTube transcripts on demand: a single video, a whole channel, or a playlist, plus AI cleanup of auto-generated captions. API-key auth, credit-based, same backend as the public v1 API. Get a free API key with 25 free credits at youtubetranscriptdownload.com/account.
YouTube transcripts, search, channel/playlist listings and upload tracking for AI agents.
Your agent needs to find video — which channels own a topic, which videos rank for a phrase, what exists in a given country and language. **What you can ask for** • "Which videos rank for 'rag pipeline tutorial' in the US this month?" • "Find channels publishing about MCP, sorted by relevance." • "What playlists cover this subject in Japanese?" • "Search videos uploaded this week only." **How to use it** Point any MCP client at https://mcp.aisa.one/youtube-search/mcp and sign in with OAuth — there is no key to create or paste. One search tool covering videos, channels and playlists, narrowed by country, language, upload date, duration and sort order. **It is also a door to the rest** The same login reaches 26 sources and 580+ operations. Find the video here, then ask the same agent what the channel's site traffic is or what the same phrase does in Google — without adding a second server. **What it costs** Finding and inspecting an operation is free. Running one is billed per call at API prices, with no seat and no monthly minimum, and every call takes max_price_usd so an agent cannot overspend by accident. **Where else it reaches** https://mcp.aisa.one/social/mcp for X plus Instagram, Reddit, Pinterest and YouTube; https://mcp.aisa.one/gtm/mcp for those plus Similarweb and Apollo.