How to post to TikTok from Gemini CLI
gemini mcp add -s user --transport http postwire https://postwire.io/api/mcp, type /mcp auth postwire to sign in, connect your TikTok account once on TikTok's own page, and ask "post ./clips/demo.mp4 to TikTok, public, with a caption from CHANGELOG.md". Gemini writes the caption with generate_posts, asks who can see the post (TikTok requires the owner to choose), and publishes it with post_to_social or queues it with schedule_post, up to 365 days ahead, through TikTok's official Content Posting API. PostWire's TikTok app is already audited, so you build no developer app and pass no review, and the free plan includes TikTok: 1 business, 10 posts a month, 5 AI drafts a day, 2 networks per post, no card.Gemini CLI asks before it runs each PostWire tool, so nothing reaches your TikTok until you say yes. A scheduled TikTok goes out from PostWire's servers with your terminal closed, and Gemini never sees your TikTok password: you sign in on TikTok's page and allow PostWire to post for you.
Updated . Written from PostWire's own code; vendor prices read on Dec 2, 2026. Live networks: TikTok, Instagram, YouTube, LinkedIn (personal profiles), Facebook Pages, Bluesky, Mastodon, Telegram, Discord, and X on paid plans.
Set it up and post, step by step
Prompt to copy once TikTok is connected: Write a TikTok caption for ./clips/v3.1-demo.mp4 from what is in CHANGELOG.md, show it to me, and schedule it public for Friday at 7pm my time.
- Add PostWire to Gemini CLI
In your terminal (not inside Gemini) run
gemini mcp add -s user --transport http postwire https://postwire.io/api/mcp.-s usersaves it in~/.gemini/settings.jsonfor every folder; without it Gemini CLI saves it for the current project only. The URL is PostWire's hosted MCP server: there is nothing to install. - Sign in
Start
geminiand type/mcp auth postwire. Your browser opens PostWire's sign-in: your email and a 6-digit code, which also creates a free PostWire account if you have none, with no password and no card./mcpthen lists postwire as connected. - Connect your TikTok account
Ask "connect my TikTok". Gemini calls
create_connect_linkand prints a one-hour link; open it, sign in on TikTok's own page and allow PostWire to post. You do this once per account. - Give it the video, or photos
TikTok fetches the file from a link, so a file on your disk goes through an upload page: Gemini asks for one (
create_upload_link, valid 24 hours, up to 100 MB on the free plan and 1 GB on paid plans), you pick the file there, andget_uploaded_filehands Gemini its link forvideo_url. Photos instead of a video make a TikTok photo post of up to 35 images (PNG is turned into JPEG for you). No video yet?make_video_from_textturns a few lines into an 8-12 second vertical MP4 (1080×1920) to show you before anything is posted. - Ask for the caption and pick who sees it
"Write the caption."
generate_postsreturns a draft and publishes nothing: 150 to 300 characters with the hook in the first 80 to 100, at most 5 hashtags inside the caption and one short call to action, well within TikTok's 2,200 characters. Then say who can see it: public, friends (mutual followers) or private. TikTok asks the account owner to choose this for every post; if nobody chooses, PostWire posts it private and says so in the result. - Publish now, or schedule it
Say "post it" and Gemini calls
post_to_social. Say "schedule it for Friday at 7pm" and it callsschedule_post, up to 365 days ahead, or withrun_at: "next_slot"for your next free posting hour. Gemini CLI shows the call and waits for you to allow it. This is the call:{ "name": "schedule_post", "arguments": { "platforms": ["tiktok"], "per_platform": { "tiktok": { "text": "We cut our build from 9 minutes to 2. Here is the one change. #devtools #ci #buildinpublic" } }, "video_url": "https://postwire.io/m/…/v3.1-demo.mp4", "privacy": "public", "run_at": "2026-12-04T19:00:00-05:00" } } - Get the link
TikTok processes the video after the call returns. Gemini calls
get_post_statuswith the returned id until it has the TikTok link, usually within a minute or two. If TikTok refuses the video, the result carries acode, what happened and the fix.
"What's scheduled on TikTok?" calls list_scheduled_posts and "cancel Friday's TikTok" calls cancel_scheduled_post; the same queue is on the dashboard's Queue page. Prefer to set it up by hand? Open the dashboard, connect TikTok under Accounts and copy your key under API & MCP. Every Gemini CLI option: Gemini CLI setup.
Ways to post to TikTok from Gemini, side by side
How each service plugs into Gemini CLI and what TikTok costs to start, read on its own Gemini, TikTok and pricing pages on Dec 2, 2026.
| Service | How it plugs into Gemini CLI | Sign-in | TikTok on the free start | Cheapest paid plan |
|---|---|---|---|---|
| PostWire | gemini mcp add with https://postwire.io/api/mcp | /mcp auth postwire in the browser, or a key header | Yes — free plan: 1 business, 10 posts a month, 5 AI drafts a day, 2 networks per post, no card | $19/mo ($15.20 billed yearly) — 3 businesses, every network in each post |
| Postiz | gemini extensions install with its GitHub extension | Browser sign-in on the first call | 7-day free trial | $29/mo ($23 billed yearly) — 5 channels |
| Upload-Post | A block in ~/.gemini/settings.json with its MCP URL | An API key in a header | No — "The Free plan covers the other networks but not TikTok" | $24/mo ($16 billed yearly) — 5 profiles |
Checked on Dec 2, 2026 (2026-12-02) on each vendor's own pricing or docs page, linked in the first column and below. Monthly billing in USD unless noted. "Not listed" means we could not find it on their page, not that it is missing.
Where PostWire is ahead
- TikTok on the free plan: 10 posts a month, no card and no time limit, MCP included. Upload-Post's free plan leaves TikTok out, and Postiz starts with a 7-day trial.
- The lowest monthly price here: $19 a month for 3 businesses, each with its own TikTok account. Upload-Post $24 for 5 profiles, Postiz $29 for 5 channels.
- Sign in without pasting a key into a config file:
/mcp auth postwireopens the browser, and the key is there for scripts that need it. - The caption is written for TikTok:
generate_postswrites a hook-first caption and, from the same idea, the YouTube title and the other networks' versions in the same request. - No video yet is fine:
make_video_from_textmakes an 8-12 second vertical MP4 from a few lines, to post to TikTok or YouTube Shorts. - A person approves what Gemini queued: on paid plans, approval rules hold the post until you approve it from an emailed link.
- Postiz — Schedule Social Media Posts with Gemini ("One command installs the Postiz extension in Gemini CLI": gemini extensions install https://github.com/gitroomhq/postiz-agent; "Gemini opens your browser to sign in to Postiz on the first call"; TikTok in its platform list; "Postiz starts with a 7-day free trial, then plans run from $29 per month for 5 channels"): postiz.com/gemini
- Postiz pricing ("Every plan starts with a 7-day free trial"; Standard $29 a month, 5 channels; $23 a month on annual billing): postiz.com/pricing
- Upload-Post — Post to Social Media with Gemini ("Add one block to ~/.gemini/settings.json" with httpUrl https://mcp.upload-post.com/mcp and an "Authorization: ApiKey" header): www.upload-post.com/gemini-social-media/
- Upload-Post — TikTok MCP server ("TikTok needs a paid plan: from $24/month, or $16/month billed yearly. The Free plan covers the other networks but not TikTok"): www.upload-post.com/mcp/tiktok/
- Upload-Post llms-full.txt (Free: 10 uploads a month, "platforms without TikTok"; Basic $24 a month, $16 billed yearly, 5 profiles): www.upload-post.com/llms-full.txt
- Gemini CLI docs — MCP servers (gemini mcp add, --scope, --transport, /mcp auth, httpUrl, headers, trust, includeTools): github.com/google-gemini/gemini-cli/blob/main/docs/tools/mcp-server.md
- Gemini CLI docs — Custom commands (.gemini/commands/*.toml, prompt, {{args}}, @{…} file injection with multimodal support, /commands reload): github.com/google-gemini/gemini-cli/blob/main/docs/cli/custom-commands.md
What to say in Gemini CLI, and what TikTok receives
| You say | Gemini calls | TikTok receives |
|---|---|---|
| "Post ./clips/demo.mp4 to TikTok, public" | create_upload_link, generate_posts, then post_to_social | The video with its caption, visible to everyone |
| "Post the six screenshots in ./assets as a carousel" | create_upload_link, then post_to_social with the images | A photo post of 6 images (up to 35) |
| "Make a 10-second clip from these release notes" | make_video_from_text, then post_to_social | An 8-12 second vertical video |
| "Is this export sharp enough for TikTok?" | check_video_quality | Nothing: it reads the file and reports |
| "Schedule it for Friday at 7pm" | schedule_post with run_at and privacy | The same post, at that time |
| "Post it to TikTok and YouTube Shorts" | post_to_social with both networks | The same file on both, each with its own text |
Source: PostWire's MCP server and TikTok publisher, and Gemini CLI's MCP docs, read Dec 2, 2026. Every TikTok tool and limit: TikTok MCP server.
Make it one command: /tiktok in Gemini CLI
Gemini CLI turns a prompt you use often into a slash command: a TOML file in your project's .gemini/commands/ folder, where tiktok.toml becomes /tiktok. Its docs say project commands "can be checked into version control to be shared with your team", so everyone who posts for the product types the same thing and gets the same steps. Save this as .gemini/commands/tiktok.toml:
description = "Draft a TikTok caption from the changelog and schedule the clip"
prompt = """
Post this clip to TikTok with PostWire: {{args}}
Take the facts from the changelog below and from nowhere else:
@{CHANGELOG.md}
1. Ask me for the file through create_upload_link if it is on my disk.
2. Write the caption with generate_posts and show it to me.
3. Ask me who can see the post: public, friends or private.
4. Call schedule_post for tiktok with run_at "next_slot", then tell me the time.
"""
Then /tiktok ./clips/v3.1-demo.mp4, the faster build runs all of it:
{{args}}is replaced by what you type after the command.@{CHANGELOG.md}is replaced by the file's content before the prompt is sent, so the caption comes from what actually shipped.- A video path works inside
@{…}too: the same docs say an image, PDF, audio or video file "will be correctly encoded and injected as multimodal input", so with a fixed path such as@{clips/next.mp4}Gemini gets the clip itself and can write the caption from what is on screen. - After editing the file,
/commands reloadpicks up the change without restarting Gemini CLI.
The command still stops where you want it to: Gemini CLI asks before each PostWire tool runs, and step 3 keeps the choice of who sees the post with you. Source: Gemini CLI's custom commands docs, read Dec 2, 2026.
From a script: TikTok posts with Gemini CLI headless
Gemini CLI also runs without its chat screen: gemini -p "…" answers one prompt and exits, which fits a cron job or a release step. Three settings matter there, all on the postwire entry of ~/.gemini/settings.json:
- Sign-in by key instead of the browser: copy your key in the dashboard under API & MCP and send it in a header.
- No one to press "allow":
"trust": truelets that server's tools run without asking and leaves every other tool asking as before. - Only the tools the job needs:
"includeTools"is an allowlist. With the list below Gemini can draft and schedule, and it cannot publish on the spot, so every TikTok from the script waits in the queue where you can still cancel it.
{
"mcpServers": {
"postwire": {
"httpUrl": "https://postwire.io/api/mcp",
"headers": { "Authorization": "Bearer YOUR_KEY" },
"trust": true,
"includeTools": ["generate_posts", "schedule_post", "list_scheduled_posts", "get_post_status"]
}
}
}
Then gemini -p "Write a TikTok caption for https://example.com/renders/today.mp4 and schedule it public for 7pm" queues it from a script; say who can see it in the prompt, because nobody is there to answer. Without Gemini at all, the same TikTok is POST /api/post with {"platforms": ["tiktok"], "video_url": "…", "text": "…", "privacy": "public"} and your key: see the API docs.
What Starter ($19 a month) adds to TikTok from Gemini
One TikTok a day is about 30 a month, past the free plan's 10 and its 3 waiting posts. Starter is $19 a month, or $15.20 a month billed yearly:
- No limit on the queue and 1,000 posts a month, so a month of TikToks can wait in line.
- Files of up to 1 GB, against 100 MB on the free plan.
- 25 recurring posts (
create_recurring_post, or Automate → Recurring), for the weekly slot you never want to miss. - 3 businesses, each with its own TikTok account and other connections, plus every network in each post: the same clip goes to YouTube Shorts, Instagram Reels and Facebook from one request.
- Approvals: what Gemini queues waits until you approve it from an emailed link.
Paid plans have a 14-day refund.
TikTok's rules Gemini works within
- Caption up to 2,200 characters; an emoji counts as 2.
- A video, or 1 to 35 photos. TikTok takes no text-only posts.
- Who can see it is chosen by the account owner for every post: public, friends or private. Branded content cannot be private.
- A day's limit does not lose the post: when TikTok's daily limit on API publishing stops a direct post, PostWire sends the same file to your TikTok inbox, where you post it from the app, and the result says so.
- Through TikTok's official Content Posting API and the permission you grant on TikTok's own page. No browser automation or session cookies.
More on the API itself: Does TikTok have an API?
What it does not do
PostWire does not add TikTok sounds to a video, does not edit or cut it, and does not read or answer comments. Over MCP a TikTok is published or scheduled; saving it as a draft in your TikTok inbox on purpose is an option of the REST API (options.tiktok.as_draft). This guide is for Gemini CLI, Google's terminal agent; PostWire has not been tested as a custom app in the Gemini web app at gemini.google.com, so this page makes no claim about it.
Questions people ask
Can Gemini post to TikTok?
Yes, from Gemini CLI with an MCP server. Gemini has no TikTok access of its own; with PostWire added (gemini mcp add -s user --transport http postwire https://postwire.io/api/mcp), a sign-in with /mcp auth postwire and your TikTok account connected once, it writes the caption and publishes or schedules videos and photo posts when you ask.
Do I need a TikTok developer app or an audit?
No. PostWire's TikTok app is already audited for the Content Posting API: you sign in on TikTok's own page and allow PostWire to post. No client key to create and no review to pass.
Can Gemini CLI schedule TikTok posts?
Yes. It calls schedule_post with a time up to 365 days ahead, or "next_slot" for your next free posting hour, and PostWire publishes the TikTok at that time with Gemini closed. The free plan keeps 3 posts waiting at once; paid plans have no such limit.
Why did my TikTok go out as private?
TikTok asks the account owner to choose who can see each post. If the request says nothing, PostWire posts it private rather than make it public for you, and the result says so. Ask Gemini for "public" and it sends privacy: public.
Can I make a /tiktok command in Gemini CLI?
Yes. Save a TOML file with a prompt field as .gemini/commands/tiktok.toml in your project and Gemini CLI offers it as /tiktok. {{args}} in the prompt is replaced by what you type after the command and @{CHANGELOG.md} by that file's content; run /commands reload after editing it.
Can I stop Gemini from publishing without asking me?
Yes, in two ways. By default Gemini CLI shows each PostWire call and waits for you to allow it. For scripts, set includeTools on the postwire entry in ~/.gemini/settings.json to a list without post_to_social: Gemini can then only draft and schedule, and a scheduled TikTok can be cancelled from the Queue page before it goes out.
How much does it cost?
The free plan includes TikTok and the MCP server: 1 business, 10 posts a month, 5 AI drafts a day, 2 networks per post, no card. Starter is $19 a month for 3 businesses, with no limit on the queue and 25 recurring posts; Pro is $29 for 10. Paid plans have a 14-day refund.
Try it on one business, free.
The free plan is 1 business, 10 posts a month, 5 AI drafts a day (about 20 a month) and 2 networks per post — every network connects free, no card, no time limit. Paid plans start at $19 a month and have a 14-day refund; Pro can be tried free for 7 days and Agency for 14, with a card at checkout and nothing charged that day.