YouTube MCP Server
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| FASTMCP_HOST | No | Server host (HTTP mode) | 0.0.0.0 |
| FASTMCP_PORT | No | Server port (HTTP mode) | 8000 |
| LANGFUSE_HOST | No | Langfuse host URL | https://cloud.langfuse.com |
| YOUTUBE_API_KEY | Yes | YouTube Data API v3 key | |
| LANGFUSE_PUBLIC_KEY | No | Langfuse tracing public key | |
| LANGFUSE_SECRET_KEY | No | Langfuse tracing secret key |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
| logging | {} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
| extensions | {
"io.modelcontextprotocol/ui": {}
} |
| experimental | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| search_videosA | Search for YouTube videos by query string. Caching Behavior:
Ref input compatibility: Support depends on the tool's input schema/validation. Some strictly typed parameters may reject string ref_ids before resolution. Full retrieval: Use Preview Size: server default. Override per-call with |
| search_channelsA | Search for YouTube channels by query string. Caching Behavior:
Ref input compatibility: Support depends on the tool's input schema/validation. Some strictly typed parameters may reject string ref_ids before resolution. Full retrieval: Use Preview Size: server default. Override per-call with |
| get_video_detailsA | Get detailed information about a YouTube video. Caching Behavior:
Ref input compatibility: Support depends on the tool's input schema/validation. Some strictly typed parameters may reject string ref_ids before resolution. Full retrieval: Use Preview Size: server default. Override per-call with |
| get_channel_infoA | Get detailed information about a YouTube channel. Caching Behavior:
Ref input compatibility: Support depends on the tool's input schema/validation. Some strictly typed parameters may reject string ref_ids before resolution. Full retrieval: Use Preview Size: server default. Override per-call with |
| list_available_transcriptsA | List all available transcript languages for a YouTube video. Caching Behavior:
Ref input compatibility: Support depends on the tool's input schema/validation. Some strictly typed parameters may reject string ref_ids before resolution. Full retrieval: Use Preview Size: server default. Override per-call with |
| get_video_transcript_previewA | Get a preview of a YouTube video transcript. Caching Behavior:
Ref input compatibility: Support depends on the tool's input schema/validation. Some strictly typed parameters may reject string ref_ids before resolution. Full retrieval: Use Preview Size: server default. Override per-call with |
| get_full_transcriptA | Get the complete transcript for a YouTube video. Caching Behavior:
Ref input compatibility: Support depends on the tool's input schema/validation. Some strictly typed parameters may reject string ref_ids before resolution. Full retrieval: Use Preview Size: server default. Override per-call with |
| get_transcript_chunkA | Get a chunk of transcript entries for pagination. Caching Behavior:
Ref input compatibility: Support depends on the tool's input schema/validation. Some strictly typed parameters may reject string ref_ids before resolution. Full retrieval: Use Preview Size: server default. Override per-call with |
| get_video_commentsA | Get top comments for a YouTube video with engagement metrics. Caching Behavior:
Ref input compatibility: Support depends on the tool's input schema/validation. Some strictly typed parameters may reject string ref_ids before resolution. Full retrieval: Use Preview Size: server default. Override per-call with |
| search_live_videosA | Search for currently live YouTube videos. Caching Behavior:
Ref input compatibility: Support depends on the tool's input schema/validation. Some strictly typed parameters may reject string ref_ids before resolution. Full retrieval: Use Preview Size: server default. Override per-call with |
| is_liveA | Check if a YouTube video is currently live. Caching Behavior:
Ref input compatibility: Support depends on the tool's input schema/validation. Some strictly typed parameters may reject string ref_ids before resolution. Full retrieval: Use Preview Size: server default. Override per-call with |
| get_live_chat_idA | Get the live chat ID for a currently streaming video. Caching Behavior:
Ref input compatibility: Support depends on the tool's input schema/validation. Some strictly typed parameters may reject string ref_ids before resolution. Full retrieval: Use Preview Size: server default. Override per-call with |
| get_live_chat_messagesA | Get recent live chat messages from a streaming video. Caching Behavior:
Ref input compatibility: Support depends on the tool's input schema/validation. Some strictly typed parameters may reject string ref_ids before resolution. Full retrieval: Use Preview Size: server default. Override per-call with |
| warmup_semantic_searchA | Pre-load the embedding model and vector store for semantic search. Call this before your first semantic search to avoid timeout. Downloads and initializes the Nomic embedding model (~270MB) and creates the vector store connection. The warmup process:
Returns: Dictionary with warmup status: - status: "ready" if successful - model: Name of the embedding model loaded - dimensionality: Embedding dimensions configured - inference_mode: How embeddings are computed (local/remote) - test_embedding_size: Size of test embedding (confirms model works) - warmup_time_seconds: Time taken to warm up Note: - First call downloads ~270MB model (takes 30-60 seconds) - Subsequent calls are instant (model cached on disk) - Model stays in memory for fast inference after warmup |
| semantic_search_transcriptsA | Search transcripts using natural language with automatic indexing. Performs semantic similarity search over video transcripts. Automatically indexes any missing transcripts before searching, providing a seamless experience without requiring explicit indexing calls. Args: query: Natural language search query (e.g., "Nix garbage collection generations"). channel_ids: Optional list of YouTube channel IDs to scope the search. Videos from these channels will be auto-indexed if not already indexed. video_ids: Optional list of specific video IDs to scope the search. These videos will be auto-indexed if not already indexed. k: Number of results to return (default: 10). language: Preferred transcript language code (default: "en"). max_videos_per_channel: Maximum videos to fetch per channel (default: 50). min_score: Optional minimum similarity score threshold (lower is better). Returns: Dictionary with search results including: - query: The original search query - results: List of matches with video info, text, timestamps, and scores - total_results: Number of results returned - indexing_stats: Statistics about auto-indexing performed - scope: Description of search scope applied Note: - First search on new content will be slower due to indexing (~1-2 min for 50 videos) - Subsequent searches are fast (already indexed) - If neither channel_ids nor video_ids provided, searches all indexed content - Results include timestamp URLs for direct playback at matching segments |
| index_channel_transcriptsA | Pre-index all video transcripts from a YouTube channel. This is an optional tool for pre-warming the semantic search index. You don't need to call this before searching - semantic_search_transcripts automatically indexes missing videos. Use this only if you want to explicitly prepare a channel's content for faster first searches. Args: channel_id: YouTube channel ID (e.g., "UCuAXFkgsw1L7xaCfnd5JJOw"). max_videos: Maximum number of videos to index (default: 50). language: Preferred transcript language code (default: "en"). force_reindex: If True, re-index videos even if already indexed. Returns: Dictionary with indexing results: - indexed_count: Number of videos successfully indexed - chunk_count: Total chunks created - skipped_count: Videos skipped (already indexed or no transcript) - error_count: Number of failed videos - errors: List of error messages - video_ids: List of indexed video IDs Note: - Indexing 50 videos takes ~1-2 minutes - Uses ~1 API quota unit per video (transcripts are free) - Subsequent semantic searches on this channel will be fast |
| semantic_search_commentsA | Search comments using natural language with automatic indexing. Performs semantic similarity search over video comments. Automatically indexes any missing comments before searching, providing a seamless experience without requiring explicit indexing calls. Args: query: Natural language search query (e.g., "questions about flakes"). channel_ids: Optional list of YouTube channel IDs to scope the search. video_ids: Optional list of specific video IDs to scope the search. k: Number of results to return (default: 10). max_comments_per_video: Maximum comments to index per video (default: 100). max_videos_per_channel: Maximum videos to fetch per channel (default: 50). min_score: Optional minimum similarity score threshold (lower is better). Returns: Dictionary with search results including: - query: The original search query - results: List of matches with video info, text, author, like_count, scores - total_results: Number of results returned - indexing_stats: Statistics about auto-indexing performed - scope: Description of search scope applied Note: - First search on new content will be slower due to indexing - Subsequent searches are fast (already indexed) - If neither channel_ids nor video_ids provided, searches all indexed comments |
| semantic_search_allA | Search across all content types (transcripts and comments). Performs unified semantic search over both video transcripts and comments. Automatically indexes any missing content before searching. Args: query: Natural language search query (e.g., "Nix garbage collection"). content_types: List of content types to search: ["transcript", "comment"]. If None, searches all types. channel_ids: Optional list of YouTube channel IDs to scope the search. video_ids: Optional list of specific video IDs to scope the search. k: Number of results to return (default: 10). language: Preferred transcript language code (default: "en"). max_comments_per_video: Maximum comments to index per video (default: 100). max_videos_per_channel: Maximum videos to fetch per channel (default: 50). min_score: Optional minimum similarity score threshold (lower is better). Returns: Dictionary with search results including: - query: The original search query - results: List of matches with content_type field indicating source - total_results: Number of results returned - indexing_stats: Statistics for both transcripts and comments - content_types_searched: List of content types that were searched Note: - Results are sorted by relevance score across all content types - Each result includes content_type field ("transcript" or "comment") - Transcript results include timestamp_url, comment results include author |
| get_indexed_videosA | Get list of videos that have been indexed for semantic search. Retrieves all indexed video IDs with optional filtering by channel and/or content type. Useful for understanding what content is available. Args: channel_id: Optional filter by YouTube channel ID. content_type: Optional filter by content type ("transcript" or "comment"). Returns: Dictionary with: - video_ids: List of indexed video IDs - total_count: Total number of indexed videos - channel_filter: Channel ID filter if applied - content_type_filter: Content type filter if applied |
| delete_indexed_videoA | Delete a video's content from the semantic search index. Removes indexed content (transcripts, comments, or both) for a specific video. Useful for re-indexing or cleaning up the index. Args: video_id: YouTube video ID to remove from the index. content_type: Optional content type to delete ("transcript" or "comment"). If None, deletes all content types for the video. Returns: Dictionary with: - video_id: The deleted video ID - transcripts_deleted: Number of transcript chunks removed - comments_deleted: Number of comment chunks removed - total_deleted: Total chunks removed - success: Whether the deletion was successful |
| enable_test_contextA | Enable or disable test context mode for Langfuse attribution demos. When enabled, all traces will include user_id, session_id, and metadata from the MockContext. This allows testing Langfuse filtering and aggregation without a real FastMCP authentication setup. Args: enabled: Whether to enable test context mode (default: True). Returns: Status dict with current test mode state and context values. |
| set_test_contextA | Set test context values for Langfuse attribution demos. Changes here affect what user_id, session_id, and metadata are sent to Langfuse traces. Use this to test filtering by different users or sessions in the Langfuse dashboard. Args: user_id: User identity (e.g., "alice", "bob"). org_id: Organization identity (e.g., "acme", "globex"). session_id: Session identifier for grouping traces. agent_id: Agent identity (e.g., "claude", "gpt4"). Returns: Updated context state and example of Langfuse attributes. |
| reset_test_contextB | Reset test context to default demo values. Returns: Reset context state. |
| get_trace_infoA | Get information about the current Langfuse trace and context. Returns metadata about Langfuse tracing status and current context values for debugging. Returns: Dict with Langfuse configuration and current context. |
| get_cached_resultA | Retrieve a cached result, optionally with pagination. Use this to:
All cache operations are traced to Langfuse with hit/miss status. Args: ref_id: Reference ID to look up. page: Page number (1-indexed). page_size: Items per page. max_size: Maximum preview size (overrides defaults). full: If True, return the complete cached value without preview truncation. Bypasses all preview generation. Use when you need the entire value (e.g. full transcripts). Returns: The cached value or a preview with pagination info. Caching: Large results are returned as references with previews. Pagination: Use Full retrieval: Use References: This tool accepts |
| health_checkA | Check server health status. Returns: Health status information including Langfuse tracing status. |
| admin_list_referencesA | List cached references with optional filtering. ⚠️ ADMIN ONLY - Requires elevated permissions. Args: namespace: Filter by namespace (e.g., 'public', 'user:alice'). include_expired: Include expired references in results. include_preview: Include value previews in results. limit: Maximum number of results (default: 50, max: 100). offset: Offset for pagination. Returns: Dictionary with references list and pagination info. |
| admin_get_reference_infoA | Get detailed information about a cached reference. ⚠️ ADMIN ONLY - Requires elevated permissions. Args: ref_id: The reference ID to look up. Returns: Dictionary with detailed reference information (value not included). |
| admin_delete_referenceA | Delete a specific cached reference. ⚠️ ADMIN ONLY - Requires elevated permissions. ⚠️ DESTRUCTIVE - This action cannot be undone. Args: ref_id: The reference ID to delete. Returns: Confirmation of deletion or error. |
| admin_clear_namespaceA | Clear all references in a namespace. ⚠️ ADMIN ONLY - Requires elevated permissions. ⚠️ DESTRUCTIVE - This action cannot be undone. Args: namespace: The namespace to clear (e.g., 'user:alice'). include_children: Also clear child namespaces (default: True). Returns: Confirmation with count of deleted references. |
| admin_get_cache_statsA | Get detailed cache statistics. ⚠️ ADMIN ONLY - Requires elevated permissions. Returns: Dictionary with cache statistics including: - Total references and counts by namespace - Active vs expired reference counts - Value type breakdown - Cache configuration |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
| _template_guide | Guide for using this MCP server template. |
| _langfuse_guide | Guide for using Langfuse tracing with this server. |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/l4b4r4b4b4/yt-api-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server