Youtube MCP logo

Youtube MCP

MCP server for YouTube creator-ops with a ComfyUI bridge for AI thumbnail generation.

Install Youtube MCP

Pick your client, then add it in one click or paste the config.

STDIONode.js
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "youtube-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@miller-joe/youtube-mcp"
      ]
    }
  }
}

Settings โ†’ Developer โ†’ Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.

We couldnโ€™t confirm it starts correctly

The install command installed and started the server, which then stopped for configuration (such as an API key) that our sandbox does not have โ€” expected for servers that connect to your account.

npx -y @miller-joe/youtube-mcp

No response to initialize.

This is an experimental automated check and can have false negatives โ€” missing environment variables, a slow cold install, etc. It doesnโ€™t necessarily mean somethingโ€™s wrong. Last checked .

Overview

Tools16

What Youtube MCP lets your agent do. Expand a tool for its parameters.

Self-reported~272 tokens of context

Security & health

What it can reach and how reliably it runs โ€” from our own checks, not the maintainerโ€™s claims.

ActiveLast checked

Recent health check succeeded.

16/16 checks healthy over the last 78d

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 15h ago via OSV.dev ยท @miller-joe/youtube-mcp (npm)

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks โ€” not a rating.

GitHub stars1Stargazers on the source repository.
npm downloads288Package downloads in the last 30 days.
Last commit5mo agoMost recent push to the default branch.
Install checkRunsOur sandbox started it; it then asked for an API key or config.
Tools exposed16Callable tools this server registers over MCP.

From the project README

youtube-mcp

OAuth-authenticated YouTube MCP for channel owners. Edit video metadata, reply to and moderate comments, manage playlists, query channel analytics, and generate or set AI thumbnails via a ComfyUI bridge. Goes beyond the read-only Data API v3 wrappers that dominate this space.

youtube-mcp MCP server

GitHub Sponsors Ko-fi

The pitch

Most existing YouTube MCPs use an API key against Data API v3. Search videos, fetch public metadata, read-only. This one uses OAuth 2.0 (Authorization Code + PKCE) so it can actually write to your channel: update video titles, descriptions and tags, reply to comments, moderate spam, manage playlists. It also hits the separate YouTube Analytics API for channel stats, and generates a thumbnail via ComfyUI and pushes it to YouTube in a single MCP call.

Code
Claude, use generate_and_set_thumbnail on video abc123:
  prompt: "cyberpunk hacker at keyboard, neon blue and pink, high contrast"

ComfyUI renders 1280ร—720, youtube-mcp fetches the bytes, and POSTs to thumbnails.set. Done.

Install

bash
# npx, no install
npx @miller-joe/youtube-mcp --help

# Docker
docker run -p 9120:9120 \
  -e YOUTUBE_CLIENT_ID=... \
  -e YOUTUBE_CLIENT_SECRET=... \
  -e YOUTUBE_TOKEN_FILE=/token/token.json \
  -v $PWD/token:/token \
  ghcr.io/miller-joe/youtube-mcp:latest

Setup: Google Cloud one-time (~10 min)

  1. Google account plus YouTube channel. Use a personal account, not a workspace one you might lose.

  2. Google Cloud project at https://console.cloud.google.com. Call it whatever you want (e.g. youtube-mcp).

  3. Enable APIs:

    • YouTube Data API v3
    • YouTube Analytics API
  4. OAuth consent screen: External, App name, support email. In Scopes, add:

    • youtube.upload
    • youtube.force-ssl
    • yt-analytics.readonly
  5. Stay in Testing mode. Add yourself as a test user (required). As the project owner, your refresh token won't expire.

  6. Create OAuth Client ID: Application type = Desktop app. Download the JSON.

  7. Run the interactive auth flow:

    Terminal
    npx @miller-joe/youtube-mcp --auth --client-secret-file ./client_secret.json
    

    A browser opens, you log in to the Google account tied to your YouTube channel, and grant the requested scopes. On success, a refresh token is saved to ~/.config/youtube-mcp/token.json.

  8. Start the server:

    Terminal
    npx @miller-joe/youtube-mcp --client-secret-file ./client_secret.json
    

    Or provide the client credentials via env: YOUTUBE_CLIENT_SECRET_FILE, or YOUTUBE_CLIENT_ID + YOUTUBE_CLIENT_SECRET.

