{"_id":"@coyasong/youtube-mcp-server","_rev":"4-7ba6aa8a1e87e7e99b155fe2affdabf5","name":"@coyasong/youtube-mcp-server","dist-tags":{"latest":"1.2.0"},"versions":{"1.0.0":{"name":"@coyasong/youtube-mcp-server","version":"1.0.0","keywords":[],"author":{"name":"coyaSONG"},"license":"ISC","_id":"@coyasong/youtube-mcp-server@1.0.0","maintainers":[{"name":"coyasong","email":"qawsy12@gmail.com"}],"homepage":"https://github.com/coyaSONG/youtube-mcp-server#readme","bugs":{"url":"https://github.com/coyaSONG/youtube-mcp-server/issues"},"bin":{"youtube-mcp-server":"dist/index.js"},"dist":{"shasum":"5b3397992792c028847d96f8020722956112c97c","tarball":"https://registry.npmjs.org/@coyasong/youtube-mcp-server/-/youtube-mcp-server-1.0.0.tgz","fileCount":14,"integrity":"sha512-rl31dJm0BlSwW6dZeOom05dxcVdipn3J/iVsYmfBUe5YCUMz0NMLb25/8w1Fh5JkGg5l0ca6IL7h5DhCOMVQUA==","signatures":[{"sig":"MEUCIA71uqTNZe4Hhoe60TUVs1VPN2raKQCyitaQ1NlWPvgpAiEAn7TyjOgCOGentbCJxhq63Txvw5bC3GcUhGUahgzlQUg=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":49900},"main":"dist/index.js","type":"module","types":"./dist/index.d.ts","gitHead":"0e7d6f85dd78d32d17fc7974a29dbcba662338a3","scripts":{"dev":"node --loader ts-node/esm src/index.ts","build":"tsc","clean":"rm -rf dist","start":"node dist/index.js","prebuild":"rm -rf dist && mkdir -p dist"},"_npmUser":{"name":"coyasong","email":"qawsy12@gmail.com"},"repository":{"url":"git+https://github.com/coyaSONG/youtube-mcp-server.git","type":"git"},"_npmVersion":"10.9.2","description":"[![smithery badge](https://smithery.ai/badge/@coyaSONG/youtube-mcp-server)](https://smithery.ai/server/@coyaSONG/youtube-mcp-server)","directories":{},"_nodeVersion":"23.6.0","dependencies":{"zod":"^3.24.2","dotenv":"^16.4.7","googleapis":"^148.0.0","youtube-captions-scraper":"^2.0.3","@modelcontextprotocol/sdk":"^1.8.0"},"_hasShrinkwrap":false,"devDependencies":{"ts-node":"^10.9.2","typescript":"^5.8.2","@types/node":"^22.13.14"},"_npmOperationalInternal":{"tmp":"tmp/youtube-mcp-server_1.0.0_1743594952975_0.5673506140227573","host":"s3://npm-registry-packages-npm-production"}},"1.1.0":{"name":"@coyasong/youtube-mcp-server","version":"1.1.0","keywords":["mcp","model-context-protocol","youtube","transcript","research","citations","ai-agents"],"author":{"name":"coyaSONG"},"license":"MIT","_id":"@coyasong/youtube-mcp-server@1.1.0","maintainers":[{"name":"coyasong","email":"qawsy12@gmail.com"}],"homepage":"https://github.com/coyaSONG/youtube-mcp-server#readme","bugs":{"url":"https://github.com/coyaSONG/youtube-mcp-server/issues"},"bin":{"youtube-mcp-http":"dist/http-server.js","youtube-mcp-server":"dist/stdio-server.js"},"dist":{"shasum":"da309948b9976d68a101f26786985ed27f2eb627","tarball":"https://registry.npmjs.org/@coyasong/youtube-mcp-server/-/youtube-mcp-server-1.1.0.tgz","fileCount":31,"integrity":"sha512-QNrvogL4+gaDkbrx3xe+UZ53svVANyvkhrQrdkknKbIZgSgfhEK0cuJcDIOD6LFdT68VrkYahGkm4Z92xubFWw==","signatures":[{"sig":"MEUCID7M1/pjsIPPsRNZi2rLasVEyg2M+HB1+lkDq8wPPQoiAiEAyAJcszAD9Fk5k4nK6CJL6292HWMXV7OOVIgWl0ySgOc=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":171998},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","engines":{"node":">=20"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"ee43273113fc99e078ad955cc8c5d9b8d27aa374","mcpName":"io.github.coyasong/youtube-research","scripts":{"dev":"npm run dev:http","test":"npm run build && node --test tests/*.test.mjs","build":"npm run build:tsc","clean":"rm -rf dist","start":"npm run start:http","prepack":"npm run build","dev:http":"node --loader ts-node/esm src/http-server.ts","prebuild":"rm -rf dist && mkdir -p dist","build:tsc":"tsc","test:live":"npm run build && node scripts/live-smoke.mjs","start:http":"node dist/http-server.js","prepublishOnly":"npm test"},"_npmUser":{"name":"coyasong","email":"qawsy12@gmail.com","approver":{"name":"coyasong","email":"qawsy12@gmail.com"}},"repository":{"url":"git+https://github.com/coyaSONG/youtube-mcp-server.git","type":"git"},"_npmVersion":"11.17.0","description":"Citation-ready YouTube transcripts, comments, and channel intelligence for AI agents over MCP","directories":{},"sideEffects":false,"_nodeVersion":"26.4.0","dependencies":{"zod":"^4.4.3","cors":"^2.8.5","dotenv":"^16.6.1","express":"^5.2.1","googleapis":"^173.0.0","node-cache":"^5.1.2","youtubei.js":"^17.2.0","@modelcontextprotocol/sdk":"^1.29.0"},"_hasShrinkwrap":false,"devDependencies":{"ts-node":"^10.9.2","typescript":"^7.0.2","@types/cors":"^2.8.19","@types/node":"^26.1.1","@types/express":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/youtube-mcp-server_1.1.0_1783778419007_0.7093656014097645","host":"s3://npm-registry-packages-npm-production"}},"1.1.1":{"name":"@coyasong/youtube-mcp-server","version":"1.1.1","keywords":["mcp","model-context-protocol","youtube","transcript","research","citations","ai-agents"],"author":{"name":"coyaSONG"},"license":"MIT","_id":"@coyasong/youtube-mcp-server@1.1.1","maintainers":[{"name":"coyasong","email":"qawsy12@gmail.com"}],"homepage":"https://github.com/coyaSONG/youtube-mcp-server#readme","bugs":{"url":"https://github.com/coyaSONG/youtube-mcp-server/issues"},"bin":{"youtube-mcp-http":"dist/http-server.js","youtube-mcp-server":"dist/stdio-server.js"},"dist":{"shasum":"0be1d2a0cff4bfdb248c0b34b6c04062f7860de8","tarball":"https://registry.npmjs.org/@coyasong/youtube-mcp-server/-/youtube-mcp-server-1.1.1.tgz","fileCount":31,"integrity":"sha512-9v0lddJV9FQfnfouDJgWM6CVum0x/vIKjb5vM7pqgyNfgP7Pv3vKBevhutAzCtG3rzPvIvzTBFdqL+2qAUYt0A==","signatures":[{"sig":"MEUCIGMA7helcA9SxZa+/iNPlPNkwk9bq9n+XiocNNsQq6BJAiEA3u3CiZ/z29JUiiK260TF0LYhcb10Tr4k49cUHgmhN2c=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":172130},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","engines":{"node":">=20"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"b3ea1338186f83850b1201f81017eee3ccd7da9f","mcpName":"io.github.coyaSONG/youtube-research","scripts":{"dev":"npm run dev:http","test":"npm run build && node --test tests/*.test.mjs","build":"npm run build:tsc","clean":"rm -rf dist","start":"npm run start:http","prepack":"npm run build","dev:http":"node --loader ts-node/esm src/http-server.ts","prebuild":"rm -rf dist && mkdir -p dist","build:tsc":"tsc","test:live":"npm run build && node scripts/live-smoke.mjs","start:http":"node dist/http-server.js","prepublishOnly":"npm test"},"_npmUser":{"name":"coyasong","email":"qawsy12@gmail.com","approver":{"name":"coyasong","email":"qawsy12@gmail.com"}},"repository":{"url":"git+https://github.com/coyaSONG/youtube-mcp-server.git","type":"git"},"_npmVersion":"11.17.0","description":"Citation-ready YouTube transcripts, comments, and channel intelligence for AI agents over MCP","directories":{},"sideEffects":false,"_nodeVersion":"26.4.0","dependencies":{"zod":"^4.4.3","cors":"^2.8.5","dotenv":"^16.6.1","express":"^5.2.1","googleapis":"^173.0.0","node-cache":"^5.1.2","youtubei.js":"^17.2.0","@modelcontextprotocol/sdk":"^1.29.0"},"_hasShrinkwrap":false,"devDependencies":{"ts-node":"^10.9.2","typescript":"^7.0.2","@types/cors":"^2.8.19","@types/node":"^26.1.1","@types/express":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/youtube-mcp-server_1.1.1_1783779038891_0.22351869181971584","host":"s3://npm-registry-packages-npm-production"}},"1.2.0":{"name":"@coyasong/youtube-mcp-server","version":"1.2.0","main":"dist/index.js","types":"dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"sideEffects":false,"type":"module","bin":{"youtube-mcp-server":"dist/stdio-server.js","youtube-mcp-http":"dist/http-server.js"},"mcpName":"io.github.coyaSONG/youtube-research","scripts":{"clean":"rm -rf dist","prebuild":"rm -rf dist && mkdir -p dist","build":"npm run build:tsc","build:tsc":"tsc","prepare:mcpb":"npm run build && node scripts/prepare-mcpb.mjs","build:mcpb":"npm run prepare:mcpb && mcpb pack .mcpb-stage artifacts/youtube-research-mcp.mcpb","test:mcpb":"npm run build:mcpb && node scripts/mcpb-smoke.mjs","prepack":"npm run build","prepublishOnly":"npm test","test":"npm run build && node --test tests/*.test.mjs","test:live":"npm run build && node scripts/live-smoke.mjs","test:user":"node scripts/virtual-user-smoke.mjs","start":"npm run start:http","start:http":"node dist/http-server.js","dev":"npm run dev:http","dev:http":"node --loader ts-node/esm src/http-server.ts"},"repository":{"type":"git","url":"git+https://github.com/coyaSONG/youtube-mcp-server.git"},"keywords":["mcp","model-context-protocol","youtube","transcript","research","citations","ai-agents"],"author":{"name":"coyaSONG"},"license":"MIT","bugs":{"url":"https://github.com/coyaSONG/youtube-mcp-server/issues"},"homepage":"https://github.com/coyaSONG/youtube-mcp-server#readme","description":"Citation-ready YouTube transcripts, comments, and channel intelligence for AI agents over MCP","engines":{"node":">=20"},"dependencies":{"@modelcontextprotocol/sdk":"^1.29.0","cors":"^2.8.5","dotenv":"^17.4.2","express":"^5.2.1","googleapis":"^173.0.0","node-cache":"^5.1.2","youtubei.js":"^17.2.0","zod":"^4.4.3"},"devDependencies":{"@anthropic-ai/mcpb":"2.1.2","@types/cors":"^2.8.19","@types/express":"^5.0.0","@types/node":"^26.1.1","ts-node":"^10.9.2","typescript":"^7.0.2"},"overrides":{"tmp":"0.2.7"},"gitHead":"7d9435d6514ab4353e309ac34d8157bf4e537a49","_id":"@coyasong/youtube-mcp-server@1.2.0","_nodeVersion":"26.4.0","_npmVersion":"11.17.0","dist":{"integrity":"sha512-oXIj0C2WFrYGBAySY49SJhVVfEaWJXtzsr2uabWvOGI16G7q2l1JE0tXvXR4lIwSIoPkNQSAtBhvvrju7thHUw==","shasum":"efeb55d4fa371aaf799c4dd39c9a8aa03ee14656","tarball":"https://registry.npmjs.org/@coyasong/youtube-mcp-server/-/youtube-mcp-server-1.2.0.tgz","fileCount":32,"unpackedSize":181159,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDxsXXi1hiRftyeUVWfkGEIKlUGfzo7253CYYZx/rmjAwIgU53zUwTMTEtZLwGclxtDiJHdqzk49MXhTN8W/ey+Yrg="}]},"_npmUser":{"name":"coyasong","email":"qawsy12@gmail.com"},"directories":{},"maintainers":[{"name":"coyasong","email":"qawsy12@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/youtube-mcp-server_1.2.0_1783844137434_0.990849401033095"},"_hasShrinkwrap":false}},"time":{"created":"2025-04-02T11:55:52.885Z","modified":"2026-07-12T08:15:37.687Z","1.0.0":"2025-04-02T11:55:53.156Z","1.1.0":"2026-07-11T14:00:19.088Z","1.1.1":"2026-07-11T14:10:38.974Z","1.2.0":"2026-07-12T08:15:37.585Z"},"bugs":{"url":"https://github.com/coyaSONG/youtube-mcp-server/issues"},"author":{"name":"coyaSONG"},"license":"MIT","homepage":"https://github.com/coyaSONG/youtube-mcp-server#readme","keywords":["mcp","model-context-protocol","youtube","transcript","research","citations","ai-agents"],"repository":{"type":"git","url":"git+https://github.com/coyaSONG/youtube-mcp-server.git"},"description":"Citation-ready YouTube transcripts, comments, and channel intelligence for AI agents over MCP","maintainers":[{"name":"coyasong","email":"qawsy12@gmail.com"}],"readme":"# YouTube Research MCP\n\n[![CI](https://github.com/coyaSONG/youtube-mcp-server/actions/workflows/ci.yml/badge.svg)](https://github.com/coyaSONG/youtube-mcp-server/actions/workflows/ci.yml)\n[![npm](https://img.shields.io/npm/v/%40coyasong%2Fyoutube-mcp-server?logo=npm)](https://www.npmjs.com/package/@coyasong/youtube-mcp-server)\n[![npm downloads](https://img.shields.io/npm/dm/%40coyasong%2Fyoutube-mcp-server?logo=npm)](https://www.npmjs.com/package/@coyasong/youtube-mcp-server)\n[![GitHub stars](https://img.shields.io/github/stars/coyaSONG/youtube-mcp-server?style=flat&logo=github)](https://github.com/coyaSONG/youtube-mcp-server/stargazers)\n[![Smithery](https://smithery.ai/badge/coyaSONG/youtube-mcp-server)](https://smithery.ai/servers/coyaSONG/youtube-mcp-server)\n[![MIT License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)\n\nTurn YouTube videos into citation-ready research for Codex, Claude, Cursor, and other MCP clients. Paste a video URL and get transcript evidence with timestamps and links that open at the exact quoted moment.\n\n![YouTube Research MCP turns a video URL into focused timestamp-linked evidence](https://raw.githubusercontent.com/coyaSONG/youtube-mcp-server/main/docs/demo.svg)\n\n```text\nInput:  https://youtu.be/dQw4w9WgXcQ\nOutput: [01:05] ...evidence text...\n        https://www.youtube.com/watch?v=dQw4w9WgXcQ&t=65s\n```\n\nNo YouTube API key is required for transcript research.\n\n## Why this server\n\n- **Citation-ready research** — every transcript segment includes a timestamp and source URL.\n- **Zero-key quick start** — transcripts work immediately; add an API key only for search and analytics.\n- **URL-first input** — accepts normal, short, Shorts, embed, live, and raw video-ID formats.\n- **Agent-efficient filtering** — search inside transcripts and return nearby context instead of spending tokens on the entire video.\n- **Full YouTube intelligence** — optional API mode adds comments, video/channel statistics, trends, and comparisons.\n- **Remote-native MCP** — Streamable HTTP transport at `/mcp`, plus Docker and Smithery support.\n\n## Focused evidence, not a transcript dump\n\nThe included live smoke test asks a focused question about a public video and compares the response with the full timestamped transcript:\n\n| Response | Characters returned |\n|---|---:|\n| Full transcript | 85,518 |\n| `research-video` (3 citations with source identity) | 1,550 |\n| Reduction | **98.2%** |\n\nThis measures response characters, not model-specific tokens. Reproduce it against the default public fixture—or substitute your own video and query:\n\n```bash\nnpm run test:live\nLIVE_TEST_VIDEO='https://youtu.be/VIDEO_ID' LIVE_TEST_QUERY='evaluation' npm run test:live\n```\n\n## Quick start — no API key\n\nRequirements: Node.js 20 or newer.\n\nThe shortest local install uses stdio and needs no API key:\n\n```bash\ncodex mcp add youtube-research -- npx -y @coyasong/youtube-mcp-server@latest\n```\n\nFor Claude Desktop and other MCPB-compatible desktop clients, download the\n[latest one-click MCP bundle](https://github.com/coyaSONG/youtube-mcp-server/releases/latest/download/youtube-research-mcp.mcpb)\nand open it. The bundle vendors its runtime dependencies, starts locally over\nstdio, and asks for a YouTube API key only if you want the optional analytics\ntools.\n\n[![Install in VS Code](https://img.shields.io/badge/VS_Code-Install_Server-0098FF?style=flat-square&logo=visualstudiocode&logoColor=white)](https://insiders.vscode.dev/redirect/mcp/install?name=youtube-research&config=%7B%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22%40coyasong%2Fyoutube-mcp-server%40latest%22%5D%7D)\n\nOr install from the VS Code command line:\n\n```bash\ncode --add-mcp '{\"name\":\"youtube-research\",\"command\":\"npx\",\"args\":[\"-y\",\"@coyasong/youtube-mcp-server@latest\"]}'\n```\n\nFor Claude Desktop, Cursor, and other stdio clients, use command `npx` with arguments `-y @coyasong/youtube-mcp-server@latest`.\n\nTo run the Streamable HTTP transport instead:\n\n```bash\ngit clone https://github.com/coyaSONG/youtube-mcp-server.git\ncd youtube-mcp-server\nnpm install\nnpm run build\nnpm start\n```\n\nThe server starts at `http://localhost:3000/mcp` in `transcript-only` mode. Confirm it with:\n\n```bash\ncurl http://localhost:3000/health\n```\n\n### Connect from Codex\n\nWith the HTTP server running:\n\n```bash\ncodex mcp add youtube-research --url http://localhost:3000/mcp\n```\n\nThen ask Codex:\n\n```text\nUse research-video to find what this video says about evaluation,\nand cite the exact moments: https://www.youtube.com/watch?v=VIDEO_ID\n```\n\n### Connect with MCP Inspector\n\n```bash\nnpx @modelcontextprotocol/inspector\n# Connect to http://localhost:3000/mcp\n```\n\n### Install through Smithery\n\n```bash\nnpx -y smithery@latest auth login\nnpx -y smithery@latest mcp add coyaSONG/youtube-mcp-server --client claude\n```\n\n## Enable search, comments, and analytics\n\nSet a YouTube Data API v3 key to switch from `transcript-only` to `full` mode:\n\n```bash\nexport YOUTUBE_API_KEY=your_key_here\nnpm start\n```\n\n`YOUTUBE_API_KEY` is optional. `PORT` defaults to `3000`.\n\n## Secure a remote deployment\n\nDo not expose a full-mode server publicly without authentication: unauthenticated users could consume your YouTube API quota. Set a strong bearer token and restrict browser origins when deploying outside localhost:\n\n```bash\nexport MCP_BEARER_TOKEN='replace-with-a-long-random-secret'\nexport CORS_ORIGIN='https://your-client.example'\nexport MAX_SESSIONS=100\nexport SESSION_IDLE_TIMEOUT_MS=1800000\nnpm start\n```\n\nConnect Codex using an environment variable rather than writing the secret into its configuration:\n\n```bash\nexport YOUTUBE_MCP_TOKEN='replace-with-a-long-random-secret'\ncodex mcp add youtube-research \\\n  --url https://your-server.example/mcp \\\n  --bearer-token-env-var YOUTUBE_MCP_TOKEN\n```\n\n`/health` remains public for container health checks. MCP requests return `401` when authentication is enabled and the bearer token is missing or invalid. Idle sessions are removed automatically, and `MAX_SESSIONS` bounds memory use.\n\n## Best first tool\n\n`research-video` accepts:\n\n- `video`: a YouTube URL or 11-character video ID\n- `language`: optional caption language such as `en`, `ko`, or `ja`\n- `query`: optional phrase to find inside the transcript\n- `contextLines`: surrounding segments to retain, from 0 to 5\n- `matchMode`: `word` (default) or `substring`\n- `startSeconds` / `endSeconds`: optional time window\n- `offset`: result offset for pagination\n- `maxSegments`: response cap from 1 to 1,000 (default: 200)\n\nIt returns structured JSON containing the video title and channel identity, canonical video URL, full caption-track duration and segment count, matching transcript segments, human-readable citation labels, timestamps, directly navigable citation URLs, and pagination metadata. For long videos, use a `query` or time window first; follow `nextOffset` only when more evidence is needed.\n\n### Compare evidence across videos\n\n`research-videos` applies one focused query to 2–5 video URLs concurrently. It returns the same structured, timestamp-linked evidence for each source while capping results per video. This is useful for comparing interviews, checking whether multiple sources support a claim, or researching a topic across a short watchlist.\n\n```json\n{\n  \"videos\": [\n    \"https://youtu.be/VIDEO_ONE\",\n    \"https://youtu.be/VIDEO_TWO\"\n  ],\n  \"query\": \"evaluation\",\n  \"maxSegmentsPerVideo\": 10\n}\n```\n\nSee [YouTube Research Recipes](docs/recipes.md) for copy-paste workflows for\nfact-checking claims, comparing interviews, navigating long talks, researching\nmultilingual captions, and building citation-ready notes.\n\n## Capability modes\n\n| Capability | No-key mode | With `YOUTUBE_API_KEY` |\n|---|:---:|:---:|\n| Transcript research, filtering, key moments, segmentation, summaries | Yes | Yes |\n| Video search and comments | No | Yes |\n| Video/channel metadata, statistics, trends, and comparisons | No | Yes |\n\nCaptions must be available for the requested video. Age-restricted, private, region-restricted, or caption-disabled videos may not return a transcript.\n\nIf this project saves you research time, consider\n[starring the repository](https://github.com/coyaSONG/youtube-mcp-server) so\nother agent builders can discover it.\n\n## Docker\n\n```bash\ndocker build -t youtube-research-mcp .\ndocker run --rm -p 3000:3000 youtube-research-mcp\n\n# Full mode\ndocker run --rm -p 3000:3000 -e YOUTUBE_API_KEY=your_key youtube-research-mcp\n```\n\n## Development\n\n```bash\nnpm run dev             # HTTP server from TypeScript\nnpm test                # build and run all tests\nnpm run test:live       # live public-video transcript and citation smoke test\nnpm run test:user       # clean-room smoke test against the published npm package\nnpm run test:mcpb       # build, unpack, and exercise the installable MCP bundle\n```\n\n## API Reference\n\n### Resources\n\n- `youtube://video/{videoId}` - Get detailed information about a specific video\n- `youtube://channel/{channelId}` - Get information about a specific channel\n- `youtube://transcript/{videoId}` - Get transcript for a specific video\n  - Optional query parameter: `?language=LANGUAGE_CODE` (e.g., `en`, `ko`, `ja`)\n\n### Tools\n\n#### Basic Tools\n- `research-video` - Get citation-ready transcript evidence from a URL or video ID without an API key\n- `research-videos` - Compare timestamp-linked evidence across 2–5 videos without an API key\n- `search-videos` - Search for YouTube videos with advanced filtering options\n- `get-video-comments` - Get comments for a specific video\n- `get-video-transcript` - Get transcript for a specific video with optional language\n- `enhanced-transcript` - Advanced transcript extraction with filtering, search, and multi-video capabilities\n- `get-key-moments` - Extract key moments with timestamps from a video transcript for easier navigation\n- `get-segmented-transcript` - Divide a video transcript into segments for easier analysis\n\nTools requiring `YOUTUBE_API_KEY` are search, comments, statistics, discovery, and channel analysis. `enhanced-transcript` needs the key only when `includeMetadata` is `true`.\n\n#### Statistical Tools\n- `get-video-stats` - Get statistical information for a specific video\n- `get-channel-stats` - Get subscriber count, view count, and other channel statistics\n- `compare-videos` - Compare statistics across multiple videos\n\n#### Discovery Tools\n- `get-trending-videos` - Retrieve trending videos by region and category\n- `get-video-categories` - Get available video categories for a specific region\n\n#### Analysis Tools\n- `analyze-channel-videos` - Analyze performance trends of videos from a specific channel\n\n### Prompts\n\n- `video-analysis` - Generate an analysis of a YouTube video\n- `transcript-summary` - Generate a summary of a video based on its transcript with customizable length and keywords extraction\n- `segment-by-segment-analysis` - Provide detailed breakdown of content by analyzing each segment of the video\n\n## Examples\n\n### Accessing a Video Transcript\n\n```\nyoutube://transcript/dQw4w9WgXcQ\n```\n\n### Getting a Transcript in a Specific Language\n\n```\nyoutube://transcript/dQw4w9WgXcQ?language=en\n```\n\n### Using the Statistical Tools\n\n```javascript\n// Get video statistics\n{\n  \"type\": \"tool\",\n  \"name\": \"get-video-stats\",\n  \"parameters\": {\n    \"videoId\": \"dQw4w9WgXcQ\"\n  }\n}\n\n// Compare multiple videos\n{\n  \"type\": \"tool\",\n  \"name\": \"compare-videos\",\n  \"parameters\": {\n    \"videoIds\": [\"dQw4w9WgXcQ\", \"9bZkp7q19f0\"]\n  }\n}\n```\n\n### Using the Transcript Summary Prompt\n\n```javascript\n{\n  \"type\": \"prompt\",\n  \"name\": \"transcript-summary\",\n  \"parameters\": {\n    \"videoId\": \"dQw4w9WgXcQ\",\n    \"language\": \"en\"\n  }\n}\n```\n\n### Using the Enhanced Transcript Tool\n\n```javascript\n// Basic multi-video transcript extraction\n{\n  \"type\": \"tool\",\n  \"name\": \"enhanced-transcript\",\n  \"parameters\": {\n    \"videoIds\": [\"dQw4w9WgXcQ\", \"9bZkp7q19f0\"],\n    \"format\": \"timestamped\"\n  }\n}\n\n// With search and time filtering\n{\n  \"type\": \"tool\",\n  \"name\": \"enhanced-transcript\",\n  \"parameters\": {\n    \"videoIds\": [\"dQw4w9WgXcQ\"],\n    \"filters\": {\n      \"timeRange\": {\n        \"start\": 60,  // Start at 60 seconds\n        \"end\": 180    // End at 180 seconds\n      },\n      \"search\": {\n        \"query\": \"never gonna\",\n        \"contextLines\": 2\n      }\n    },\n    \"format\": \"merged\"\n  }\n}\n\n// With duration-based segmentation for easier analysis\n{\n  \"type\": \"tool\",\n  \"name\": \"enhanced-transcript\",\n  \"parameters\": {\n    \"videoIds\": [\"dQw4w9WgXcQ\"],\n    \"filters\": {\n      \"segment\": {\n        \"count\": 5,\n        \"method\": \"smart\"  // Balances caption duration across segments\n      }\n    },\n    \"format\": \"timestamped\",\n    \"language\": \"en\"\n  }\n}\n```\n\n### Using the Enhanced Transcript Analysis Features\n\n```javascript\n// Get key moments from a video\n{\n  \"type\": \"tool\",\n  \"name\": \"get-key-moments\",\n  \"parameters\": {\n    \"videoId\": \"dQw4w9WgXcQ\",\n    \"maxMoments\": 5\n  }\n}\n\n// Get a segmented transcript\n{\n  \"type\": \"tool\",\n  \"name\": \"get-segmented-transcript\",\n  \"parameters\": {\n    \"videoId\": \"dQw4w9WgXcQ\",\n    \"segmentCount\": 4\n  }\n}\n\n// Get a segment-by-segment analysis\n{\n  \"type\": \"prompt\",\n  \"name\": \"segment-by-segment-analysis\",\n  \"parameters\": {\n    \"videoId\": \"dQw4w9WgXcQ\",\n    \"segmentCount\": 4\n  }\n}\n\n// Get customized transcript summary\n{\n  \"type\": \"prompt\",\n  \"name\": \"transcript-summary\",\n  \"parameters\": {\n    \"videoId\": \"dQw4w9WgXcQ\",\n    \"language\": \"en\",\n    \"summaryLength\": \"detailed\",\n    \"includeKeywords\": true\n  }\n}\n```\n\n## Error Handling\n\nThe server handles various error conditions, including:\n\n- Invalid or missing API key for Data API tools\n- Video or channel not found\n- Transcript not available\n- Network issues\n\n## License\n\nMIT\n\n## Acknowledgements\n\n- [Model Context Protocol TypeScript SDK](https://github.com/modelcontextprotocol/typescript-sdk)\n- [YouTube Data API](https://developers.google.com/youtube/v3)\n- [YouTube.js](https://github.com/LuanRT/YouTube.js)\n","readmeFilename":"README.md"}