YouTube MCP Server
@Tisik79
A Media Control Protocol server for YouTube integration
Overview
What is YouTube MCP Server?
The YouTube MCP Server is a Media Control Protocol server for YouTube integration that enables controlling YouTube playback across multiple devices. It provides real-time synchronization, video search, and playback control via a web interface.
How to use YouTube MCP Server?
Clone the repository, install dependencies with npm install, create a .env file with a YouTube API key, and start the server with npm start. Open http://localhost:3000 in a browser to access the client interface. Use the search function to find videos and control playback with play, pause, seek, volume, and mute commands.
Key features of YouTube MCP Server
- Play, pause, and control YouTube videos from any device
- Synchronize playback across multiple connected clients
- Search YouTube videos directly from the interface
- Control volume and playback position in real time
- Real-time updates using WebSockets via Socket.io
- Simple and intuitive web-based user interface
Use cases of YouTube MCP Server
- Control a shared YouTube playlist from multiple devices in a party or classroom setting
- Synchronize video playback between different screens for a unified experience
- Remotely manage YouTube playback on a central display from a mobile phone
- Collaborate on video selections and playback control with multiple users
FAQ from YouTube MCP Server
What are the runtime requirements?
Node.js (v14 or higher), npm (v6 or higher), and a valid YouTube Data API key are required.
How do I get a YouTube API key?
Obtain one from the Google Cloud Console by creating a new project, enabling the YouTube Data API v3, and generating API credentials.
How does the server synchronize playback across clients?
When a client issues a play, pause, seek, or volume command, the server broadcasts the event to all other connected clients using Socket.io WebSocket events.
What API endpoints are available?
The server provides endpoints to get video information (/api/video/:videoId), search videos (/api/search?q=query), and list connected clients (/api/clients).
What should I do if I encounter connection issues?
Ensure your firewall allows connections on the server's port and that your YouTube API key is correctly set in the .env file. Some videos may not play if embedding is disabled.