Codex CLI logo TikTok Ads logo

Run TikTok Ads from Codex CLI

Manage TikTok Ads campaigns inside OpenAI Codex CLI — 4 tools, OAuth setup in about 5 minutes, no dashboard switching.

  • 4 TikTok Ads tools, all in Codex CLI

  • Paused-by-default. Cannot delete campaigns.

  • OAuth setup in ~2 minutes

See it in action

In Codex CLI

Pull my TikTok Ads performance for the last 14 days. Show video views, hook rate, video completion rate, conversions, and cost per conversion by campaign. Which campaigns have the strongest hook rate, and which are dropping?

TikTok performance audit — TikTok-native audit using hook rate and video completion as primary signals.

Overview

Adspirer is the MCP server that connects OpenAI Codex CLI to your TikTok Ads ad accounts, turning campaign management into a chat conversation. OpenAI's Codex CLI — script-friendly agent loop with MCP support. On the platform side, 4 tools cover spark Ads, Video Ads, Catalog Ads, Lead Gen. Adspirer reads and writes — pull performance reports, audit launch in-feed video campaigns, launch new campaigns, pause underperformers, and reallocate budget — all from chat. New campaigns are always created paused so you can review before they go live, Adspirer cannot delete existing campaigns by design, and the free tier (15 tool calls / month, no credit card) is enough to run a full audit before you pay. Setup takes about 5 minutes via a JSON config entry.

Safety guarantees

  • New campaigns always created paused for review

  • Adspirer cannot delete existing campaigns

  • Budget changes need explicit confirmation

  • OAuth 2.1 + PKCE — passwords never seen

How it works

How it works

Codex CLI

You ask in chat

prompt

Adspirer

4 tools, paused-by-default

tool calls

TikTok Ads

Live data, paused for review

Step 01

Connect

Paste the MCP URL into Codex CLI, OAuth into TikTok Ads.

Step 02

Manage

Ask in chat. Adspirer routes through 4 TikTok Ads tools.

Step 03

Scale

Switch accounts in chat. Same audits across every client.

What you can do

4 tools across TikTok Ads. The ones you'll use most:

  • Launch In-Feed video campaigns — Build TikTok In-Feed campaigns from a brief — Adspirer validates your video against TikTok's spec (9:16, 5-60s, MP4/MOV) and creates the campaign **paused** so you review before launch.

  • Boost organic posts as Spark Ads — Pass a `tiktok_item_id` and Adspirer turns an existing organic post into a Spark Ad — paid reach, while all likes, comments, and shares stay on the original.

  • Audit creative fatigue by hook rate — `detect_tiktok_creative_fatigue` uses **hook rate decline** as the primary fatigue signal — far more telling than CTR on TikTok's short-form feed.

  • Find wasted spend — `analyze_tiktok_wasted_spend` flags ROAS-negative campaigns with status awareness, so you don't waste a prompt asking about already-paused ads.

  • Pause & resume at every level — Pause or resume campaigns, ad groups, or individual ads by name from chat. Adspirer **cannot delete** campaigns by design — pausing is the safe alternative.

  • Read audience & geo insights — `get_tiktok_audience_insights` returns age and gender breakdown ranked by CPA. `analyze_tiktok_geo_performance` does the same at country level — feed both into budget decisions.

  • Build Carousel & image ads — `upload_tiktok_images` and `create_tiktok_carousel_card` let you build multi-image Carousel Ads alongside video — useful when you don't have a finished video for every product.

  • Reallocate budget by ROAS — `optimize_tiktok_budget` recommends shifts toward your best-performing ad groups. CBO is on by default — set `budget_optimize_on=false` to manage budgets per ad group manually.

Campaign types

Every TikTok Ads format Adspirer supports — request one in chat.

In-Feed Video Ads

Auto-playing vertical video in the For You feed. Supports Traffic, Conversions, and APP_PROMOTION objectives.

Spark Ads

Boost an existing organic TikTok post as a paid ad — engagement stays on the original post. Reference by `tiktok_item_id`.

Carousel Ads

Multi-image carousel for showcasing multiple products or features. Build cards with `create_tiktok_carousel_card`.

Image Ads

Single-image ads built from images uploaded via `upload_tiktok_images`. Lighter creative lift than full video.

App Promotion (APP_PROMOTION)

Drive mobile app installs from a video-first audience. Optimized for install events and post-install actions.

More prompts to try

Codex handles long-running agent loops; brief it like you would Claude Code.

Validate a TikTok video — Pre-flight check on a video URL against TikTok's exact spec.

Validate a TikTok video
Validate this TikTok video creative: <video URL> Check if it meets TikTok's specs for In-Feed ads (9:16 vertical, 5-60 seconds, MP4 or MOV, under 500MB). If anything fails, tell me exactly what to fix before I waste time uploading.

Boost an organic post as Spark Ad — Spark Ad boost that preserves engagement on the original organic post.

Boost an organic post as Spark Ad
Boost my organic TikTok post (item ID: <tiktok_item_id>) as a Spark Ad. Target US women 18-34 interested in beauty. Budget: $30/day. Objective: Traffic to my landing page. Keep engagement on the original post.

Diagnose a hook-rate drop — Anomaly diagnosis using TikTok-specific hook rate as the leading indicator.

