Get the FREE Ultimate OpenClaw Setup Guide →

tiktok-ads

TikTok Ads MCP Server – Model Context Protocol Server for TikTok Ads Marketing API Integration

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio adsmcp-tiktok-ads-mcp-server python /path/to/adsmcp-server/run_server.py \
  --env TIKTOK_APP_ID="your_app_id" \
  --env TIKTOK_APP_SECRET="your_app_secret" \
  --env TIKTOK_ACCESS_TOKEN="your_access_token" \
  --env TIKTOK_ADVERTISER_ID="your_advertiser_id"

How to use

This MCP server provides a TikTok Ads integration for managing campaigns, ad groups, and performance analytics via the Model Context Protocol. It supports authentication flows for TikTok Ads, retrieving campaigns and ad groups, and obtaining performance metrics. You can authenticate, select an advertiser account, fetch campaigns, and pull detailed performance data for reporting and optimization. The server exposes tools such as tiktok_ads_login, tiktok_ads_get_campaigns, tiktok_ads_get_campaign_details, tiktok_ads_get_adgroups, tiktok_ads_get_campaign_performance, and tiktok_ads_get_adgroup_performance to power conversational automation workflows and reporting dashboards. To use it, configure the MCP client with the tiktok-ads server entry and provide the necessary environment credentials for TikTok Ads API access. The integration is designed to support multi-account management, OAuth flows, and rate-limited, retry-enabled API calls.

How to install

Prerequisites:

  • Python 3.10+
  • Git
  • Access to TikTok For Business API (developer account, app registration, and API credentials)

Local Installation:

# Clone the repository (replace with your actual repo URL)
git clone <repository-url>
cd adsmcp-server

# Create a virtual environment
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate

# Install dependencies in editable mode
pip install -e .

Using uv (recommended):

# Install uv if not already installed
pip install uv

# Run the MCP server (example command)
uv sync

If you prefer running the server directly with Python (alternative):

# Activate venv if not already active
source venv/bin/activate

# Run the server script directly (adjust path as needed)
python /path/to/adsmcp-server/run_server.py

Remote MCP Server Option: If you prefer using AdsMCP remote server, you can connect your TikTok Ads accounts via AdsMCP Remote MCP Server Setup Guide. This eliminates local configuration and dependencies while enabling quick onboarding.

Additional notes

Tips and notes:

  • Keep API credentials secure; use environment variables and avoid committing them to version control.
  • Ensure OAuth tokens are rotated and stored securely; implement token refresh logic where applicable.
  • The server includes rate limiting and retry logic to handle TikTok API rate limits; consider configuring backoff strategies in your client.
  • Verify that you have the correct Advertiser ID and permissions for the actions you intend to perform (campaign management, creative uploads, etc.).
  • When testing, start with a sandbox or limited accounts to avoid unintended ad spend or changes.
  • If you encounter authentication failures, re-run the OAuth flow and double-check App ID/Secret scopes and redirect URIs.
  • For production deployments, consider using HTTPS, proper secret management, and monitoring of API usage and errors.

Related MCP Servers

Sponsor this space

Reach thousands of developers