Last updated: 16 November 2026. TikTok API for Business (v1.3), the TikTok for Business MCP Server, Anthropic and OpenAI documentation checked that day.
TikTok’s official MCP server is hosted, public and powerful. Any TikTok for Business user can connect an agent without a developer app, and the tool library covers campaigns, budgets, audiences, Business Center members and payment portfolios (tool list). That is great for productivity, and it means guardrails should be part of setup from the start. This guide covers how to set them up in Claude Code.
Five layers of guardrails
| Layer | What it controls | TikTok example |
|---|---|---|
| TikTok authorisation | Which TikTok for Business user and accounts the agent can reach | Authorise a user assigned only the needed accounts in your Business Center |
| Server choice | How many tools the agent sees | tt-ads-mcp-layer (~40 core tools) vs tt-ads-mcp-flat (~400) |
| Permission rules | Allow / ask / deny per tool name | deny bc_member_invite; ask smart_plus_campaign_create |
| PreToolUse hook | Inspects arguments before a call | Deny operation_status ENABLE or budget > ceiling |
| Headless allowlist | Tools available in scheduled runs | –allowedTools with report and get tools only |

Layer 1: authorise the right user
The agent acts as the TikTok for Business user who clicked Authorize, for 30 days (connection guide). Use a user who is assigned only the ad accounts you want automated in your own Business Center. Your accounts should be your own, opened under your real entity, never rented or bought.
Layer 2: choose the server
tt-ads-mcp-layer loads about 40 core tools and discovers the rest on demand; tt-ads-mcp-flat loads about 400. Fewer visible tools means fewer surprises and less context. TikTok also tags tools with MCP annotations such as readOnlyHint, which clients can use to tell reads from writes (custom agent guide).
# Claude Code: add TikTok's hosted MCP server (no developer app needed)
claude mcp add --transport http tiktok-ads \
https://business-api.tiktok.com/open_mcp/tt-ads-mcp-layer
# full tool library instead (~400 tools):
# https://business-api.tiktok.com/open_mcp/tt-ads-mcp-flat
claude # start Claude Code, then run /mcp and choose tiktok-ads > Authenticate
# sign in to TikTok Ads Manager, review permissions, click Authorize
claude mcp list # should show tiktok-ads as connectedLayer 3: permission rules
| Tool group | Examples | Rule |
|---|---|---|
| Read | advertiser_info_get, campaign_get, report_integrated_get | allow |
| Create | smart_plus_campaign_create, smart_plus_ad_create, file_video_ad_upload | ask |
| Budget / status | smart_plus_adgroup_budget_update, campaign_status_update | ask + hook |
| Account & billing | bc_member_invite, bc_transfer, payment_portfolio_credit_line_update | deny |
| Audiences | dmp_custom_audience_create, dmp_custom_audience_delete | ask (delete: deny) |