Diagnose a hook-rate drop
My "Spring Launch" TikTok campaign's hook rate dropped from 45% to 28% over the last 7 days. Diagnose what changed — creative fatigue, audience shift, or something else — and recommend whether to refresh the creative or rebuild the audience.

Who this is for

Each Monday, ask Codex CLI to pull last week's TikTok Ads performance, surface campaigns running below your ROAS threshold, and recommend creative refreshes for fatigued ads.

Replaces a 60–90 minute manual review with a 5-minute chat, and surfaces problems before they tank ad-set performance.

Compare & decide

Adspirer vs alternatives

For running TikTok Ads from Codex CLI.

Adspirer DIY MCP server Legacy SaaS dashboard
Setup time ~5 minutes via a JSON config entry 2–4 hours building MCP server 30–60 min onboarding + sales call
Cost — entry tier Free (15 calls / mo) Hosting + maintenance $200–500 / mo minimum
Works inside Codex CLI Yes — a JSON config entry Yes (if you build it correctly) No — external dashboard only
Multi-account Yes — switch in chat Manual per-account auth Yes — but each account billed
Read + Write Full read + write (create / pause / update) Whatever you build Mostly read-only or seat-gated writes
Safety: cannot delete Hard-coded — no delete tool Up to you Varies
Pricing transparency Public — $0 / $49 / $99 / $199 Self-hosted Often quote-only

Pricing

Start free. Upgrade if you outgrow it.

Free Forever

$0

15 / mo

All platforms. ChatGPT & Claude access. No credit card.

Start free →
Best for Codex CLI

Plus

$49 / mo

150 / mo

Performance analysis + standard campaigns.

Compare Plus →

Pro

$99 / mo

600 / mo

AI optimization, bulk ops, deeper diagnostics.

Compare Pro →

Max

$199 / mo

3,000 / mo

Priority support (24h SLA), custom integrations.

Compare Max →

Configure

Required: OpenAI API access. Most users finish in about two minutes.

Show setup steps for Codex CLI

Edit your Codex MCP config

Add an adspirer entry with URL https://mcp.adspirer.com/mcp and OAuth auth.

Authenticate via OAuth

Run any Codex command — the first invocation triggers the OAuth flow.

FAQ

Setup

Do I need a developer to set this up?

You'll edit a small JSON config entry to register the Adspirer MCP server (https://mcp.adspirer.com/mcp, transport http, OAuth). If you can edit a settings file in a code editor, you can do this. Total time: about 5 minutes.

Capabilities

Can I switch from Codex CLI to a different AI client later?

Yes. Your Adspirer account is independent of the AI client — sign up once, then connect the same MCP URL from ChatGPT, Claude, Cursor, Codex, Windsurf, or any supported client. Tool calls are pooled across clients on the same plan; switching costs you nothing.

What are TikTok's exact creative specs?

Video: 9:16 vertical (1080×1920px recommended), 5-60 seconds (9-15s performs best), MP4 or MOV, under 500MB, minimum 720p resolution. validate_and_prepare_tiktok_assets enforces all of this before campaign creation — horizontal or square video gets rejected.

What's the minimum budget on TikTok?

$20/day at both campaign and ad-group level (TikTok's requirement). For meaningful data, $50+/day on a single ad group is the recommended starting point. Expect $0.50-2.00 CPC and $6-10 CPM depending on industry and targeting.

Ad formats

Can Adspirer create image ads, or only video?

Both. Adspirer supports video ads, image ads, Carousel Ads, and Spark Ads. Use upload_tiktok_images for images, create_tiktok_carousel_card for multi-image Carousels, and add_tiktok_ad to attach any of those to an ad group. Video remains the highest-performing format on TikTok.

How do Spark Ads work?

Spark Ads boost an existing organic TikTok post as paid media. Pass the tiktok_item_id of the organic post to create_tiktok_campaign or add_tiktok_ad and TikTok runs it as paid reach — likes, comments, shares, and follows all stay on the original organic post. No new creative upload required.

Workflows

Does Adspirer generate TikTok videos?

No. Adspirer manages TikTok campaigns but does not produce video. You create videos in CapCut, Canva, Adobe Premiere, your phone, or AI tools like Runway/Pika/HeyGen, then upload to Google Drive, Dropbox, or S3 and pass the URL. validate_and_prepare_tiktok_assets checks the file against TikTok's spec before launch.

Compare

What's the read vs. write boundary on TikTok Ads?

Adspirer is full read and write. It can pull reports, audit performance, and analyze data (read), and it can launch new campaigns, pause underperformers, update budgets, and adjust targeting (write). Two safety guardrails are hard-coded: new campaigns are always created paused so you review before they go live, and Adspirer cannot delete existing campaigns. You keep full control.

Safety & control

Can Adspirer delete or modify my existing TikTok campaigns?

Adspirer cannot delete campaigns, ad groups, or ads by design. It can pause and resume them at every level via pause_tiktok_campaign/pause_tiktok_ad_group/pause_tiktok_ad, and update name, budget, targeting, or schedule on your instruction. New campaigns are always created paused.

Related integrations

Same Codex CLI, different platform — or same TikTok Ads, different AI client.

Go deeper

Ready to connect Codex CLI to TikTok Ads?

Start free — 15 tool calls per month, no credit card. Setup takes about 2 minutes.

Try Adspirer free