← Back to guides

Guide / claude-code

Connect Claude Code to TikTok Ads MCP: Setup, Authentication, and First Query

Install and sign in to Claude Code, add TikTok's official full-disclosure Ads MCP endpoint, complete OAuth, and run a copy-ready first read-only query.

By AdsDecideUpdated 2026-08-20

This guide connects Claude Code to the official TikTok for Business Ads MCP server. When you finish, Claude Code can list the advertiser accounts you may access and run a read-only report for the last seven complete calendar days.

The process normally takes 5–10 minutes and does not require a TikTok developer app or API key.

What you will have when you finish

  • TikTok Ads MCP is added and connected in Claude Code.
  • TikTok for Business OAuth is complete in your browser.
  • Claude Code can list advertiser accounts available to your user.
  • You have run a read-only query with account, date, time-zone, currency, and attribution context.

Before you start

RequirementMinimumHow to verify it
Claude CodeInstalled and signed inclaude --version returns a version in your terminal
TikTok for Business userAble to sign inSign in once in your default browser
Ad-account accessPermission to view the target account and reportsView recent data in TikTok Ads Manager
TerminalAble to run Claude Code commandsUse Terminal on macOS/Linux or PowerShell on Windows
BrowserAble to complete OAuth and a local callbackTemporarily disable popup or sign-in blockers

If Claude Code is not installed, follow the official setup documentation. Then open a terminal and run:

claude --version

If the command is not found, close and reopen the terminal before checking the install and PATH instructions.

Step 1: Sign in and verify Claude Code

  1. Run claude in your terminal.
  2. Follow the sign-in instructions.
  3. Send a test message after the session opens.
  4. Exit the session and return to the terminal.

Checkpoint: The claude command starts a session and responds to a test message.

Step 2: Verify TikTok ad-account access

  1. Sign in to TikTok Ads Manager in your default browser.
  2. Switch to the account you plan to analyze.
  3. Record its account name, advertiser ID, time zone, and currency.
  4. Open reporting and confirm that your user can see recent data.

Checkpoint: The browser user already has access to the target account. OAuth does not grant new ad-account permissions.

Step 3: Add TikTok Ads MCP

Copy and run this single command:

claude mcp add --transport http --scope user tiktok-ads https://business-api.tiktok.com/open_mcp/tt-ads-mcp-flat

The command:

  • Uses remote HTTP transport.
  • Names the server tiktok-ads.
  • Saves it at user scope so it is available across your projects.
  • Uses TikTok's official Full Disclosure endpoint, the mode TikTok recommends for Claude.

Full Disclosure exposes about 400 tools at connection time, so the initial load may take longer than a small MCP server.

Checkpoint: The command finishes without a configuration error.

Step 4: Inspect the server configuration

Run:

claude mcp list

tiktok-ads should appear. To inspect its details, run:

claude mcp get tiktok-ads

Confirm that the type is http and the URL ends in tt-ads-mcp-flat.

Step 5: Complete TikTok OAuth

  1. Run claude to enter a session.
  2. Enter /mcp.
  3. Select tiktok-ads from the server list.
  4. Choose authentication and sign in to TikTok for Business in the browser.
  5. Review the requested permissions and approve access.
  6. Return to Claude Code and enter /mcp again.

If the browser does not open, copy the authorization link shown by Claude Code into your default browser. If authorization succeeds but the browser callback fails, follow Claude Code's prompt to paste the full callback URL into its URL prompt. Do not send that callback URL in chat or publish it.

Checkpoint: The /mcp panel shows tiktok-ads as connected with an available tool count.

Step 6: List accessible advertiser accounts

Paste this into the Claude Code session:

Use only read operations from the tiktok-ads MCP server. List the TikTok advertiser accounts available to the currently authorized user.

For each account, return:
- account name
- advertiser ID
- account status
- time zone
- currency

Mark a field as "unavailable" when it is not returned. Do not infer it.
Do not create, edit, pause, or delete any campaign, ad group, ad, audience, budget, bid, or targeting setting.

Successful result: The response contains an account you recognize, and its advertiser ID, time zone, and currency match Ads Manager.

Step 7: Run the first read-only query

Replace 1234567890123456789 with the advertiser ID from the previous step:

Use only read operations from the tiktok-ads MCP server to analyze advertiser ID 1234567890123456789.

Requirements:
1. First confirm the account name, advertiser ID, time zone, and currency.
2. Use the last seven complete calendar days ending yesterday in the account time zone. Exclude today.
3. Summarize by campaign: status, spend, impressions, clicks, CTR, CPC, conversions, CVR, CPA, conversion value, and ROAS.
4. Sort by spend descending and include an account-total row.
5. State the conversion event and attribution basis.
6. Mark fields that were not returned as "unavailable." Do not guess or treat them as zero.
7. End with no more than three anomalies for human review and include supporting data.

Do not create, edit, pause, or delete any campaign, ad group, ad, audience, budget, bid, or targeting setting. Do not execute optimization recommendations.

How to know the result is usable

The result should clearly include:

  • Account name and advertiser ID.
  • Exact start and end dates, with today excluded.
  • Account time zone and currency.
  • Reporting level, filters, and sort order.
  • Conversion event and attribution basis.
  • A distinction between unavailable metrics and actual zeros.

Ask for missing context before changing campaign decisions.

Fast troubleshooting order

The claude command is missing

Open a new terminal and run claude --version. If it still fails, return to the official setup guide and check the install location and PATH.

tiktok-ads is not listed

Run the add command again. The --transport and --scope options must appear before the server name, and the URL must be complete.

/mcp says authentication is required

Select tiktok-ads to start OAuth. If no browser opens, manually open the authorization link from the panel.

The server disconnects after authentication

Sign in to the correct user in your default browser and authenticate again from /mcp. If an organization policy blocks personal MCP servers, ask your administrator to approve the endpoint.

The account list is empty

Confirm that the same user can see the account in Ads Manager. Ask a Business Center administrator to verify the assignment for team accounts.

There are many tools or loading is slow

Full Disclosure exposes about 400 tools, so a slower first connection is expected. Wait for it to finish, then check /mcp.

The data differs from Ads Manager

Compare the time zone, date boundaries, currency, conversion event, attribution window, and report level. Pay particular attention to whether Ads Manager includes today.

See TikTok Ads MCP Troubleshooting for the complete sequence.

Credential and execution safety

  • Never paste passwords, cookies, access tokens, or OAuth callback URLs into prompts or commands.
  • Do not put personal authentication values in a project .mcp.json file and commit it.
  • Use read operations for the first query and explicitly prohibit writes.
  • Reject any approval for create, update, pause, or delete tools during this tutorial.
  • Put budget, bid, targeting, and status changes in a separate human-approval workflow.

Official references

After the connection works, continue with Analyze TikTok Ads Performance with AI.