clappia-dev/youtube-mcp
If you are the rightful owner of youtube-mcp 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.
A Model Context Protocol (MCP) server implemented in Python for downloading videos from temporary URLs and uploading them to YouTube using Claude Desktop.
check_auth_status
Checks if you're authenticated with YouTube
authenticate
Authenticates with YouTube using OAuth2
upload_to_youtube
Download a video from a public URL and uploads a video to YouTube
YouTube Upload MCP Server (Python)
A Model Context Protocol (MCP) server implemented in Python that allows Claude Desktop to download videos from temporary URLs and upload them to YouTube.
Features
- OAuth2 authentication with YouTube
- Check YouTube Authentication Status
- Download videos from public URLs
- Upload videos to YouTube
Prerequisites
- Python 3.7+
- YouTube API credentials (OAuth 2.0 Client ID and Client Secret)
- Claude Desktop
- uv - Fast Python package installer and resolver
Installation
- Clone or download this repository
- Install dependencies:
uv venv
source .venv/bin/activate # Update the cmd as per your shell
uv sync
- Register a new project in the Google Cloud Console
- Enable the YouTube Data API v3
- Create OAuth 2.0 credentials (Web application type)
- Set the authorized redirect URI to
http://localhost:8080/oauth2callback
- Set the authorized redirect URI to
Adding to Claude Desktop
Edit your Claude Desktop configuration file:
- Windows:
%APPDATA%\Claude\claude_desktop_config.json
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json
Add the following configuration:
{
"mcpServers": {
"youtube-upload": {
"command": "uv",
"args": [
"--directory",
"/folder/containing/youtube-upload-mcp",
"run",
"youtube-upload-mcp.py"
]
}
}
}
Replace /folder/containing/youtube-upload-mcp
with the actual path of the cloned repository.
How It Works
Authentication Flow
When you authenticate with YouTube:
- The MCP server generates an OAuth authorization URL
- It starts a local web server on port 8080 to handle the callback
- It opens a browser window where you can sign in to Google and authorize the application
- After authorization, Google redirects to your local server with the auth code
- The server exchanges the code for access and refresh tokens
- Tokens are saved locally for future use
Tool Functions
The server provides the following tools:
- check_auth_status: Checks if you're authenticated with YouTube
- authenticate: Authenticates with YouTube using OAuth2
- upload_to_youtube: Download a video from a public URL and uploads a video to YouTube
Using the MCP Server with Claude
After configuring Claude Desktop, restart the application. You can then use the following commands with Claude:
-
Check authentication status: Ask Claude to check if you're authenticated with YouTube.
-
Authenticate with YouTube: Ask Claude to authenticate with YouTube, and enter your Google credentials when prompted
-
Upload a video to YouTube: Ask Claude to download any video from internet and upload it to YouTube.
Example Prompts
Can you check if I'm authenticated with YouTube?
Please authenticate with YouTube.
Please download and upload this video to YouTube:
- URL: [VIDEO_URL]
- Title: My Test Video
- Description: This is a test video uploaded via MCP server
- Tags: test, mcp, claude
- Privacy: private
Security Notes
- Your OAuth credentials are sensitive information. Do not share them with others.
- Tokens are stored locally in your home directory.
- The server only works on your local machine.
Troubleshooting
- If authentication fails, make sure your OAuth credentials are correct and properly configured in the Google Cloud Console.
- If video download fails, ensure the URL is publicly accessible.
- If upload fails, check your YouTube account status and quota limits.