Connector guide7-minute read20 MCP tools7 languages

How to Connect TikTok Ads to Cursor via MCP

Let your AI analyse your TikTok ads: spend, impressions, clicks and conversions by campaign, ad group, ad, day or audience, plus campaigns, Smart+ campaigns, audiences, pixels and the creative library. Can pause or turn on campaigns, ad groups and ads and change campaign budgets once you switch those tools on and confirm.

HCBy HelpCode teamUpdated 7 min read Open-source on GitHub

No credit card · 7-day trial · Self-host alternative available

TikTok Ads

TikTok Ads

Let your AI analyse your TikTok ads: spend, impressions, clicks and conversions by campaign, ad group, ad, day or audience, plus campaigns, Smart+ campaigns, audiences, pixels and the creative library. Can pause or turn on campaigns, ad groups and ads and change campaign budgets once you switch those tools on and confirm.

tools

20

Region

INTL

Category

Advertising

Authentication

API Key

Required env vars

TIKTOK_ADS_API_HOSTTIKTOK_ADS_ACCESS_TOKENTIKTOK_ADS_ADVERTISER_ID
Install in one click on Cloud

7-day free trial · No credit card

  • 7-day free trial
    No credit card required
  • GDPR & SOC 2 ready
    EU data residency, audit logs
  • Open-source on GitHub
    Open source · AGPL-3.0
  • Works with ChatGPT, Claude, Gemini
    Any MCP-compatible client

Skip the install. Get this working in under 2 minutes.

Start a free trial on cloud.anythingmcp.com, add the TikTok Ads in one click, then point your AI client (Claude, ChatGPT, Copilot or Cursor) at the generated MCP endpoint. No Docker, no git clone, zero engineering experience required.

Start free trial

Summary

Let your AI analyse your TikTok ads: spend, impressions, clicks and conversions by campaign, ad group, ad, day or audience, plus campaigns, Smart+ campaigns, audiences, pixels and the creative library. Can pause or turn on campaigns, ad groups and ads and change campaign budgets once you switch those tools on and confirm.

Try asking

Example prompts for TikTok Ads

Click any prompt to copy it. Paste into Claude, ChatGPT, Cursor, Gemini, Copilot or OpenClaw to run it against this connector.

TikTok Ads · live via MCP
Share
Opus 4.7

Claude is AI and can make mistakes. Please double-check responses.

💡 No install? Use cloud.anythingmcp.com directly. Sign in, click Connectors → TikTok Ads, paste your credentials, mint an MCP API key and you're done. No Docker, no git clone, no local server.

TikTok Ads + Cursor

Let your AI analyse your TikTok ads: spend, impressions, clicks and conversions by campaign, ad group, ad, day or audience, plus campaigns, Smart+ campaigns, audiences, pixels and the creative library. Can pause or turn on campaigns, ad groups and ads and change campaign budgets once you switch those tools on and confirm.

Prerequisites

See the full setup instructions baked into the connector (visible in the in-app store when you select the connector). The required environment variables for this connector are:

TIKTOK_ADS_API_HOST, TIKTOK_ADS_ACCESS_TOKEN, TIKTOK_ADS_ADVERTISER_ID

Step 1 — Get credentials

  1. Sign in to the TikTok API for Business developer portal at https://business-api.tiktok.com/portal with a TikTok for Business account that can access your ad account, and click Become a Developer.
  2. Under My Apps → Create an app, enter a name, a description and an Advertiser redirect URL (any https page of yours: you only copy a code from its address), and tick the permission scopes Ad Account Management, Ads Management, Reporting and Audience Management, plus Pixel Management and Creative Management for those tools. TikTok reviews new apps, usually within two or three business days.
  3. Once the app is approved, copy its App ID and Secret into TIKTOK_ADS_APP_ID and TIKTOK_ADS_APP_SECRET. Both are optional: the connector only uses them to list the ad accounts your token covers.
  4. Open the app's Advertiser authorization URL, sign in, tick the ad accounts and confirm. Your browser lands on the redirect URL with auth_code=... in the address bar. The code works once and expires after an hour.
  5. Exchange the code right away for a long-lived access token. This is a one-time step:
    curl -X POST https://business-api.tiktok.com/open_api/v1.3/oauth2/access_token/ -H "Content-Type: application/json" -d '{"app_id":"<App ID>","secret":"<Secret>","auth_code":"<auth_code>"}'
    
    Paste data.access_token from the answer into TIKTOK_ADS_ACCESS_TOKEN and one of the data.advertiser_ids into TIKTOK_ADS_ADVERTISER_ID. The token does not expire; it only stops working when the authorization is revoked or the app secret is reset.
  6. Set TIKTOK_ADS_API_HOST to https://business-api.tiktok.com, install the connector and run tiktok_ads_get_advertiser_info to check the account.