Connect an MCP client

Terminal
claude mcp add --transport http youtube http://localhost:9120/mcp

Or point your MCP gateway at the Streamable HTTP endpoint.

Configuration

CLI flagEnv varDefaultNotes
--client-secret-fileYOUTUBE_CLIENT_SECRET_FILE(none)Path to Google OAuth JSON
--client-idYOUTUBE_CLIENT_ID(none)Alternative to the secret file
--client-secretYOUTUBE_CLIENT_SECRET(none)Alternative to the secret file
--token-fileYOUTUBE_TOKEN_FILE~/.config/youtube-mcp/token.jsonRefresh token storage
--hostMCP_HOST0.0.0.0Bind host (HTTP mode only)
--portMCP_PORT9120Bind port (HTTP mode only)
--stdioMCP_TRANSPORT=stdio(unset)Speak MCP over stdio instead of HTTP. Use when launched as a subprocess by a stdio-first MCP client (Claude Desktop, mcp-inspector).
--comfyui-urlCOMFYUI_URL(unset, bridge disabled)ComfyUI HTTP URL for bridge tools
(no flag)COMFYUI_DEFAULT_CKPTsd_xl_base_1.0.safetensorsDefault checkpoint for bridge tool

Transports

The server speaks streamable HTTP by default (great for Claude Code, MetaMCP, raw fetch). Pass --stdio (or set MCP_TRANSPORT=stdio) to switch into stdio mode, which is what stdio-first clients like Claude Desktop and the MCP Inspector expect:

json
// claude_desktop_config.json
{
  "mcpServers": {
    "youtube": {
      "command": "npx",
      "args": ["-y", "@miller-joe/youtube-mcp", "--stdio"],
      "env": {
        "YOUTUBE_CLIENT_SECRET_FILE": "/path/to/client_secret.json",
        "YOUTUBE_TOKEN_FILE": "/path/to/token.json"
      }
    }
  }
}

Stdio mode skips the OAuth-token preflight check โ€” the server boots even without a stored token and surfaces auth errors at tool-call time. Run youtube-mcp --auth --client-secret-file <path> once in HTTP mode to seed the refresh token before pointing Claude Desktop at it.

Tools

Videos

  • list_my_videos: paginated list of the authenticated channel's uploads.
  • get_video: full detail for one video.
  • update_video_metadata: title, description, tags, category, privacy.
  • delete_video: permanently delete a video. Requires confirm_video_title to match the current title exactly, as a guard against deleting the wrong video.

Captions

  • list_captions: list caption tracks on a video (language, name, status, draft flag).
  • upload_caption: upload an SRT or WebVTT caption track to a video.
  • delete_caption: delete a caption track.

Shorts

  • list_my_shorts: find Shorts in recent uploads (filters by duration โ‰ค60s).
  • get_shorts_analytics: YouTube Analytics query restricted to Shorts (creatorContentType==SHORTS).

Playlists

  • create_playlist: create a playlist (default private).
  • add_to_playlist: add a video to an existing playlist.

Comments

  • list_comments: top-level comment threads on a video.
  • reply_to_comment: reply to a top-level comment.
  • moderate_comment: hold, approve, or reject a comment.

Analytics

  • query_channel_analytics: date-ranged metrics with optional dimensions and filters.

Bridge (when COMFYUI_URL is configured)

  • generate_and_set_thumbnail: generate a thumbnail via ComfyUI and set it on a video in one call.

Quota notes