Claude Code rules match mcp__<server>__<tool>. Deny rules win over ask and allow (Claude Code permissions).
// .claude/settings.json - read freely, ask before writes, block account-level actions
{
"permissions": {
"allow": [
"mcp__tiktok-ads__advertiser_info_get",
"mcp__tiktok-ads__campaign_get",
"mcp__tiktok-ads__adgroup_get",
"mcp__tiktok-ads__ad_get",
"mcp__tiktok-ads__report_integrated_get",
"mcp__tiktok-ads__smart_plus_campaign_get"
],
"ask": [
"mcp__tiktok-ads__smart_plus_campaign_create",
"mcp__tiktok-ads__smart_plus_adgroup_create",
"mcp__tiktok-ads__smart_plus_ad_create",
"mcp__tiktok-ads__smart_plus_adgroup_budget_update",
"mcp__tiktok-ads__adgroup_budget_update",
"mcp__tiktok-ads__campaign_status_update"
],
"deny": [
"mcp__tiktok-ads__bc_member_invite",
"mcp__tiktok-ads__bc_asset_assign",
"mcp__tiktok-ads__bc_transfer",
"mcp__tiktok-ads__payment_portfolio_credit_line_update"
]
}
}Layer 4: a PreToolUse hook
Rules see only the tool name. A hook sees the arguments, so it can block a create call that forgot DISABLE or a budget above your ceiling (hooks reference).
// .claude/settings.json (excerpt) - PreToolUse hook as a second lock on TikTok writes
{
"hooks": {
"PreToolUse": [
{
"matcher": "mcp__tiktok-ads__.*(create|update)",
"hooks": [{ "type": "command", "command": ".claude/hooks/tiktok-guard.py" }]
}
]
}
}#!/usr/bin/env python3
# .claude/hooks/tiktok-guard.py - block "go live" and budgets above a ceiling
import json, sys
CEILING = 200.0 # account currency units (TikTok budgets are floats, not cents)
def walk(obj):
if isinstance(obj, dict):
for k, v in obj.items():
yield k, v
yield from walk(v)
elif isinstance(obj, list):
for v in obj:
yield from walk(v)
event = json.load(sys.stdin)
reason = None
for k, v in walk(event.get("tool_input", {})):
if k in ("operation_status", "opt_status") and str(v).upper() == "ENABLE":
reason = "Turning delivery on is done by a media buyer in Ads Manager"
if "budget" in k and isinstance(v, (int, float)) and v > CEILING:
reason = f"Budget {v} above ceiling {CEILING}: needs a media buyer"
if reason:
print(json.dumps({"hookSpecificOutput": {
"hookEventName": "PreToolUse",
"permissionDecision": "deny",
"permissionDecisionReason": reason}}))
sys.exit(0)Layer 5: headless runs with an allowlist
Scheduled jobs should only see read tools (run Claude Code programmatically):
# read-only daily summary, only read tools allowed
claude -p "Use tiktok-ads to pull yesterday's spend, impressions, clicks, CTR, CPC and \
conversions by campaign for advertiser <ADVERTISER_ID> with report_integrated_get. \
Compare with the previous 7 days, flag anomalies, propose (do not apply) changes." \
--allowedTools "mcp__tiktok-ads__report_integrated_get,mcp__tiktok-ads__campaign_get" \
--output-format json > tiktok-summary.jsonOperational limits worth encoding
- 6 QPS per tool per user on the MCP server; tool availability varies by region and account (
- MCP overview
- ).
- One create/update/status call per Upgraded Smart+ ad every 5 seconds.
- Re-authorise every 30 days; a failing nightly job is often an expired authorisation.
For the Smart+ build itself see Claude for TikTok Upgraded Smart+ campaign automation; for Codex’s equivalent (default_tools_approval_mode) see Codex config.toml for the TikTok for Business MCP server.
How PandaWM uses Claude, Codex and TikTok ad accounts to speed up client ad delivery
This guide focuses on Claude, but in day-to-day client work PandaWM combines Claude, Codex and TikTok ad accounts to help companies going global move faster through the repetitive loop of account and pixel/event setup → Smart+ campaign builds → creative upload and pre-review → reports and diagnosis → budget and rule changes, so media buyers spend their time on creative strategy, bidding judgement and scaling.
- Ad accounts: the client’s own TikTok ad account opened under its real business entity; accounts that need industry entry approval (games, finance and similar) go through TikTok’s industry entry process; accounts can also be opened through an authorised agency. Every account belongs to the client, is never rented or shared, and is managed in the client’s own Business Center.
- Claude: natural-language reporting, TikTok’s official diagnosis agent, creative organisation and Smart+ build plans through the official TikTok for Business MCP Server, with every write tool confirmed before it runs.
- Codex: Python scripts on Marketing API v1.3 (report pulls, rate-limit retries, Smart+ builds created as DISABLE with idempotent request_id) that run in a sandbox or on a schedule.
- Human sign-off: a media buyer approves turning delivery on, budget increases and bid changes, and a person makes the final call on TikTok advertising policy for creatives and landing pages.
This describes a service capability only. There are no prices or rebates here, and PandaWM is not an official partner of TikTok, Anthropic or OpenAI. See TikTok Ads account opening & management (PandaWM service page) for account opening and management.
FAQ
Is deny enough without a hook?
Deny is the strongest rule for a tool name. The hook adds argument checks, such as a budget ceiling, that a name-based rule cannot express.
Can I make the whole server read-only?
Not with a server switch. Allow only read tools and deny the rest in Claude Code, or connect with a TikTok user that has limited account access.
Does prompt injection matter here?
Yes. Ad comments, landing pages and documents can carry instructions. Keep write tools behind ask and hooks; see Prompt injection explained: enterprise defense.
Where do I get Claude?
Claude is available in Anthropic’s supported regions; see How to get a Claude (Anthropic) API key.
Compliance note: Use every workflow in this guide only on TikTok ad accounts (including accounts assigned to you in a Business Center) that your company owns or is formally authorised to manage, through TikTok’s official TikTok API for Business, the TikTok for Business MCP Server or TikTok Ads Manager. Follow TikTok’s advertising policies, industry entry requirements and API rate limits, and keep a human review step before anything that can spend money. PandaWM does not sell, rent, share or transfer ad accounts, Business Centers or API credentials, does not help anyone bypass ad review, industry entry, regional restrictions or identity verification, and is not an official partner of TikTok, Anthropic or OpenAI. Claude and OpenAI services are only offered in their supported countries and regions; the account holder should be an entity legitimately established and operating in a supported region.
Related guides
- TikTok Ads account opening & management (PandaWM service page)
- Overseas AI Token service: account setup + API access (PandaWM)
- Claude for TikTok Upgraded Smart+ campaign automation
- How to connect Claude to TikTok Ads (step by step)
- Connect a Claude Agent SDK agent to the TikTok Ads MCP server
- Codex config.toml for the TikTok for Business MCP server
- TikTok Ads MCP server: let AI agents run your ads
- Claude Code guardrails for Google Ads (Google)
- Prompt injection explained: enterprise defense
Talk to PandaWM: TikTok Ads accounts + AI-assisted delivery
Tell us where your company is registered, your industry (and whether it needs industry entry approval), target countries, landing page, app or TikTok Shop, and expected monthly budget, plus which part you want to automate first (reporting, creatives, Smart+ builds or rules). We pre-check eligibility and creatives, help you open your own TikTok ad account compliantly, and wire Claude / Codex into your workflow.
WhatsApp: +852 5904 8602Telegram: @PANDA0134WeChat: szcwh99

Official sources
- TikTok: How to connect a ready-made agent to TikTok for Business MCP Server
- TikTok: How to connect a custom agent to TikTok for Business MCP Server
- TikTok: Available tools in TikTok for Business MCP Server
- TikTok API for Business: TikTok for Business MCP Server overview
- Anthropic: Connect Claude Code to tools via MCP
- Anthropic: Claude Code permissions
- Anthropic: Claude Code hooks reference
- Anthropic: Run Claude Code programmatically (claude -p)
- Anthropic: Supported regions
All official pages checked on 2026-11-16. API versions, tool names and permission requirements change; the official pages prevail.

微信扫一扫打赏
支付宝扫一扫打赏