Sandbox: to try it without real spend, open your app in the developer portal → Sandbox, create a sandbox ad account and generate its token there; no review is needed. Use that token and the sandbox advertiser id, and set TIKTOK_ADS_API_HOST to https://sandbox-ads.tiktok.com. Sandbox accounts deliver no ads and report no real data.

One ad account per connector: every tool works on the ad account in TIKTOK_ADS_ADVERTISER_ID. A token often covers several accounts, and tiktok_ads_list_authorized_advertisers lists them. Install the connector again for each further account.

Status and budget changes are off by default: tiktok_ads_update_campaign_status, tiktok_ads_update_ad_group_status, tiktok_ads_update_ad_status and tiktok_ads_update_campaign_budget are switched off at install, because turning something on starts spending at once. Switch them on per tool if you want the AI to pause ads or change budgets. It then names the campaign, ad group or ad, the current and the new value, and waits for your yes. An ad only delivers when the ad, its ad group and its campaign are all on. Budgets are amounts in the account currency (50 means 50.00), and TikTok refuses a budget below its minimum or below 105% of what has already been spent. The connector never creates campaigns or ads.

Reports: tiktok_ads_get_report returns spend, impressions, clicks, conversions and more per campaign, ad group, ad or for the whole account, by day or by hour, or broken down by age, gender, country or placement. Daily rows cover up to 30 days per request, so the AI splits longer periods; totals without a time breakdown can span up to a year. Dates follow the ad account's timezone and amounts its currency.

Common errors: TikTok reports errors as a code in an otherwise normal answer, and the connector turns them into a clear error. 40001: the app or token lacks permission for this account or action, so authorize the ad account again with the needed scopes. 40104 or 40105: the token is invalid, expired or revoked, or belongs to another account; generate a new one. 40100: too many requests, wait a moment. 40300: TikTok does not know the advertiser id.

The connector does not create or edit campaigns, ad groups, ads or audiences, upload creatives, manage Business Center or cover TikTok Shop.

Step 2 — Install the adapter

curl -fsSL https://raw.githubusercontent.com/HelpCode-ai/anythingmcp/main/docker-compose.quickstart.yml -o docker-compose.yml
printf 'JWT_SECRET=%s\nENCRYPTION_KEY=%s\n' "$(openssl rand -hex 32)" "$(openssl rand -hex 32)" > .env
docker compose up -d

Step 3 — Add the connector in Cursor