YouTube Data API free tier = 10,000 units/day. Key operation costs:

  • videos.list, commentThreads.list: 1 unit each.
  • videos.update, comments.insert, thumbnails.set: 50 units each.
  • videos.insert (upload): 1,600 units, so about 6 uploads per day on the free tier.

Most creator-ops workflows stay well under the free cap.

Architecture

Code
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”     โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”     โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚  MCP client    โ”‚โ”€โ”€โ”€โ”€โ–ถโ”‚  youtube-mcp     โ”‚โ”€โ”€โ”€โ”€โ–ถโ”‚  YouTube APIs   โ”‚
โ”‚  (Claude etc.) โ”‚โ—€โ”€โ”€โ”€โ”€โ”‚  (this server)   โ”‚โ—€โ”€โ”€โ”€โ”€โ”‚  (Data/Analytics)โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜     โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜     โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                                โ”‚
                                โ”‚ (bridge tools only)
                                โ–ผ
                       โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
                       โ”‚  ComfyUI         โ”‚
                       โ”‚  (txt2img)       โ”‚
                       โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

OAuth refresh tokens are cached locally and refreshed just-in-time before expiry. The bridge tool downloads image bytes from ComfyUI internally, so ComfyUI does not need to be publicly reachable.

Development

bash
git clone https://github.com/miller-joe/youtube-mcp
cd youtube-mcp
npm install
npm run dev
npm run build
npm test

Requires Node 20+.

Roadmap

Shipped:

  • Videos: list, get, update metadata, delete with title-match confirm guard.
  • Captions: upload, list, delete.
  • Shorts: list_my_shorts (duration filter) and get_shorts_analytics (creatorContentType==SHORTS).
  • Playlists: create, add-to.
  • Comments: list, reply, moderate.
  • Analytics: channel analytics query.
  • ComfyUI thumbnail bridge: generate_and_set_thumbnail.

Planned:

  • Video upload (video_upload) with resumable-upload support.
  • Reporting API for bulk historical data exports.

License

MIT ยฉ Joe Miller

Support

If this saves you time, consider supporting development:

GitHub Sponsors Ko-fi

Reviews

No reviews yet โ€” be the first to share how it worked for you.

Frequently Asked Questions about Youtube MCP

youtube-mcp is an MCP server that connects OAuth-authenticated YouTube channel operations with a ComfyUI bridge for AI thumbnail generation. It can edit video metadata, reply to and moderate comments, manage playlists, query channel analytics, and generate or set thumbnails. It is intended for channel owners and supports YouTube Data and Analytics APIs.

youtube-mcp can update video titles, descriptions, and tags; reply to comments; moderate spam; manage playlists; query channel analytics; and generate or set thumbnails. Its OAuth 2.0 authentication enables write operations for the authorized YouTube channel.

Authenticate youtube-mcp by creating a Google Cloud OAuth desktop client, enabling the YouTube Data API v3 and YouTube Analytics API, configuring the required scopes, and running the interactive --auth flow. The flow opens a browser for consent and saves a refresh token to ~/.config/youtube-mcp/token.json by default.

youtube-mcp generates and sets AI thumbnails through a configured ComfyUI HTTP URL. Its bridge renders a 1280ร—720 image, fetches the resulting bytes, and posts them to YouTube with thumbnails.set in a single MCP operation.

Connect an MCP client to youtube-mcp through its Streamable HTTP endpoint at http://localhost:9120/mcp, or run it over stdio with --stdio or MCP_TRANSPORT=stdio. The server can be started with npx or Docker and uses port 9120 by default for HTTP.

Related MCP servers

Add a badge to your READMEShow itโ€™s listed โ€” live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewYoutube MCP AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/youtube-mcp?style=directory)](https://allmcps.com/mcp/youtube-mcp)
HTML Embed
<a href="https://allmcps.com/mcp/youtube-mcp"><img src="https://allmcps.com/api/badge/youtube-mcp?style=directory" alt="Youtube MCP on AllMCPs" /></a>