Content
# tiktok-mcp-server
A focused MCP server for the **TikTok Business API v1.3** — Smart+ TRAFFIC objective. 21 tools covering campaign creation, targeting search (locations, interests, behaviors), creative management, reporting, identity listing, and bulk status updates.
Single-file FastMCP server. NL parsing happens in the MCP client; this server provides the typed surface and validation against TikTok's Smart+ schema.
## Install
```bash
pip install -r requirements.txt
```
## Run
```bash
TIKTOK_ACCESS_TOKEN=<your-token> \
TIKTOK_ADVERTISER_ID=<your-advertiser-id> \
python server.py
```
Defaults to the **sandbox** base URL (`https://sandbox-ads.tiktok.com/open_api/v1.3`). For production:
```bash
TIKTOK_API_BASE_URL=https://business-api.tiktok.com/open_api/v1.3 \
TIKTOK_ACCESS_TOKEN=... \
TIKTOK_ADVERTISER_ID=... \
python server.py
```
### Where to get tokens
TikTok for Business → Developer Portal → create an app → request `Access-Token` for your advertiser ID. Use sandbox tokens for development (no real spend, no real audience reach).
## Tool surface
- **Campaigns / Ad Groups / Ads** — create, get, list, update, validate payloads
- **Targeting search** — locations, interests, behaviors
- **Creatives** — list creative assets, list app entries
- **Identity** — list Spark Ads identities
- **Reporting** — campaign-level insights with breakdown dimensions
- **Bulk ops** — bulk status updates across entities
All tools share the `tt_*` naming convention used in the multi-platform `meta-ads-mcp` sibling project.
## MCP client config
```json
{
"mcpServers": {
"tiktok-ads": {
"command": "python",
"args": ["/absolute/path/to/tiktok-mcp-server/server.py"],
"env": {
"TIKTOK_ACCESS_TOKEN": "...",
"TIKTOK_ADVERTISER_ID": "..."
}
}
}
}
```
## License
MIT