yt
Provides tools for YouTube interaction including search, transcript retrieval, metadata fetching, and local caching for AI context retrieval, enabling agents to access and analyze YouTube content without API keys or rate limits.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@ytsearch for recent TypeScript tutorials"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
yt
Agent-first YouTube CLI — search, transcripts, metadata, and a local FTS5 cache for AI context retrieval. Wraps
yt-dlpwith JSON envelopes, NDJSON streaming, and an MCP co-binary.
No YouTube Data API key. No quotas. No rate-limit ceiling on the default path.
██╗ ██╗████████╗
╚██╗ ██╔╝╚══██╔══╝
╚████╔╝ ██║
╚██╔╝ ██║
██║ ██║
╚═╝ ╚═╝Why
Existing YouTube tooling is either:
Built for humans (interactive TUIs like
ytfzf),Built for content creators (niche analysis, competitor audits),
Or locked inside MCP-only servers.
yt is built for agents — Claude Code, Cursor, Codex, Gemini CLI, and your bash scripts. One call (yt context <url>) hands an LLM everything it needs to reason about a video.
Install
# 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 linkSanity check:
yt doctorQuick start
# 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 20Piping switches output to JSON automatically (redis-cli pattern):
yt search "typescript" | jq '.data[0].url'
yt context <url> | jq '.data.transcript.full_text'Commands
Command | Description |
| YouTube search, no API key. |
| Timestamped transcript JSON. Cached. |
| Metadata: title, channel, chapters, duration. Cached. |
| Headline. One-shot info + transcript + chapters for agents. |
| FTS5 search over cached transcripts. Line-level hits with timestamps. |
| Recent videos from a channel. |
| Diagnostics: yt-dlp, cache, agent detection. |
| Regression suite — catches YouTube endpoint rot. |
| JSON schema for that command's output. |
| Stdio MCP server. Co-binary. |
Agent integration
Claude Code / Cursor / etc — MCP
// .mcp.json
{
"mcpServers": {
"yt": { "command": "yt", "args": ["mcp", "serve"] }
}
}Tools exposed 1:1 with CLI commands: search, info, transcript, context, find, channel, whoami.
Scripts / shell
# 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 5Cache
SQLite database at ~/.cache/yt/yt.db. Contents:
videos— one row per video (metadata).transcripts— one row per (video, language) pair.transcript_segments_fts— FTS5 virtual table over every transcript segment.
Override with YT_CACHE_DIR=/path/to/dir.
Every transcript / info / context call cache-checks first. Pass --refresh to force a fresh fetch.
Output shape
Default envelope (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"
}
}Use --raw for bare data. Full JSON schema via yt schema <command>.
Exit codes
0 ok · 1 generic · 2 usage · 3 validation · 4 auth · 5 rate_limit · 6 network · 7 not_found · 75 temp_fail
Environment
Var | Purpose |
| Cache directory (default: |
| Override path to the |
| Set to |
| Force JSON output |
| Reserved for future Data API extras |
| Disable ANSI |
| Force non-interactive mode |
License
MIT.
This server cannot be installed
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
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/progrmoiz/yt-cli'
If you have feedback or need assistance with the MCP directory API, please join our Discord server