Get the FREE Ultimate OpenClaw Setup Guide →

youtube

MCP server from CodeWizzard01/youtube-mcp-server

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio codewizzard01-youtube-mcp-server docker run -e YOUTUBE_API_KEY=<your_api_key_here> -p 8085:8080 codewizard01/youtube-mcp:latest \
  --env YOUTUBE_API_KEY="<your_api_key_here>"

How to use

This MCP server exposes a range of YouTube-focused tools via the MCP interface. It can search for videos, fetch transcripts, retrieve video details, pull thumbnails, list comments, and explore channel data such as playlists and sections. Use the server by pointing your MCP host to the running container (for the Docker setup above, the server is available at http://localhost:8085). The provided tools are named after the YouTube resource they operate on, for example youtube_search, youtube_transcript, youtube_video_details, youtube_video_thumbnails, youtube_video_comments, youtube_channel_info, youtube_channel_playlists, youtube_channel_sections, youtube_playlist_items, youtube_activities, and youtube_video_categories. To use a tool, send a request through the MCP host to the corresponding tool endpoint on the YouTube MCP server, and provide necessary parameters such as video ID, channel ID, or search query. The server relies on a YOUTUBE_API_KEY for access, which you provide via the YOUTUBE_API_KEY environment variable when starting the container. When connected, you can leverage these capabilities to build chat-based search experiences, data gathering flows, or assistance that references YouTube content.

How to install

Prerequisites: Docker installed on your host. A YouTube Data API key with appropriate access enabled.

  1. Obtain a YouTube Data API key from the Google Cloud Console and ensure the YouTube Data API is enabled for your project.
  2. Start the MCP server using Docker:
# Replace <your_api_key_here> with your YouTube API key
docker run -e YOUTUBE_API_KEY=<your_api_key_here> -p 8085:8080 codewizard01/youtube-mcp:latest

This runs the container and exposes the MCP server on port 8085 (host) mapped to port 8080 inside the container.

  1. Verify the server is running by pinging or connecting to the MCP host from your MCP client.

Alternative (local Java build): Prerequisites: Java 17+ (or 24 as specified in README), Maven, Node.js if you plan to use Node tooling.

# Clone and build
mvn clean install
npm install

# Start via Java (Adjust the path to the built jar as needed)
java -jar target/youtube-mcp-0.0.1-SNAPSHOT.jar

Then configure your MCP host to point at http://localhost:8080 (as configured in application.properties).

Note: If you use the stdio integration, enable the properties shown in the README and run the jar with appropriate environment variables (e.g., YOUTUBE_API_KEY).

Additional notes

Tips and common issues:

  • Ensure your YOUTUBE_API_KEY has the YouTube Data API enabled and has sufficient quotas for the expected usage.
  • When using Docker, the port mapping (8085:8080) means MCP hosts should connect to http://localhost:8085.
  • For public data access (e.g., youtube_video_comments, youtube_activities), respect YouTube's terms of service and rate limits.
  • If you encounter CORS or networking issues, verify container network settings and that the MCP host can reach the container IP/port.
  • The server supports multiple tools; ensure you supply the correct IDs or query strings per tool (video ID, channel ID, playlist ID, etc.).
  • If you want to run via stdio, you can launch the jar and connect a host to its standard input/output channel; remember to set YOUTUBE_API_KEY as an environment variable.

Related MCP Servers

Sponsor this space

Reach thousands of developers