YouTube Transcript MCP Server

by kyong0612

Not rated
GitHub

About

A high-performance MCP server for fetching YouTube video transcripts, with support for caching, rate limiting, and proxy rotation.

Details

Author
kyong0612
Categories
Web Scraping, Other, Media

Setup

Install YouTube Transcript MCP Server in your MCP client (Claude Desktop, Cursor, Windsurf, and others).

Repository: https://github.com/kyong0612/youtube-mcp

Follow the installation instructions in the repository README, then restart your MCP client.

A high-performance MCP server for fetching YouTube video transcripts, with support for caching, rate limiting, and proxy rotation.

A high-performance Model Context Protocol (MCP) server for fetching YouTube video transcripts, implemented in Go.

Install the stdio binary, then register it with Claude Code in a single command:

# 1. Install the stdio binary (requires Go 1.24+) go install github.com/kyong0612/youtube-mcp/cmd/mcp@latest mv "$(go env GOPATH)/bin/mcp" "$(go env GOPATH)/bin/youtube-mcp-stdio" # 2. Register the server with Claude Code (one-liner) claude mcp add youtube-transcript -- youtube-mcp-stdio

For Claude Desktop, Cursor, and manual JSON configuration, see theMCP Client Setupsection below.

Demo GIF coming soon.A short screen recording showing transcript fetching from an MCP client will be added here.

- Registries: This server is being prepared for discovery via MCP registries such as theMCP RegistryandSmithery. The registry manifest is added in a separate PR.
- Prebuilt binaries & Docker image: Cross-platform binaries and a container image will be published after the first GitHub release is tagged. Until then, install viago install(above) or build from source (see theInstallationsection below).

- MCP Protocol 2024-11-05 Compliant: Full implementation of the Model Context Protocol
- 5 Powerful Tools:

