How to post to YouTube from Google Antigravity
An agent with the workspace open can upload the recording of what it built and write the YouTube title and description to go with it.
How do I post to YouTube from Google Antigravity?
Add the planpo.st MCP server to Google Antigravity, connect YouTube once in the dashboard, then ask. The first three steps are one-time.
- 1
Create an API key and add planpo.st to Antigravity
Make a scoped key in planpo.st under Settings. Add the local planpost entry to mcp_config.json, the shared one in ~/.gemini/config or .agents inside a workspace. Antigravity substitutes ${PLANPOST_API_KEY} from the environment, so export the key and leave it out of the file.
- 2
Confirm the server is connected
In the agent panel open the menu, then MCP Servers, then Manage MCP Servers, and check that planpost is listed.
- 3
Connect YouTube
Connect the YouTube channel in the dashboard under Connections. planpo.st asks Google for upload and read access only, and get_connection_link gives the agent a URL for you to open.
- 4
Know what the post needs
A YouTube post needs one video. Set platformSettings.youtube.title, or the title is cut from the post text, and set privacyStatus if the video should not be public.
- 5
Ask in the agent panel or the agy CLI
Say what to post and when. Antigravity finds the YouTube connection, creates the post, and tells you whether it was scheduled or kept as a draft, with the reason.
{
"mcpServers": {
"planpost": {
"command": "npx",
"args": ["-y", "planpost-mcp"],
"env": { "PLANPOST_API_KEY": "${PLANPOST_API_KEY}" }
}
}
}Config location: Shared: ~/.gemini/config/mcp_config.json · Per workspace: .agents/mcp_config.json. Replace pk_live_xxx with your own key.
Which transport does Google Antigravity use?
For Antigravity the tested route is the local server in mcp_config.json, with the key substituted from the environment. One entry covers the IDE, the agy CLI and the SDK, because all three read the same file.
- Antigravity substitutes ${VAR_NAME} from the environment, so export PLANPOST_API_KEY in your shell rather than pasting the key into the file.
- In the IDE you can reach the same file via the agent panel: ... menu -> MCP Servers -> Manage MCP Servers -> View raw config.
- Custom servers sit alongside the built-in MCP Store; a server added in the raw config appears with the store-installed ones.
The full walkthrough is on the Google Antigravity setup page.
What can Google Antigravity do on YouTube?
It can upload a video or a Short with a title, description, tags, category, visibility and the made-for-kids flag. It cannot add the video to a playlist or publish anything that is not a video.
Video
One video file per post, with title up to 100 characters and description up to 5,000.
Short
60 spostType "short". A vertical video of 60 seconds or less is treated as a Short without it. #Shorts is added to the title when it is not already there.
Visibility
public, unlisted or private through privacyStatus. Unlisted is handy for a link you send to a client before the real release.
Not available
limitsPlaylists, because the connection has upload and read scopes only. Community posts and image posts.
YouTube needs a video file on every post, and Antigravity can take it from disk: it calls upload_media for a presigned URL, PUTs the file there with a shell command, and passes the returned asset into create_post. Files already uploaded come back from list_media, ready to reuse.
Which settings does a YouTube post take?
YouTube reads the most settings of any network here, seven of them, and all are optional. Two deserve attention before the first upload: title, and privacyStatus, which defaults to public.
| Field | Allowed values | If you leave it out | Worth knowing |
|---|---|---|---|
| platformSettings.youtube.title | Text, cut to 100 characters | The post text, cut to 100 characters, then the file name | Missing returns the warning youtube_title_missing. The post is still scheduled. |
| platformSettings.youtube.description | Text, cut to 5,000 characters | The post text | Links in descriptions are clickable. |
| platformSettings.youtube.privacyStatus | "public", "unlisted" or "private" | "public" | The key is privacyStatus. A key called visibility is not read, and the video goes out public. |
| platformSettings.youtube.tags | Array of strings | No tags | Sent as given. |
| platformSettings.youtube.categoryId | A YouTube category ID as a string | "22", People & Blogs | Science & Technology is "28". |
| platformSettings.youtube.madeForKids | true or false | false | Sent as the self-declared made-for-kids flag. |
| platformSettings.youtube.isShort | true or false | Set from postType "short" | Also true when the video is vertical and 60 seconds or less. |
| media, platformMedia.youtube | One video | None, required | No media saves the post as a draft with media_required, images only with video_required. |
What do I type to post to YouTube from Google Antigravity?
Plain requests work. Each example lists the tool calls Google Antigravity makes in response.
1. Upload, unlisted first
You say
The clip is in the workspace under recordings/demo.mp4. Upload it to YouTube as unlisted for Tuesday 17:00, title "How the approval flow works", description from the README, tags planpost, mcp, scheduling.
Tool calls
upload_media({ filename: "demo.mp4", contentType: "video/mp4", size: <bytes> })
PUT <file> to the returned URL (shell)
create_post({ content: "<description text>", platformSettings: { youtube: { title: "How the approval flow works", privacyStatus: "unlisted", tags: ["planpost", "mcp", "scheduling"], categoryId: "28" } }, media: [<video>], connectionIds: ["<youtube id>"], schedule: "tuesday 17:00" })One scheduled upload that will be unlisted. Leave privacyStatus out and the same call publishes it to everyone.
2. A Short
You say
The clip is in the workspace under recordings/demo.mp4. Schedule it as a YouTube Short for tomorrow 07:00, title "One prompt, seven networks".
Tool calls
upload_media({ filename: "demo.mp4", contentType: "video/mp4", size: <bytes> })
PUT <file> to the returned URL (shell)
create_post({ content: "<one line>", postType: "short", platformSettings: { youtube: { title: "One prompt, seven networks" } }, media: [<video>], connectionIds: ["<youtube id>"], schedule: "tomorrow 07:00" })A scheduled Short. The published title reads "One prompt, seven networks #Shorts", because the tag is appended when missing.
3. A video rendered from a template
You say
Look at what changed on this branch. Pick the strongest line, render it with a quote video template in 9:16, and schedule the result to YouTube as a Short on Friday 12:00.
Tool calls
list_video_templates()
create_video({ templateId: "<quote template>", fields: { quoteText: "..." }, aspectRatio: "9:16" })
get_video_status({ id: "<render id>" })
create_post({ content: "<caption>", postType: "short", platformSettings: { youtube: { title: "<title>" } }, media: [<rendered video>], connectionIds: ["<youtube id>"], schedule: "friday 12:00" })A rendered vertical video and a scheduled Short, with no camera and no file on your side. The agent polls get_video_status until the render reports completed.
What stops a YouTube post from Google Antigravity?
The tag on a card is the code that comes back in the tool result.
Public unless you say otherwise
privacyStatus defaults to public. If the plan is to review the upload first, say unlisted or private in the prompt.
Video only, one file
video_requiredThe first attachment must be a video. A post with only images is saved as a draft.
Titles stop at 100 characters
youtube_title_missingLonger titles are cut. With no title, the post text is used and cut the same way, which rarely reads like a title.
#Shorts is added for you
On a Short the tag is appended to the title, and the title is trimmed to make room inside the 100.
No playlists
Adding to a playlist needs a broader Google scope than planpo.st requests. Do that step in YouTube Studio.
Language is sent as English
The upload sets the default language to en. For a channel in another language, correct it in YouTube Studio after publishing.
One config, three surfaces
AntigravitySince 2.x the IDE, the agy CLI and the SDK read the same mcp_config.json. Add planpost once and an agent started from any of them has the tools, which also means any of them can post.
Can Google Antigravity tell me what a YouTube post earned?
Yes, through the description. Links in a YouTube description are clickable, so a tracked link there gives clicks that payments are matched to, and a video keeps being found for months. get_revenue_overview returns totals and recent transactions. App makers who publish demos usually read this next to RevenueCat.
Google Antigravity and YouTube: questions people ask
- Will the video be public as soon as it publishes?
- Yes, unless platformSettings.youtube.privacyStatus says "unlisted" or "private". The default is "public".
- How does it decide a video is a Short?
- postType "short" makes it one. So does a vertical video of 60 seconds or less. Either way #Shorts is added to the title.
- What happens when Antigravity sends a YouTube post that breaks a rule?
- It is told at once. The usual case on YouTube is a post with images and no video: the post is kept as a draft and the tool result carries video_required plus the fix, which Antigravity applies with update_post.
- Is planpo.st in Antigravity's MCP Store?
- Not today. It goes in as a custom server through the raw config and then shows up next to the store-installed ones. The YouTube tools work the same either way.
- Can an autonomous agent publish without me?
- It can if the key allows it, so decide that with the key. A key that requires approval turns each YouTube post into a request with an approve link, and the agent can carry on with other work while it waits.
Keep going
YouTube from other agents
Other networks from Antigravity