Connect Codex to TikTok Ads with LoomaScale
To connect OpenAI Codex to TikTok Ads, authorize an advertiser in LoomaScale, install the plugin from your terminal, and run codex mcp login loomascale. Verify the account ID in a new Codex session. Then compare two complete weeks to see which campaigns drove a change in spend or cost per conversion.
Updated
Connection overview
- Authorize TikTok Ads in LoomaScale, choose your advertiser account and set its daily budget cap.
- In your terminal, run codex plugin marketplace add loomascale/agent-plugin.
- Run codex plugin add loomascale@loomascale.
- Run codex mcp login loomascale and sign in to LoomaScale in your browser.
- Verify the advertiser ID.
- Find the campaigns behind a weekly change.
What you need before you start
- The Codex CLI with plugin support. If codex plugin is not recognized, update Codex first.
- A LoomaScale account with TikTok Ads connected and a daily spend cap configured.
- A TikTok Ads Manager account you can sign in to, with access to the ad account you want to connect.
Choose your TikTok advertiser account
Open Connections in LoomaScale and select TikTok Ads. Sign in on TikTok and authorize the advertiser account you want to use. Back in LoomaScale, enable that account for assistants and set its daily budget cap. Keep the advertiser ID from TikTok Ads Manager handy for the connection check.
Open LoomaScale connectionsConnect Codex, step by step
Add the LoomaScale plugin marketplace
In your terminal, run the command below. It registers LoomaScale’s public plugin repository on GitHub as a Codex marketplace, so Codex can find the plugin. Nothing is installed yet.
codex plugin marketplace add loomascale/agent-plugin
Install the plugin
Install the LoomaScale plugin to register its MCP server and skills. Start a new Codex session so the tools are available.
codex plugin add loomascale@loomascale
Sign in to LoomaScale
Run the login command in your terminal. In the browser, choose the LoomaScale account connected to TikTok Ads and approve access. Return to the terminal and check that sign-in succeeded.
codex mcp login loomascale
Verify the advertiser ID
Run the prompt below. Compare the ID and currency with TikTok Ads Manager. If you manage several advertisers, include the intended ID in your next request.
Use LoomaScale to list my TikTok advertiser accounts with their IDs and currencies. Identify the default account and list its campaigns with their delivery statuses. Read only.
Find the campaigns behind a weekly change
Use two complete seven-day periods in the advertiser’s time zone. Ask Codex for the underlying spend and conversions so you can check the comparison even when one campaign recorded no conversions.
Compare the last 7 complete days with the previous 7 for this TikTok advertiser. By campaign, show spend, conversions and cost per conversion in both periods. Flag the two largest changes in spend. Mark missing values and keep everything read-only.
Add the MCP server without the plugin
Prefer to manage MCP servers yourself? Run this command instead of steps 1 and 2, then sign in with codex mcp login loomascale as in step 3. You get the LoomaScale tools without the plugin’s skills.
codex mcp add loomascale --url https://api.loomascale.com/mcp
What Codex can do with your connected account
Compare campaigns on the same basis
Ask for spend, conversions and cost per conversion by ad group. Check which event each ad group optimizes for before comparing results. A lead and a purchase can both count as conversions.
Find which videos hold attention
Group ads by video to see how the same creative performs across placements. Compare two-second and six-second views per impression, then check spend and conversions before choosing a video to refresh.
Prepare a paused Smart+ campaign
For an advertiser with Smart+ enabled, LoomaScale can prepare a website Sales or Lead Generation campaign using videos already in the TikTok library. Ask for a preview to review the budget and creative. Newly created campaigns, ad groups and ads start paused.
Three read-only prompts to try next
Which of my TikTok videos hold attention?
Analyze my TikTok Ads creatives for the last 30 days. For each ad show spend, impressions, the share of impressions that reached 2 seconds and 6 seconds of the video, the completion rate, CTR, conversions and cost per conversion. Rank the ads from strongest to weakest hook, name the ones that are spending while viewers leave in the first seconds, and tell me which to pause, which to keep and what the strongest ones have in common. Don't make changes.
What changed in my TikTok account?
Compare the last 7 days in my TikTok Ads account with the 7 days before. Show spend, impressions, clicks, CTR, conversions and cost per conversion for both periods at account level, then list the campaigns that moved most in each direction. For each say whether the cause was cost, delivery volume or conversion rate. End with the single thing most worth my attention this week. Don't make changes.
Check my TikTok budget pacing
List my active TikTok Ads campaigns and ad groups and pull their daily spend and conversions for the last 7 days. Flag ad groups that spent on several days with no conversions, ad groups pacing well above or below their daily budget, and ones that stopped delivering. For the flagged ad groups, include TikTok's own diagnosis. Tell me what needs attention and why. Don't make changes. If everything is pacing normally, say so rather than finding something to report.
If the connection does not work
codex plugin is not recognized.
Update the Codex CLI to the latest version and run the marketplace command again. Plugin commands need a recent Codex release.
The marketplace or install command fails.
Check the exact names: the marketplace is loomascale/agent-plugin and the plugin is loomascale@loomascale. Make sure your network can reach github.com.
Codex says loomascale is not logged in.
Run codex mcp login loomascale again and finish the sign-in in your browser. Check the status with codex mcp list, then start a new Codex session.
Why is my TikTok advertiser missing?
Open Connections in the LoomaScale account you used to sign in. Check that TikTok authorized the advertiser and that the account is enabled for assistants. Run the account check again and match the ID with TikTok Ads Manager.
Frequently asked questions
How is this different from the ChatGPT app?
The LoomaScale app works inside ChatGPT on the web and in the ChatGPT apps. The Codex plugin works in your terminal and adds skills for audits, pacing and launches. Both use the same LoomaScale account and ad connections.
Why is cost per conversion blank for an ad group?
An ad group with spend and zero conversions has no cost per conversion to calculate. If TikTok returned no value, keep it marked as missing. Check the optimization event and pixel activity before concluding the ad group wasted its budget.
Can I review TikTok spend without changing a campaign?
Yes. The reporting prompts on this page only read account data. You can request a budget or status change separately. LoomaScale checks increases to a daily budget against the cap you set for that advertiser.
Related guides
Start with your own campaign data
Connect your ad account, install the LoomaScale plugin in Codex, and run a waste audit. Try LoomaScale free for 7 days; no card required.
Connect an ad accountConnect your assistant to your ad platform
LoomaScale runs inside the assistant you already use. Pick the pair you work with; each guide takes about five minutes.
Manage Google Ads campaigns from ChatGPT: search terms, budgets and new campaigns, paused for your review. One-click install from ChatGPT's directory.
Read the integrationManage Google Ads from Claude: audits, budget changes and new campaigns, every write inside the spend cap you set. Connect from Claude's directory.
Read the integrationInstall the LoomaScale plugin in Claude Code with two commands and audit Google Ads from your terminal: search terms, budgets and pacing, with skills built in.
Read the integrationInstall the LoomaScale plugin in OpenAI Codex with two commands and audit Google Ads from your terminal: search terms, budgets and conversion goals.
Read the integrationManage Facebook and Instagram campaigns from ChatGPT: ad sets, budgets and creatives in one chat. The same one-click install.
Read the integrationManage Facebook and Instagram campaigns from Claude: audits, budget caps and new ad sets, inside the limits you set.
Read the integrationRun Facebook and Instagram campaign reviews from Claude Code: the same plugin, one sign-in, and skills for waste audits, pacing and creative fatigue.
Read the integrationReview Facebook and Instagram campaigns from OpenAI Codex: the same plugin and sign-in, with placement, age and lead-quality checks.
Read the integrationManage TikTok campaigns from ChatGPT: reports, video watch-through, audience breakdowns, and pauses, budgets and bids on request. The same one-click install.
Read the integrationManage TikTok campaigns from Claude: audits, video and audience reports, and pauses, budgets and bids inside the spend cap you set.
Read the integrationInstall the Claude Code plugin, authenticate through /mcp and group TikTok ads by video to compare their opening seconds with the conversions they earned.
Read the integrationConnect Manus to Google Ads through LoomaScale’s MCP server. Analyze campaigns, keywords and search terms, then request changes within your permissions and spend cap.
Read the integrationAsk Slackbot about Google Ads in any Slack DM: audits, search terms and pacing checks, with changes kept inside your spend cap. Install the app once per workspace.
Read the integrationConnect Manus to Meta Ads through LoomaScale’s MCP server. Review Facebook and Instagram campaigns, ad sets, creatives and placements.
Read the integrationAsk Slackbot about Facebook and Instagram campaigns in any Slack DM: delivery, pacing and ad-set spend, read live from Meta Ads.
Read the integrationInstall LoomaScale once for the workspace. Each teammate links their own account and can ask Slackbot for yesterday’s spend and TikTok’s diagnosis of a stalled ad group.
Read the integration