Post to YouTube from Claude Code

Upload, title, description, tags and thumbnail are all one chain from the terminal — and unlisted is the review state, because YouTube's API has no Studio draft.

Hermoso is a marketing MCP server: 301 tools over one OAuth’d endpoint that let an agent research the ads already running in a market, generate finished image and video ads, publish them, and build the paid campaigns behind them. Claude Code reaches all of it through one connection. This page is about one slice of that — what Claude Code can actually do on YouTube, and what YouTube will not let it do.

Connect Hermoso to Claude Code

  1. Create an API key. In Hermoso, open Settings → Agents & API keys and press + Create API key. It looks like hmk_… and carries real spend authority, so treat it like a password.
  2. Add the server.
    claude mcp add --transport http hermoso https://app.hermoso.ai/mcp \
      --header "Authorization: Bearer <your key>"
  3. Or run it over stdio if you would rather not hold an HTTP config:
    claude mcp add hermoso -e HERMOSO_TOKEN=hmk_… -- npx -y hermoso mcp
  4. Ask Claude Code for something. “Pull my three closest competitors’ longest-running ads and remix the best hook into a 9:16 video,” or “post this render to the channel.” The agent picks the tools; you approve the spend.

Both forms reach the same 301 tools. The HTTP form is the hosted server; the stdio form runs the published hermoso npm package locally and talks to the same account.

Then connect YouTube itself, once, under Settings → Connectors in Hermoso. That is an OAuth consent screen, so it is the one step that needs a browser — everything after it is a tool call.

The YouTube tools Claude Code gets

  • post_to_youtube — uploads a finished video with a title, a description of up to 5,000 characters, up to 30 tags, and a privacy setting.
  • schedule_post — queues the upload — with the description and tags carried through, which is not something to take for granted.
  • set_youtube_thumbnail — puts a designed thumbnail on the upload. It is the single biggest lever on click-through, and YouTube otherwise picks a frame more or less at random.
  • make_thumbnail — generates that thumbnail in the first place.
  • update_youtube_video / list_youtube_videos — edit an upload’s metadata, or list your own uploads — including unlisted and private ones a public search cannot see.
  • youtube_video_insights / youtube_channel — views, watch time, average view percentage and subscribers gained.
  • list_youtube_comments / reply_to_youtube_comment — read and answer comments as the channel.

The unit really is a video: post_to_youtube takes a videoUrl and there is no image path at all. Two smaller gates worth knowing before an automated upload: a Google project that has not been verified has videos.insert locked to private regardless of what you ask for, and custom thumbnails need a phone-verified channel.

YouTube limits worth knowing before you automate anything

TextA YouTube title is capped at 100 characters — and a scheduled item’s text becomes the title. The description is a separate field of up to 5,000 characters, carrying up to 30 tags. It is enforced when the post is created or queued — refused while you are still there to fix it, rather than silently cut on the way out.
VisibilityPublic, unlisted or private. There is no Studio draft — “YouTube’s API can upload as public, unlisted or private, but it cannot create a Studio draft”, so unlisted is the closest thing to a review state, and it is what an immediate post defaults to so an ad-ready upload is not accidentally public.
CarouselRefused, by name. “YouTube’s unit is a video, not a set of stills. Turn the slides into a video (Hermoso can stitch them) and post that instead, or drop YouTube from this post.” That is not a limitation Hermoso invented to avoid work — it is what YouTube is — and the refusal comes at enqueue, with the way forward attached, rather than as a silently posted first slide.
Which accountNone — YouTube publishes to the connected channel.

Try it in Claude Code

Ask for it in ordinary language — these are sentences, not a DSL:

“For each file in ./films, write a title under 100 characters and a full description, generate a thumbnail, upload unlisted, and write a CSV of video ids and URLs.”

That walks make_thumbnailpost_to_youtubeset_youtube_thumbnailyoutube_video_insights. Claude Code asks before it runs a tool, and the transcript is right there in the terminal — so a publish step is a line you can read before you press y.

Claude Code on YouTube: the part that bites

Batch uploads are where the metadata trap shows up: the caption becomes the title and it is capped at 100 characters, while the description is a separate 5,000-character field with up to 30 tags. Pass both explicitly. And check the channel’s state before the batch — an unverified Google project has uploads locked to private, and custom thumbnails need a phone-verified channel.

A 301-tool manifest is not free in context. For long unattended runs the hermoso CLI is the cheaper path: the agent shells out per command instead of carrying the whole manifest.

Research YouTube before you post

search_youtube searches the public YouTube index — which is a different question from “what have I uploaded”, and list_youtube_videos is the tool for that one. For a competitor’s film, analyze_video returns the voiceover, the on-screen text and the beat list with timestamps, which is what you actually want before rebuilding a hook.

The paid half

Hermoso’s Google Ads tools build search, display and Performance Max campaigns — the whole tree in one atomic operation, read back from Google before your agent narrates it — plus Keyword Planner volumes, conversion actions, and sitelinks and callouts created and attached. There is no YouTube video-campaign builder, and it would be wrong to imply one; a YouTube video asset can be uploaded and attached, but the campaign types Hermoso creates are search, display and Performance Max.

What Claude Code cannot do on its own

An agent with a budget is only useful if the blast radius is bounded, so the fence is in the server rather than in a prompt. Every ad campaign, ad set, ad group and ad is created paused, and the status switches that arm real money refuse to run without an explicit confirmation flag. Every render is quoted first — hermoso_capabilities publishes each model’s exact credit cost before anything spends — and credits are reserved before the first provider call and settled at the exact cost afterwards, so a failed dispatch refunds rather than leaving you billed for nothing. Deletes are confirm-gated too, and every campaign tree is read back from the ad platform before your agent tells you what it built.

One step is deliberately not headless: linking an account is an OAuth consent screen, so you connect the channel once in a browser. Everything after that is a tool call.

The rest of the matrix

From Claude Code, post to: Facebook · Instagram · Threads · TikTok · X · LinkedIn · Pinterest — or see everything Claude Code can publish to.

Post to YouTube from: Claude · ChatGPT · Cursor · Codex · Cline · OpenClaw · Hermes · Claude Code marketing

Frequently asked questions

Can Claude Code post to YouTube?

Yes, through Hermoso's MCP server. Create an API key in Hermoso under Settings → Agents & API keys, then add https://app.hermoso.ai/mcp to Claude Code with an Authorization: Bearer header. Claude Code then has 301 tools, including the ones that publish to YouTube — and the ones that research the ads already running in your market and render the creative in the first place.

How do I connect YouTube to Claude Code?

Two steps, once each. Create an API key in Hermoso under Settings → Agents & API keys, then add https://app.hermoso.ai/mcp to Claude Code with an Authorization: Bearer header. Then connect YouTube inside Hermoso under Settings → Connectors, which is an OAuth consent screen in a browser. After that Claude Code publishes to YouTube as an ordinary tool call.

Can Claude Code post privately or as a draft to YouTube?

Yes — public, unlisted or private. There is no Studio draft in YouTube’s API, so unlisted is the review state, and an immediate post defaults to it. Hermoso refuses a visibility YouTube cannot honour at the moment you ask for it, rather than quietly publishing something weaker.

What does it cost to post to YouTube from Claude Code?

Publishing to YouTube costs no credits; YouTube charges nothing per API call. Credits are spent generating the video and the thumbnail. Plans are $19, $49 and $149 a month for 1,000, 3,000 and 10,000 credits, and every feature is on every plan including Free — the only exception is enterprise SSO.

Start free — 25 credits at signup and 250+ more to earn, and every feature on every plan.

Start free   See pricing