Your server URL: in AnythingMCP, open MCP Servers → the server this connector is on, and copy its URL (https://cloud.anythingmcp.com/mcp/…). Use it wherever this guide shows YOUR_SERVER_ID.

Cursor reads MCP servers from ~/.cursor/mcp.json. Add this entry:

{
  "mcpServers": {
    "anythingmcp": {
      "url": "https://cloud.anythingmcp.com/mcp/YOUR_SERVER_ID",
      "headers": { "X-API-Key": "YOUR_MCP_API_KEY" }
    }
  }
}
  1. Create an MCP API key in AnythingMCP under MCP Servers → your server → API keys, and paste it in place of YOUR_MCP_API_KEY.
  2. Save the file and restart Cursor.
  3. Open Cursor → Settings → MCP and check that anythingmcp is listed and connected.
  4. Start chatting: the agent can now call the TikTok Ads tools.

Available tools

ToolWhat it does
tiktok_ads_list_authorized_advertisersList every ad account (advertiser_id and name) the access token was authorized for
tiktok_ads_get_advertiser_infoRead the configured ad account: name, company, status, currency, timezone, country, balance and more
tiktok_ads_list_campaignsList the campaigns of the ad account: id, name, objective, budget mode and budget, operation and secondary status, creation time
tiktok_ads_list_smart_plus_campaignsList the Upgraded Smart+ campaigns of the ad account (TikTok's automated campaign type), which tiktok_ads_list_campaigns may not show in…
tiktok_ads_list_ad_groupsList the ad groups of the ad account (TikTok's name for ad sets): campaign, budget, schedule, bidding, optimization goal, placements…
tiktok_ads_list_adsList the ads of the ad account: ad group and campaign, ad text, call to action, landing page, video_id or image_ids, identity and status
tiktok_ads_get_reportRun a synchronous performance report: spend, impressions, clicks, conversions and more, per campaign, ad group, ad, day or audience…
tiktok_ads_list_custom_audiencesList the custom and lookalike audiences of the ad account: id, name, type, size (cover_num), whether it is valid for ads and when it expires
tiktok_ads_get_custom_audiencesRead up to 100 custom audiences in detail, with their rules, source and recent history
tiktok_ads_list_saved_audiencesList the saved audiences (stored targeting presets) of the ad account
tiktok_ads_list_pixelsList the TikTok Pixels of the ad account with their code, setup mode and events
tiktok_ads_get_pixel_event_statsCount the events pixels received per event type over a date range of at most 30 days (UTC): a quick check that tracking works
tiktok_ads_get_videosRead up to 60 videos of the ad account's creative library by video_id (from tiktok_ads_list_ads): file name, duration, size, format and a…
tiktok_ads_search_videosSearch the videos of the ad account's creative library, newest first
tiktok_ads_get_imagesRead up to 100 images of the ad account's creative library by image id: file name, size, format and URL
tiktok_ads_list_identitiesList the identities ads can run under: custom identities and the TikTok accounts linked to the ad account or its Business Center
tiktok_ads_update_campaign_statusTurn campaigns on (ENABLE, starts spending) or pause them (DISABLE)
tiktok_ads_update_ad_group_statusTurn ad groups on (ENABLE, starts spending) or pause them (DISABLE)
tiktok_ads_update_ad_statusTurn ads on (ENABLE, starts spending) or pause them (DISABLE)
tiktok_ads_update_campaign_budgetChange the budget of a campaign that has its own budget (budget_mode BUDGET_MODE_DAY, BUDGET_MODE_DYNAMIC_DAILY_BUDGET or…

Example prompts

  • "How much did we spend on TikTok last week, and which campaign had the lowest cost per conversion?"
  • "Show daily spend, clicks and conversions for each campaign over the last 30 days."
  • "Break down last month's results by age and gender."
  • "Is our TikTok Pixel still receiving purchase events? Compare the last 7 days with the week before."

FAQ

Does Cursor support custom MCP servers on the free tier? Yes, MCP is available on Hobby, Pro and Business plans.

Next steps

Was this guide helpful?

Your TikTok Ads agent is one click away.

Install the connector, paste the key, prompt Cursor. Free for 7 days, no credit card.

Related guides

Connectors

How to Connect TikTok Ads to ChatGPT via MCP

Let your AI analyse your TikTok ads: spend, impressions, clicks and conversions by campaign, ad group, ad, day or audience, plus campaigns, Smart+ campaigns, audiences, pixels and the creative library. Can pause or turn on campaigns, ad groups and ads and change campaign budgets once you switch those tools on and confirm.

Connectors

How to Connect TikTok Ads to Claude via MCP

Let your AI analyse your TikTok ads: spend, impressions, clicks and conversions by campaign, ad group, ad, day or audience, plus campaigns, Smart+ campaigns, audiences, pixels and the creative library. Can pause or turn on campaigns, ad groups and ads and change campaign budgets once you switch those tools on and confirm.

Connectors

How to Connect TikTok Ads to Gemini via MCP

Let your AI analyse your TikTok ads: spend, impressions, clicks and conversions by campaign, ad group, ad, day or audience, plus campaigns, Smart+ campaigns, audiences, pixels and the creative library. Can pause or turn on campaigns, ad groups and ads and change campaign budgets once you switch those tools on and confirm.

Connectors

How to Connect TikTok Ads to Meta Muse via MCP

Let your AI analyse your TikTok ads: spend, impressions, clicks and conversions by campaign, ad group, ad, day or audience, plus campaigns, Smart+ campaigns, audiences, pixels and the creative library. Can pause or turn on campaigns, ad groups and ads and change campaign budgets once you switch those tools on and confirm.

Connectors

TikTok Ads to MCP: Drive TikTok Ads from any AI Agent

Let your AI analyse your TikTok ads: spend, impressions, clicks and conversions by campaign, ad group, ad, day or audience, plus campaigns, Smart+ campaigns, audiences, pixels and the creative library. Can pause or turn on campaigns, ad groups and ads and change campaign budgets once you switch those tools on and confirm.

Connectors

How to Connect Canva to Cursor via MCP

Let your AI work in Canva: find and read designs, create new ones, export them to PDF, PNG, PowerPoint or video with download links, organise folders, upload images from a link, read brand templates and comment on designs.