adamanz/youtube-mcp-server
If you are the rightful owner of youtube-mcp-server and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
The YouTube MCP Server is a tool that facilitates video uploads to YouTube using the Model Context Protocol, compatible with Claude Desktop and other MCP clients.
YouTube MCP Server
An MCP (Model Context Protocol) server that enables uploading videos to YouTube through Claude Desktop or any MCP-compatible client.
Features
- 📹 Upload Videos: Upload video files to YouTube with customizable metadata
- 🔐 OAuth2 Authentication: Secure authentication with YouTube API
- 📊 Quota Checking: Monitor your YouTube API usage
- 📝 Category Listing: Browse available video categories
- 🔧 Easy Setup: Built-in credential configuration tool
Prerequisites
- Python 3.10 or higher
- A Google Cloud Project with YouTube Data API v3 enabled
- OAuth2 credentials from Google Cloud Console
- Claude Desktop (or another MCP client)
Setup Instructions
1. Install Dependencies
# Clone or download this repository
cd youtube-mcp-server
# Create virtual environment
python -m venv venv
# Activate virtual environment
# On macOS/Linux:
source venv/bin/activate
# On Windows:
# venv\Scripts\activate
# Install required packages
pip install -r requirements.txt
2. Set Up Google Cloud Credentials
- Go to Google Cloud Console
- Create a new project or select existing one
- Enable YouTube Data API v3:
- Go to "APIs & Services" > "Library"
- Search for "YouTube Data API v3"
- Click Enable
- Create OAuth2 credentials:
- Go to "APIs & Services" > "Credentials"
- Click "Create Credentials" > "OAuth client ID"
- Choose "Desktop app" as application type
- Download the credentials JSON file
3. Configure Claude Desktop
Add the server to your Claude Desktop configuration:
macOS/Linux:
# Open config file
code ~/Library/Application\ Support/Claude/claude_desktop_config.json
Windows:
code $env:AppData\Claude\claude_desktop_config.json
Add this configuration:
{
"mcpServers": {
"youtube-uploader": {
"command": "python",
"args": [
"/ABSOLUTE/PATH/TO/youtube-mcp-server/youtube_uploader.py"
]
}
}
}
4. First-Time Authentication
- Restart Claude Desktop
- Use the
setup_youtube_auth
tool with your OAuth2 credentials:- Provide client_id, client_secret, and project_id from downloaded JSON
- Try uploading a video - a browser window will open for authentication
- Grant permissions to your YouTube account
Available Tools
1. upload_video
Upload a video file to YouTube.
Parameters:
file_path
(required): Path to video filetitle
(required): Video titledescription
: Video descriptionkeywords
: Comma-separated tagscategory_id
: YouTube category ID (default: 22)privacy_status
: "private", "unlisted", or "public" (default: private)made_for_kids
: Boolean for COPPA compliance
Example:
Upload the video at /Users/me/video.mp4 with title "My Amazing Video" and description "This is a test upload"
2. check_upload_quota
Check your YouTube API quota usage and channel information.
3. list_video_categories
List available YouTube video categories for a specific region.
Parameters:
region_code
: ISO country code (default: US)
4. setup_youtube_auth
Configure OAuth2 credentials for YouTube API access.
Important Notes
- Quota Limits: YouTube API has daily quotas. Each upload costs ~1,600 units out of 1,600,000 daily units.
- File Size: Large files may take time to upload. The server uses resumable uploads.
- Privacy: Videos upload as "private" by default for safety.
- Authentication: OAuth2 tokens are stored locally in
token.json
.
Troubleshooting
- "Missing credentials.json": Run
setup_youtube_auth
first - Authentication errors: Delete
token.json
and re-authenticate - Upload failures: Check file path, size, and format
- Quota exceeded: Wait 24 hours for quota reset
Security
- Keep your
credentials.json
andtoken.json
files secure - Don't commit these files to version control
- OAuth2 tokens expire; the server will refresh them automatically
License
MIT License