Sponsored by Deepsite.site

YouTube MCP Server (NO API REQUIRED)

Created By
spolepaka9 months ago
Youtube MCP Server (NO API REQUIRED)
Content

YouTube MCP Server (NO API REQUIRED)

A Model Context Protocol (MCP) server that enables YouTube search, video info retrieval, and transcript extraction with NO API KEYS required.

Features

  • Search YouTube videos with customizable result limits
  • Get detailed video information from any YouTube URL or video ID
  • Extract video transcripts (captions) with timestamps
  • No API keys or authentication required
  • Support for multiple YouTube URL formats
  • Automatic language selection (prioritizes English)
  • Returns structured results with rich metadata

Installation

  1. Clone or download this repository
  2. Install dependencies:
    npm install
    
  3. Build the server:
    npm run build
    
  4. Add the server to your MCP configuration:

For Claude Desktop:

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

(Replace with the absolute path to the index.js file on your system)

Configuration file location:

  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json

For Cursor:

  1. Go to Settings → MCP → Add a new MCP server
  2. Fill in the fields: - Name: youtube - Type: command - Command: node /absolute/path/to/youtube-mcp/build/index.js
(Replace with the absolute path to the index.js file on your system)

Usage

The server provides three tools:

{
  "query": string,    // The search query
  "limit": number     // Optional: Number of results to return (default: 5, max: 10)
}

Example response:

[
  {
    "videoId": "dQw4w9WgXcQ",
    "title": "Video Title",
    "url": "https://youtube.com/watch?v=dQw4w9WgXcQ",
    "thumbnailUrl": "https://i.ytimg.com/vi/dQw4w9WgXcQ/hqdefault.jpg",
    "description": "Video description...",
    "channel": {
      "name": "Channel Name",
      "url": "https://youtube.com/channel/..."
    },
    "viewCount": "1M views",
    "publishedTime": "3 years ago"
  }
]

2. Video Info Tool (get-video-info)

{
  "input": string    // YouTube video ID or URL
}

Supported URL formats:

  • Direct video ID: dQw4w9WgXcQ
  • Standard watch URL: https://www.youtube.com/watch?v=dQw4w9WgXcQ
  • Short URL: https://youtu.be/dQw4w9WgXcQ
  • Embed URL: https://www.youtube.com/embed/dQw4w9WgXcQ
  • Mobile URL: https://m.youtube.com/watch?v=dQw4w9WgXcQ
  • Music URL: https://music.youtube.com/watch?v=dQw4w9WgXcQ

3. Transcript Tool (get-transcript)

{
  "input": string    // YouTube video ID or URL
}

Example response:

{
  "videoId": "dQw4w9WgXcQ",
  "videoInfo": {
    "title": "Video Title",
    "channel": {
      "name": "Channel Name"
    },
    "duration": "212"
  },
  "transcript": [
    {
      "time": "0.00",
      "text": "First caption..."
    },
    {
      "time": "2.50",
      "text": "Next caption..."
    }
  ]
}

Limitations

Since this tool uses web scraping of YouTube pages, there are some important limitations to be aware of:

  1. Rate Limiting:

    • YouTube may temporarily block requests if too many are made in a short time
    • Keep requests to a reasonable frequency
    • Consider implementing delays between requests
    • Use the limit parameter judiciously
  2. Transcript Availability:

    • Not all videos have transcripts/captions available
    • Some videos may only have auto-generated captions
    • Some videos may only have non-English captions
    • Private videos are not accessible
  3. Result Accuracy:

    • The tool relies on YouTube's HTML structure, which may change
    • Some metadata might be missing or incomplete
    • Search results may vary based on region/language settings
  4. Legal Considerations:

    • This tool is intended for personal use
    • Respect YouTube's terms of service
    • Consider implementing appropriate rate limiting for your use case

Error Handling

The server provides clear error messages for common issues:

  1. Invalid video IDs or URLs:

    {
      "error": "Invalid YouTube video ID or URL: input"
    }
    
  2. Missing transcripts:

    {
      "error": "No transcript available for this video"
    }
    
  3. Network or parsing errors:

    {
      "error": "Failed to fetch video data: HTTP error status 429"
    }
    

Contributing

Feel free to submit issues and enhancement requests!

Connect & Feedback

Have questions, suggestions, or need help with this tool? Connect with me:

Your feedback helps improve this tool for everyone!

Recommend Servers
TraeBuild with Free GPT-4.1 & Claude 3.7. Fully MCP-Ready.
WindsurfThe new purpose-built IDE to harness magic
BlenderBlenderMCP connects Blender to Claude AI through the Model Context Protocol (MCP), allowing Claude to directly interact with and control Blender. This integration enables prompt assisted 3D modeling, scene creation, and manipulation.
Serper MCP ServerA Serper MCP Server
EdgeOne Pages MCPAn MCP service designed for deploying HTML content to EdgeOne Pages and obtaining an accessible public URL.
Tavily Mcp
Baidu Map百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
ChatWiseThe second fastest AI chatbot™
MCP AdvisorMCP Advisor & Installation - Use the right MCP server for your needs
Jina AI MCP ToolsA Model Context Protocol (MCP) server that integrates with Jina AI Search Foundation APIs.
Zhipu Web SearchZhipu Web Search MCP Server is a search engine specifically designed for large models. It integrates four search engines, allowing users to flexibly compare and switch between them. Building upon the web crawling and ranking capabilities of traditional search engines, it enhances intent recognition capabilities, returning results more suitable for large model processing (such as webpage titles, URLs, summaries, site names, site icons, etc.). This helps AI applications achieve "dynamic knowledge acquisition" and "precise scenario adaptation" capabilities.
CursorThe AI Code Editor
TimeA Model Context Protocol server that provides time and timezone conversion capabilities. This server enables LLMs to get current time information and perform timezone conversions using IANA timezone names, with automatic system timezone detection.
Context7Context7 MCP Server -- Up-to-date code documentation for LLMs and AI code editors
Playwright McpPlaywright MCP server
Visual Studio Code - Open Source ("Code - OSS")Visual Studio Code
AiimagemultistyleA Model Context Protocol (MCP) server for image generation and manipulation using fal.ai's Stable Diffusion model.
Amap Maps高德地图官方 MCP Server
DeepChatYour AI Partner on Desktop
MiniMax MCPOfficial MiniMax Model Context Protocol (MCP) server that enables interaction with powerful Text to Speech, image generation and video generation APIs.
Howtocook Mcp基于Anduin2017 / HowToCook (程序员在家做饭指南)的mcp server,帮你推荐菜谱、规划膳食,解决“今天吃什么“的世纪难题; Based on Anduin2017/HowToCook (Programmer's Guide to Cooking at Home), MCP Server helps you recommend recipes, plan meals, and solve the century old problem of "what to eat today"