YouTube Transcript MCP Server
Provides read-only tools to fetch YouTube video metadata and transcripts from local caption files or the official YouTube Data API v3, search transcripts, generate timestamped citation links, and create study outlines with permission prompts.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
YouTube Transcript MCP Server (Python, read-only)
A beginner-to-intermediate YouTube MCP server built with the official MCP Python SDK. It lets an AI assistant (Claude, Antigravity, VS Code, any MCP client) read YouTube transcripts and video metadata for study sessions and answer with citations: a timestamp and a link that jumps to the exact moment in the lecture.
It is deliberately safe for campus demos and final-year projects:
Read-only. Six tools, all marked
readOnlyHint. Nothing is posted, liked, edited or uploaded.Permission prompts. Before fetching anything for a video, the server asks the user through an MCP Elicitation form (allow, I have the right to use these captions, remember for this video). Declined or cancelled means NOT FETCHED.
No scraping, no video downloads. Data comes from caption files you have rights to, or from the official YouTube Data API v3 (
videos.list,captions.list,captions.download).Offline tests. 135 pytest tests, the network is blocked in every test, the API is mocked.
Full tutorial: https://getprojects.org/youtube-mcp-server-python/

Tools
Tool | What it returns | Asks permission? |
| title, channel, date, duration, link, APA-style reference | yes |
| segments with | yes |
| best-matching moments with quote, label, url and ready markdown citation | yes |
| time sections with keywords and a link each | yes |
| citation for a moment, no fetch | no |
| source, permission policy, recent decisions, terms note | no |
Plus a prompt template, study_notes(video, topic), that tells the model to cite every point.
video can be an 11-character ID or any normal YouTube link (watch?v=, youtu.be/, /shorts/, /embed/, /live/).
Playlists, channels and non-YouTube hosts are rejected before anything happens.
Related MCP server: mcp-youtube
Quick start (offline, 2 minutes)
git clone https://github.com/GetProjectsIdea/YouTube-Transcript-MCP-Server-Python.git
cd YouTube-Transcript-MCP-Server-Python
python -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
pip install -e ".[dev]"
youtube-transcript-mcp demo # scripted session with a simulated user
python -m pytest -q # 135 passedThe demo uses two sample lecture transcripts in samples/ (DBMS normalization and OS deadlock).
They were written for this project; their IDs (GPdemoDBMS1, GPdemoOSdl2) are placeholders, so the links do not open real videos.
Connect it to an MCP client
{
"mcpServers": {
"youtube-study": {
"command": "youtube-transcript-mcp",
"args": ["serve", "--source", "local", "--captions", "/path/to/your/captions", "--ask", "always"]
}
}
}See examples/mcp-client-config.json and examples/sample-session.md.
Sources
Local caption files (default). Put <videoId>.<lang>.vtt, <videoId>.srt or <videoId>.json
in a folder, with an optional <videoId>.meta.json (title, channel, published, duration_seconds).
Good sources: captions you exported from your own channel in YouTube Studio, a lecture your teacher
shared with you, or Creative Commons content (keep the attribution).
Official YouTube Data API v3. serve --source youtube with:
YOUTUBE_API_KEY– public metadata throughvideos.list.YOUTUBE_OAUTH_TOKEN– an OAuth access token (scopeyoutube.force-ssl) forcaptions.listandcaptions.download. YouTube only allows caption downloads for videos you own or can edit, and each download costs 200 quota units. A 403 is reported as a friendly error.
The HTTP client only ever calls www.googleapis.com with GET requests.
Permission policy
--ask always (default) asks before the first read of every video. --ask network only asks when the
source uses the internet. --ask never turns prompts off (local testing only). Ticking remember skips
the prompt for that video until the server restarts.
The prompt is filled by a resolver (Annotated[ElicitationResult[FetchPermission], Resolve(...)]), so the SDK
uses a standalone elicitation/create request on protocol 2025-11-25 and an InputRequiredResult round trip
on 2026-07-28. Both are tested.
Project structure
yt_transcript_mcp/
server.py MCP server: tools, permission resolver, prompt
consent.py FetchPermission form + ConsentPolicy (always / network / never)
sources.py LocalSource and YouTubeAPISource (official API, injected HTTP)
captions.py WebVTT / SubRip / JSON parsing, roll-up de-duplication, time helpers
citations.py VideoMeta, timestamp citations, APA-style reference
search.py keyword search with context, study outline
video_ids.py URL/ID parsing and watch links
cli.py serve | demo | cite | parse
samples/ two offline sample lectures
tests/ 135 offline pytest tests (network blocked)Responsible use
Follow the YouTube Terms of Service and the YouTube API Services Terms.
Use only transcripts you have the right to use. Do not republish full transcripts of other people's videos.
This project never downloads video or audio and does not scrape YouTube pages.
Keep API keys and OAuth tokens in environment variables, never in the repo.
License
MIT © 2026 Pardeep Patel. Made for students by GetProjects.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
YouTube transcripts, search, channel/playlist listings and upload tracking for AI agents.
YouTube for AI agents: transcripts, comments, video stats, channel monitor, Shorts captions.
Search YouTube videos, read transcripts and get public video information in your AI assistant.
Your YouTube library, in the AI tools you already use: Claude, ChatGPT, Cursor, any MCP client.
Related MCP Servers
- AlicenseAqualityDmaintenanceEnables YouTube content browsing, video searching, and metadata retrieval via the YouTube Data API v3. It also facilitates fetching video transcripts for summarization and analysis within MCP-compatible AI clients.71MIT
- FlicenseNot gradedqualityFmaintenanceGives MCP clients access to YouTube video transcripts and metadata. It lets AI agents read and summarize video content from a URL.-
- FlicenseAqualityDmaintenanceEnables AI assistants to fetch YouTube video metadata, chapters, and timestamped transcripts (including paginated and language-specific caption retrieval) so they can produce summaries, study notes, comparisons, and source-referenced answers. The returned transcript evidence also carries explicit coverage status, letting the assistant know when a transcript is partial or unavailable.4-
- AlicenseNot gradedqualityCmaintenanceEnables AI assistants and MCP clients to fetch YouTube video captions with timestamps, title, channel, and available languages, and to export transcripts as text, SRT, or WebVTT. It works with watch, Shorts, youtu.be, embed links, or bare video IDs without an API key.MIT