Guide / cursor
Connect Cursor to TikTok Ads MCP: Setup, Authentication, and First Query
Add TikTok's official Progressive Disclosure Ads MCP endpoint to Cursor, complete OAuth, verify tools, and run a copy-ready first read-only query.
This tutorial connects Cursor to the official TikTok for Business Ads MCP server. When you finish, you can list accessible advertiser accounts and query the last seven complete calendar days from a Cursor Agent chat.
Setup normally takes 5–10 minutes. You do not need to write integration code, create a TikTok developer app, or configure an API key.
What you will have when you finish
- TikTok Ads appears as connected in Cursor's MCP list.
- TikTok for Business OAuth is complete in your browser.
- Cursor can list advertiser accounts available to the current user.
- You have run a read-only query with account, date, time-zone, currency, and attribution context.
Before you start
| Requirement | Minimum | How to verify it |
|---|---|---|
| Cursor | Installed and signed in | You can open an Agent chat and send a message |
| TikTok for Business user | Able to sign in | Sign in once in your default browser |
| Ad-account access | Permission to view the target account and reports | View recent data in TikTok Ads Manager |
| Browser | Able to complete OAuth and a local callback | Temporarily disable popup or sign-in blockers |
| Account context | Target account, time zone, and currency are known | Check the account settings in Ads Manager |
If Cursor is not installed, download the macOS, Windows, or Linux version from the official Cursor download page, open it, and sign in.
Step 1: Verify Cursor
- Open Cursor.
- Open an Agent chat.
- Start a new conversation and send a test message.
Checkpoint: The Agent chat returns a response.
Step 2: Verify TikTok ad-account access
- Sign in to TikTok Ads Manager in your default browser.
- Switch to the account you plan to analyze.
- Record its account name, advertiser ID, time zone, and currency.
- Open reporting and confirm that your user can see recent data.
Checkpoint: The browser user already has view access to the target account. OAuth does not grant new permissions.
Step 3: Add the TikTok Ads MCP server
- Open Customize from the Cursor sidebar.
- Select MCP.
- Select Add New MCP Server.
- Enter:
| Field | Value |
|---|---|
| Name | TikTok Ads |
| Transport | Streamable HTTP |
| Server URL | https://business-api.tiktok.com/open_mcp/tt-ads-mcp-layer |
- Save and enable the server.
- Reload the Cursor window if the status does not refresh.
This is TikTok's official Progressive Disclosure endpoint. It initially loads about 40 core tools and discovers more when necessary.
Checkpoint: TikTok Ads appears on the MCP page. A sign-in or authentication status is expected.
Step 4: Configure mcp.json if the UI is unavailable
If the controls look different in your version, configure Cursor's global MCP file:
- macOS and Linux: ~/.cursor/mcp.json
- Windows: .cursor/mcp.json inside your user directory
Use:
{
"mcpServers": {
"tiktok-ads": {
"url": "https://business-api.tiktok.com/open_mcp/tt-ads-mcp-layer"
}
}
}
Save the file and reload the Cursor window. Global configuration is appropriate for personal use. Never place personal authentication data in a project .cursor/mcp.json file and commit it.
Checkpoint: tiktok-ads appears when you reopen the MCP page.
Step 5: Complete TikTok OAuth
- Find TikTok Ads on the MCP page.
- Select Connect or Authenticate.
- In the browser, sign in as the TikTok for Business user with access to the target account.
- Review the permissions and approve access.
- Return to Cursor and wait for the status to update.
- Reload the window once if necessary.
Do not paste a password, cookie, access token, or OAuth callback URL into chat. A normal OAuth flow completes between the browser and Cursor.
Checkpoint: TikTok Ads is connected and its tool list is not empty.
Step 6: Verify tools in Agent
Open a new Agent chat:
- Open the available-tools list.
- Confirm that TikTok Ads or tiktok-ads is enabled.
- Keep the default tool-call approval behavior instead of enabling unrestricted auto-run.
A shorter initial tool list is normal with Progressive Disclosure. If it shows zero tools, reload the window and verify the server endpoint.
Step 7: List accessible advertiser accounts
Paste:
Use only read operations from TikTok Ads MCP. 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 fields that were not returned as "unavailable." Do not infer them.
Do not create, edit, pause, or delete any campaign, ad group, ad, audience, budget, bid, or targeting setting.
When Cursor asks to approve a read tool, inspect the tool name and arguments before approving it.
Successful result: The response includes an account you recognize, and its advertiser ID, time zone, and currency match Ads Manager.
Step 8: Run the first read-only query
Replace 1234567890123456789 with a real advertiser ID:
Use only read operations from TikTok Ads MCP 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 response should clearly include:
- Account name and advertiser ID.
- Exact start and end dates, with today excluded.
- Account time zone and currency.
- Report level, filters, and sort order.
- Conversion event and attribution basis.
- A distinction between unavailable metrics and real zeros.
Ask Cursor to supply missing context before making a business decision.
Fast troubleshooting order
TikTok Ads is missing from the MCP page
Confirm that the server was saved at the intended scope, validate the JSON syntax, and reload the Cursor window.
The server exists but exposes no tools
Verify that the endpoint ends in tt-ads-mcp-layer and that the server is enabled. Remove extra spaces and reload.
The OAuth page does not open
Check your default browser and popup settings, then select authentication again from the MCP page.
Authentication succeeds but the account list is empty
Make sure the authorized user matches the current Ads Manager user. Ask a Business Center administrator to verify team-account assignments.
Tool calls are blocked
Check whether your Cursor team enforces an MCP allowlist or tool restrictions. An enterprise administrator may need to approve the endpoint and read tools.
The report is empty or differs from Ads Manager
Verify the advertiser ID, account time zone, date boundaries, currency, conversion event, attribution window, and report level. Start with a minimal query for the last three complete calendar days.
See TikTok Ads MCP Troubleshooting for the complete flow.
Credential and execution safety
- Never put passwords, cookies, access tokens, or OAuth callback URLs in prompts or mcp.json.
- A project-level mcp.json may be committed; it should contain only non-sensitive server configuration.
- Keep tool-call approvals on and inspect names and arguments before approving.
- Approve read tools only in this tutorial; reject create, update, pause, or delete operations.
- Put budget, bid, targeting, and status changes in a separate human-approval workflow.
Official references
- Cursor: Model Context Protocol
- Cursor: Official downloads
- TikTok for Business: About TikTok for Business MCP Server
After setup, continue with Analyze TikTok Ads Performance with AI.