youtube-transcripts

v0.1.1
io.github.fetchworks-dev/youtube-transcripts Checked 4 days ago Published 3 months ago

YouTube transcripts for AI agents: videos, channels, playlists, search.

An MCP server that gives AI agents YouTube transcripts — from single videos, whole channels, and YouTube search — with timestamped segments, plain text, SRT, and VTT. The server is a thin client for the Fetchworks YouTube Transcript Scraper on Apify. The extraction runs on Apify's infrastructure; you bring your own Apify token. Pricing is $2 per 1,000 transcripts — only delivered transcripts are billed. Failed videos (no captions, blocked, unavailable) cost nothing. Get a token by signing up at apify.com (free tier included), then copy it from console.apify.com/settings/integrations.

Summary extracted from the README.

fetchworks-mcp

An MCP server that gives AI agents YouTube transcripts — from single videos, whole channels, and YouTube search — with timestamped segments, plain text, SRT, and VTT.

The server is a thin client for the Fetchworks YouTube Transcript Scraper on Apify. The extraction runs on Apify's infrastructure; you bring your own Apify token. Pricing is $2 per 1,000 transcripts — only delivered transcripts are billed. Failed videos (no captions, blocked, unavailable) cost nothing.

Get a token by signing up at apify.com (free tier included), then copy it from console.apify.com/settings/integrations.

Tools

Tool What it does
get_youtube_transcript Transcripts for one or more video URLs / Shorts links / bare 11-char IDs
get_channel_transcripts Transcripts for a channel's newest uploads (@handle or channel URL, default 10 videos)
search_youtube_transcripts Transcripts for the top results of a YouTube search (default 5 videos)

All tools accept languages (priority list), preferAutoGenerated, translateTo, outputFormats (segments/text/srt/vtt, default ["text"]), includeMetadata, and includeChapters. Every video comes back with an honest status (ok, no_captions, blocked, live_stream, age_restricted, unavailable, translation_unavailable, po_token_required, error) — never a silently empty transcript.

Setup

Requires Node.js 18+ and the APIFY_TOKEN environment variable.

Claude Desktop

Add to claude_desktop_config.json (Settings → Developer → Edit Config):

{
  "mcpServers": {
    "youtube-transcripts": {
      "command": "npx",
      "args": ["-y", "fetchworks-mcp"],
      "env": {
        "APIFY_TOKEN": "your-apify-token"
      }
    }
  }
}

Claude Code

claude mcp add youtube-transcripts --env APIFY_TOKEN=your-apify-token -- npx -y fetchworks-mcp

Cursor

Add to ~/.cursor/mcp.json (or .cursor/mcp.json in your project):

{
  "mcpServers": {
    "youtube-transcripts": {
      "command": "npx",
      "args": ["-y", "fetchworks-mcp"],
      "env": {
        "APIFY_TOKEN": "your-apify-token"
      }
    }
  }
}

Example prompts

  • "Get the transcript of https://www.youtube.com/watch?v=jNQXAC9IVRw and summarize it."
  • "What has @3blue1brown covered in their last 5 videos?"
  • "Search YouTube for 'context windows explained' and compare what the top 3 videos say."

License

MIT