YouTube Transcript MCP Server avatar

YouTube Transcript MCP Server

Pricing

from $0.01 / 1,000 results

Go to Apify Store
YouTube Transcript MCP Server

YouTube Transcript MCP Server

MCP server for YouTube transcript retrieval, search, and metadata extraction using Cheerio. Provides tools: get_transcript, search_videos, get_video_info.

Pricing

from $0.01 / 1,000 results

Rating

0.0

(0)

Developer

Jordan C

Jordan C

Maintained by Community

Actor stats

0

Bookmarked

0

Total users

0

Monthly active users

3 days ago

Last modified

Share

An MCP (Model Context Protocol) server for YouTube transcript retrieval, search, and metadata extraction — built with Cheerio (no Puppeteer/Playwright).

Tools

get_transcript

Fetch captions/transcript from a YouTube video.

Parameters:

NameTypeRequiredDescription
video_urlstringFull YouTube video URL (e.g. https://www.youtube.com/watch?v=dQw4w9WgXcQ)

Output: Timestamped transcript with language info.

search_videos

Search YouTube by keyword.

Parameters:

NameTypeRequiredDescription
querystringSearch keyword or phrase
max_resultsnumberMaximum results (default: 10, max: 50)

Output: Titles, URLs, descriptions, and view counts.

get_video_info

Get detailed video metadata.

Parameters:

NameTypeRequiredDescription
video_urlstringFull YouTube video URL

Output: Title, author, duration, views, publish date, category, description.

Usage

With an MCP Client (Claude Desktop, etc.)

Add to your MCP client configuration:

{
"mcpServers": {
"youtube-transcript": {
"command": "node",
"args": ["path/to/mcp-youtube-transcript/dist/index.js"]
}
}
}

Direct invocation (stdio)

# List tools
echo '{"jsonrpc":"2.0","id":1,"method":"tools/list"}' | node dist/index.js
# Get transcript
echo '{"jsonrpc":"2.0","id":2,"method":"tools/call","params":{"name":"get_transcript","arguments":{"video_url":"https://www.youtube.com/watch?v=dQw4w9WgXcQ"}}}' | node dist/index.js
# Search videos
echo '{"jsonrpc":"2.0","id":3,"method":"tools/call","params":{"name":"search_videos","arguments":{"query":"MCP server tutorial","max_results":5}}}' | node dist/index.js
# Get video info
echo '{"jsonrpc":"2.0","id":4,"method":"tools/call","params":{"name":"get_video_info","arguments":{"video_url":"https://www.youtube.com/watch?v=dQw4w9WgXcQ"}}}' | node dist/index.js

Deployment to Apify

Prerequisites

  • Apify CLI installed
  • Apify account logged in (apify login)

Push to Apify

$apify push

The actor will be published at https://console.apify.com/actors/reverberant_equality/mcp-youtube-transcript.

Run on Apify

$apify run

Or via the Apify Console web interface.

Local Development

# Install dependencies
npm install
# Build TypeScript
npm run build
# Start the server
npm start

Architecture

  • TypeScript — fully typed, compiled with tsc
  • Express-based MCP SDK — uses @modelcontextprotocol/sdk with stdio transport
  • Cheerio — lightweight HTML/XML parsing for scraping YouTube pages (no headless browser needed)
  • Axios — HTTP client for fetching pages and caption XML
  • Docker — multi-stage build for minimal production image

How It Works

The server scrapes YouTube's public pages using Cheerio:

  1. Transcripts — Fetches the video page, extracts ytInitialPlayerResponse JSON, finds caption tracks, fetches the XML transcript, and formats it with timestamps.
  2. Search — Fetches YouTube search results page, extracts ytInitialData JSON, and parses video renderers.
  3. Info — Uses the same ytInitialPlayerResponse to extract detailed metadata.

No API keys are required — all data is obtained from publicly available YouTube pages.

License

MIT