- get_transcript: Fetch transcript for a single video
- get_multiple_transcripts: Batch process multiple videos
- translate_transcript: Fetch captions in the specified language (including YouTube's auto-translated captions when available). This does not machine-translate arbitrary text.
- format_transcript: Format transcripts (plain text, SRT, VTT, etc.)
- list_available_languages: List available subtitle languages

- Go 1.24 or higher
- Docker & Docker Compose (optional)
- Internet connection

# Clone the repository git clone https://github.com/kyong0612/youtube-mcp.git cd youtube-mcp # Run the installer ./scripts/install-mcp.sh

- Build the MCP server binary
- Configure Claude Desktop automatically
- Set up environment variables

You can install the MCP server directly usinggo install:

# Install the stdio version for MCP clients go install github.com/kyong0612/youtube-mcp/cmd/mcp@latest # The binary will be installed to $GOPATH/bin/mcp # Rename it for clarity mv $GOPATH/bin/mcp $GOPATH/bin/youtube-mcp-stdio # Or install to a specific location GOBIN=/usr/local/bin go install github.com/kyong0612/youtube-mcp/cmd/mcp@latest sudo mv /usr/local/bin/mcp /usr/local/bin/youtube-mcp-stdio

Then configure your MCP client to use the installed binary:

{ "mcpServers": { "youtube-transcript": { "command": "youtube-mcp-stdio", "args": [], "env": { "LOG_LEVEL": "info", "CACHE_ENABLED": "true", "YOUTUBE_DEFAULT_LANGUAGES": "en,ja" } } } }

Note: If you installed to$GOPATH/bin, make sure it's in your PATH, or use the full path in the command field.

To use this server with Claude Desktop, add to yourclaude_desktop_config.json:

{ "mcpServers": { "youtube-transcript": { "command": "/path/to/youtube-mcp/youtube-mcp-stdio", "args": [], "env": { "LOG_LEVEL": "info", "CACHE_ENABLED": "true", "YOUTUBE_DEFAULT_LANGUAGES": "en,ja" } } } }

Important: Claude Desktop requires the stdio version of the server (youtube-mcp-stdio), not the HTTP server.

go build -o youtube-mcp-stdio ./cmd/mcp/

Onceyoutube-mcp-stdiois on yourPATH(seeInstall via Go Install), register it with a single command:

claude mcp add youtube-transcript -- youtube-mcp-stdio

You can also point Claude Code at an explicit binary path and pass environment variables:

claude mcp add youtube-transcript \ --env YOUTUBE_DEFAULT_LANGUAGES=en,ja \ -- /path/to/youtube-mcp/youtube-mcp-stdio

Cursor supports MCP servers through its settings. To configure:
- Open Cursor Settings (Cmd+,on macOS,Ctrl+,on Windows/Linux)
- Search for "MCP" or "Model Context Protocol"
- Add the server configuration:

{ "mcp.servers": { "youtube-transcript": { "command": "/path/to/youtube-mcp/youtube-mcp-stdio", "args": [], "env": { "LOG_LEVEL": "info", "CACHE_ENABLED": "true", "YOUTUBE_DEFAULT_LANGUAGES": "en,ja" } } } }

Seedocs/mcp-client-setup.mdfor detailed setup instructions.

# Clone the repository git clone https://github.com/kyong0612/youtube-mcp.git cd youtube-mcp # Install dependencies make deps # Build the application make build # Run the server make run
# Clone the repository git clone https://github.com/kyong0612/youtube-mcp.git cd youtube-mcp # Setup environment make env-setup # Edit .env file with your configuration # Start with Docker Compose make up

Copy.env.exampleto.envand configure:

- PORT: Server port (default: 8080)
- YOUTUBE_DEFAULT_LANGUAGES: Default languages for transcripts
- CACHE_TYPE: Cache type (memory/redis)
- SECURITY_ENABLE_AUTH: Enable API authentication
- LOG_LEVEL: Logging level (debug/info/warn/error)

Using with MCP Clients (Claude Desktop, Cursor, etc.)

The MCP server will be automatically started by your MCP client. Once configured, you can use the tools directly in your conversations.

For development or testing, you can also run the HTTP server version:

curl -X POST http://localhost:8080/mcp \ -H "Content-Type: application/json" \ -d '{ "jsonrpc": "2.0", "id": 1, "method": "initialize" }'
curl -X POST http://localhost:8080/mcp \ -H "Content-Type: application/json" \ -d '{ "jsonrpc": "2.0", "id": 1, "method": "tools/list" }'
curl -X POST http://localhost:8080/mcp \ -H "Content-Type: application/json" \ -d '{ "jsonrpc": "2.0", "id": 1, "method": "tools/call", "params": { "name": "get_transcript", "arguments": { "video_identifier": "https://www.youtube.com/watch?v=dQw4w9WgXcQ", "languages": ["en", "ja"], "preserve_formatting": false } } }'
curl -X POST http://localhost:8080/mcp \ -H "Content-Type: application/json" \ -d '{ "jsonrpc": "2.0", "id": 2, "method": "tools/call", "params": { "name": "get_multiple_transcripts", "arguments": { "video_identifiers": ["dQw4w9WgXcQ", "jNQXAC9IVRw"], "languages": ["en"], "continue_on_error": true } } }'
# Run all tests make test # Run with coverage make test-coverage # Run benchmarks make benchmark
# Format code make fmt # Run linter make lint # Security scan make security
# Install air for hot reload go install github.com/air-verse/air@latest # Run with hot reload make dev
# Build and start make up-build # View logs make logs # Stop services make down
# Start with Prometheus & Grafana make up-monitoring

Note: Prometheus metrics are planned/not yet implemented. The/metricsendpoint currently returns a placeholder (# TODO: Implement Prometheus metrics) along with basic request stats.

"Empty transcript response" error

- Cause: The server is running in HTTP mode instead of stdio mode
- Solution: Ensure you're usingyoutube-mcp-stdiobinary, notyoutube-transcript-mcp

- Cause: Claude Desktop timeout or server not responding
- Solution:

- Restart Claude Desktop
- Check server logs:LOG_LEVEL=debugin environment
- Verify network connectivity

"Failed to extract player response" in health checks

- Cause: YouTube page structure changes or rate limiting
- Solution: This is usually temporary. The server will retry automatically.

- Cause: Incorrect configuration or binary path
- Solution:
- Verify the binary exists:ls -la /path/to/youtube-mcp-stdio
- Check Claude Desktop logs: Developer → Open logs
- Ensure the config file is valid JSON

Enable debug logging to see detailed information:

{ "mcpServers": { "youtube-transcript": { "command": "/path/to/youtube-mcp/youtube-mcp-stdio", "args": [], "env": { "LOG_LEVEL": "debug", "CACHE_ENABLED": "true", "YOUTUBE_DEFAULT_LANGUAGES": "en,ja" } } } }

- API Key Authentication: SetSECURITY_ENABLE_AUTH=trueand configure API keys
- Rate Limiting: Configurable per-IP rate limiting
- IP Whitelisting/Blacklisting: Control access by IP address
- CORS: Configurable CORS policies
- Fork the repository
- Create your feature branch (git checkout -b feature/amazing-feature)
- Commit your changes (git commit -m 'Add amazing feature')
- Push to the branch (git push origin feature/amazing-feature)
- Open a Pull Request

This project is licensed under the MIT License - see theLICENSEfile for details.

- Inspired byyoutube-transcript-api
- Built for the
Model Context Protocol

This tool is for educational and research purposes. Please respect YouTube's Terms of Service and copyright laws when using transcripts.

MCP server for Al Jazeera 360 — Connect AI assistants to Al Jazeera's streaming catalog. Search, browse, and retrieve Arabic video content with direct watch links.

Interact with the Bilibili video website, enabling actions like searching for videos, retrieving video information, and accessing user data.

YouTube data MCP server for AI agents to search videos, fetch transcripts, read comments, and inspect channels, playlists, and video details.

Access YouTube video data and transcripts using the YouTube Data API.

Extract metadata and captions from YouTube videos and convert them to markdown.

A zero-setup server to extract transcripts from YouTube videos on any platform.

Download video and audio content from various websites like YouTube, Facebook, and Tiktok using yt-dlp.

Download video and audio from various platforms like YouTube, Facebook, and TikTok using yt-dlp.

🕷️ 9 MCP tools for web scraping, browser automation, vision, transcription and RAG query

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.