Skip to main content
Glama
AI YouTube Studio MCP Server

AI YouTube Studio MCP Server

by DAMONIC7
README.md
# AI YouTube Studio MCP Server

An end-to-end **Model Context Protocol (MCP)** server that turns local video-production, voice-cloning, B-roll harvesting, and YouTube upload pipelines into standardized AI agent tools.

## Features (MCP Tools)

- `analyze_channel_dna`: Analyzes historical channel performance, optimal video duration, and viral outliers.
- `generate_viral_script`: Generates structured short-form scripts and predicts viral scores.
- `synthesize_voice`: Neural TTS via `edge-tts` or local AI voice cloning via Coqui `XTTS-v2`.
- `search_broll_video`: Searches and optionally downloads real-life (non-gameplay) 1080p B-roll clips via `yt-dlp`.
- `produce_youtube_short`: End-to-end Shorts production pipeline (script + voice + B-roll + captions + render).
- `upload_youtube_video`: Uploads and schedules videos to YouTube (defaults to `privacy="private"` for safety).

## Setup

1. Install dependencies:
   ```bash
   pip install -r requirements.txt
   ```

2. Configure environment variables:
   ```bash
   cp .env.example .env
   ```
   Edit `.env` with your local paths:
   - `STUDIO_BASE_DIR`: Path to your local video engine directory
   - `VOICE_REF_AUDIO`: Optional `.wav` reference file for `XTTS-v2` voice cloning
   - `DEFAULT_CHANNEL_ID`: Optional default YouTube channel identifier

3. Run the MCP server:
   ```bash
   python server.py
   ```

## Security Notice

- Never commit `.env`, `client_secrets.json`, `youtube_token.json`, or personal audio files.
- `.gitignore` is preconfigured to exclude all credentials, tokens, and generated media outputs.