youtube-mcp
Provides tools to fetch YouTube video transcripts (plain text or with timestamps), download transcripts as markdown, retrieve video metadata, search within captions, and download video or audio files.
Click on "Deploy 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., "@youtube-mcpget transcript for https://youtu.be/dQw4w9WgXcQ"
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.
YouTube MCP server and CLI
Zero Setup · No API Key · No Account · Open Source
YouTube is full of knowledge, but it is trapped there. AI agents cannot access it natively. This repo ships two packages that fix that: an MCP server for AI agents and a CLI for the terminal.
Fetch transcript (plain text or with timestamps)
Download transcript as
.mdGet video metadata
Search within captions
Download video or audio
Available as:
All locally. No API keys required.
Table of Contents
Related MCP server: YouTube for AI Agents
MCP Server
Tools
Tool | Description |
| Fetches the full transcript as plain text |
| Transcript with |
| Saves transcript as a |
| Saves transcript as a |
| Returns title, channel, publish date, view count, duration, likes, and description |
| Searches for a keyword or phrase and returns matching segments with timestamps |
| Downloads video+audio as |
| Downloads audio as |
download_video and download_audio are fully self-contained. yt-dlp and ffmpeg are downloaded automatically on npm install.
Installation
Method A: let your AI do it
Tell your AI agent:
Add youtube-mcp as an MCP server. Run it with: npx @umbertotancorre/youtube-mcpMethod B: manual config
Add this to your MCP client config (e.g. claude_desktop_config.json):
{
"mcpServers": {
"youtube": {
"command": "npx",
"args": ["-y", "@umbertotancorre/youtube-mcp"]
}
}
}All tools appear automatically. No install needed, npx handles it on first run.
CLI
Commands
youtube-cli transcript <url> Print transcript as plain text
youtube-cli transcript <url> --timestamps Include [MM:SS] timestamps
youtube-cli transcript <url> --save Save as .md to Downloads
youtube-cli transcript <url> --language it Fetch in a specific language
youtube-cli search <url> <query> Search transcript with timestamps
youtube-cli metadata <url> Print title, channel, views, duration
youtube-cli metadata <url> --json Output as JSON
youtube-cli download <url> Download video to Downloads
youtube-cli download <url> --quality hd1080 Choose quality
youtube-cli download <url> --audio Download audio only (mp3)
youtube-cli download <url> --audio --format flac
youtube-cli completions Print bash completion script
youtube-cli completions zsh Print zsh completion scriptDownloads always go to the platform-native Downloads folder:
OS | Path |
macOS |
|
Linux |
|
Windows |
|
Installation
Global install (recommended):
npm install -g @umbertotancorre/youtube-cli
youtube-cli --helpOne-off use without installing:
npx @umbertotancorre/youtube-cli transcript dQw4w9WgXcQShell completions (optional):
# bash
source <(youtube-cli completions)
# zsh
youtube-cli completions zsh > ~/.zsh/completions/_youtube-cliDevelopment
This is an npm workspaces monorepo with three packages:
youtube-mcp-cli/
packages/
core/ # shared logic (transcripts, metadata, downloads)
mcp/ # MCP server (@umbertotancorre/youtube-mcp)
cli/ # CLI tool (@umbertotancorre/youtube-cli)npm run build # build all packages (core, mcp, cli in order)
npm run dev:mcp # build core, then run MCP server via ts-node
npm run dev:cli # build core, then run CLI via ts-nodeDisclaimer
This project only accesses publicly available YouTube data: the same captions, metadata, and streams visible in any browser. It does not bypass authentication, paywalls, or age gates. No API key, account, or login is required.
End users are responsible for complying with YouTube's Terms of Service. The maintainer does not host or operate any service. This is a local tool you run on your own machine.
License
youtube-mcp-cli is fully open source, licensed under the MIT License.
This server cannot be deployed
Maintenance
Related MCP Connectors
YouTube transcripts, search, channel/playlist listings and upload tracking for AI agents.
YouTube transcripts, search, channel browsing, and playlists for AI agents via MCP.
YouTube transcripts, search, channels, playlists and bulk transcript jobs for AI agents. 14 tools.
YouTube data for AI agents: channels, videos, transcripts, comments, search. Video research.
Related MCP Servers
- AlicenseAqualityDmaintenanceEnables AI tools to access YouTube content, including transcript extraction, video/channel info, and search.413 npmMIT
- AlicenseAqualityDmaintenanceEnables AI agents to search, watch, summarize, clip, and extract transcripts from YouTube videos, all without needing an API key or leaving the chat.919 npm52Apache 2.0
- AlicenseAqualityBmaintenanceEnables AI assistants to search YouTube, fetch transcripts, and get AI summaries of videos without API keys.354 npmMIT
- AlicenseAqualityAmaintenanceAllows AI agents to fetch, search, and summarize YouTube video transcripts without an API key, including chapter summaries.4MIT