A local Model Context Protocol (MCP) server for TikTok Ads API integration. It lets MCP clients such as Claude Desktop connect to TikTok Ads, authenticate with a TikTok Business app, and use read-only tools for campaign lookup, ad group and ad inspection, performance reporting, audience breakdowns, advertiser info, pixels, and targeting locations.
Hosted Option
TikTok Ads MCP Server – Model Context Protocol Server for TikTok Ads Marketing API Integration
Estrelas
54
Ferramentas
—
Disponibilidade
—
This repository is for users who want to run a local TikTok Ads MCP server.
If you do not want to install Python, manage dependencies, or configure a TikTok developer app, AdsMCP provides a hosted remote MCP server:
git clone https://github.com/AdsMCP/tiktok-ads-mcp-server.git
cd tiktok-ads-mcp-server
uv sync
Find the absolute path to the project directory. You will use this path in the MCP config as the uv --directory value:
macOS and Linux:
pwd
Windows PowerShell:
Get-Location
Verify that the project environment can import MCP:
uv run python -c "from mcp.server import Server; print('ok')"
You should see:
ok
Important: Use uv to Run the Server
Do not configure your MCP client to run this server with system python or python3 unless you have manually installed all dependencies into that exact Python environment.
Use this:
uv run python run_server.py
Not this:
python run_server.py
python3 run_server.py
Why: MCP desktop apps often launch a different Python than the one you use in your terminal. If that Python does not have the mcp package installed, the server exits with:
No module named 'mcp'
uv run makes the MCP client use this project's dependency environment.
Linux paths vary by distribution and client package, but they are usually under:
~/.config/Claude/
macOS / Linux Config
Use uv --directory so the server starts from the project directory even if your MCP client does not apply cwd correctly.
To fill in "/absolute/path/to/tiktok-ads-mcp-server", open a terminal in the cloned repository and run:
pwd
Use the printed value as the --directory argument. If Claude cannot find uv, replace "uv" with the absolute path from whereis uv or which uv, such as "/Users/yourname/.local/bin/uv".
tiktok_ads_get_pixel_list - List pixels attached to the advertiser account.
tiktok_ads_get_pixel_event_stats - Get pixel event activity for a date range.
Implementation Audit
Current MCP tools are only listed when they are wired to real OAuth, local token
state, or TikTok Marketing API calls. This repository does not expose placeholder
or mock tools.
Tool
Backing implementation
tiktok_ads_login
Starts TikTok OAuth and returns an authorization URL.
tiktok_ads_complete_auth
Exchanges an OAuth code for TikTok tokens and stores them locally.
tiktok_ads_auth_status
Checks local configuration and saved token state.
tiktok_ads_switch_ad_account
Switches the active local advertiser account after authentication.
tiktok_ads_get_campaigns
Calls TikTok Marketing API campaign/get/.
tiktok_ads_get_campaign_details
Calls TikTok Marketing API campaign/get/ with campaign_ids filtering.
tiktok_ads_get_adgroups
Calls TikTok Marketing API adgroup/get/.
tiktok_ads_get_adgroup_details
Calls TikTok Marketing API adgroup/get/ with adgroup_ids filtering.
tiktok_ads_get_ads
Calls TikTok Marketing API ad/get/.
tiktok_ads_get_ad_details
Calls TikTok Marketing API ad/get/ with ad_ids filtering.
tiktok_ads_get_campaign_performance
Calls TikTok Marketing API report/integrated/get/ at campaign level.
tiktok_ads_get_adgroup_performance
Calls TikTok Marketing API report/integrated/get/ at ad group level.
tiktok_ads_get_ad_performance
Calls TikTok Marketing API report/integrated/get/ at ad level.
tiktok_ads_get_audience_breakdown
Calls TikTok Marketing API report/integrated/get/ with report_type=AUDIENCE.
tiktok_ads_wasted_spend_audit
Read-only workflow that calls campaign/get/, adgroup/get/, and report/integrated/get/.
tiktok_ads_get_custom_audiences
Calls TikTok Marketing API dmp/custom_audience/list/.
tiktok_ads_get_advertiser_info
Calls TikTok Marketing API advertiser/info/ and enriches with recent spend dates from report/integrated/get/.
tiktok_ads_get_location_info
Calls TikTok Marketing API tool/targeting/info/.
tiktok_ads_get_pixel_list
Calls TikTok Marketing API pixel/list/.
tiktok_ads_get_pixel_event_stats
Calls TikTok Marketing API pixel/event/stats/.
Roadmap
Planned areas:
Broader GMV Max campaign coverage.
Safe write operations for campaigns, ad groups, ads, and assets.
Creative and asset management.
Full async report lifecycle: create, status, and download.
Targeting discovery and audience management.
Troubleshooting
Failed to spawn process: No such file or directory
The MCP client cannot find the command you configured.
Fix:
Use "command": "uv" if uv is on the app's PATH.
Otherwise use the full path, for example:
"command": "/Users/yourname/.local/bin/uv"
No module named 'mcp'
You are running the server with system Python instead of the project's environment.
The server did not receive TIKTOK_APP_ID or TIKTOK_APP_SECRET.
Fix:
Add both values under env in your MCP client config.
Restart your MCP client after changing the config.
OAuth succeeds, but tools still say unauthenticated
Check whether the token file exists:
ls ~/.tiktok_ads_mcp/tokens.json
If you want to restart authentication, remove the token file and run tiktok_ads_login again:
rm ~/.tiktok_ads_mcp/tokens.json
Claude Desktop still shows the old error after config changes
Fully quit and reopen Claude Desktop. On macOS, closing the window is not always enough.
Security Notes
Do not commit .env, token files, App Secrets, or OAuth codes.
Keep ~/.tiktok_ads_mcp/tokens.json private.
Use a TikTok developer app with only the permissions you need.
The current public MCP registry is read-only for TikTok Ads objects. Write operations are roadmap items and should be reviewed carefully before being exposed.
Development
Install dependencies:
uv sync
Run tests:
uv run --extra dev pytest
Run the server manually:
uv run python run_server.py
License
This project is licensed under the MIT License. See LICENSE for details.
Support
For issues and questions, please create an issue in this repository.
T
Tiktok Ads
AdsMCP·54 estrelas·
TikTok Ads MCP Server – Model Context Protocol Server for TikTok Ads Marketing API Integration
Ainda não há lista de ferramentas. Servidores remotos recebem uma após a primeira verificação de saúde.
Perguntas frequentes
Perguntas
Como instalo Tiktok Ads?
Copie nesta página a configuração stdio para Cursor, Claude Desktop, Claude Code ou VS Code. Ela usa a instalação do publicador, não um proxy do PlugMCP.
Tiktok Ads precisa de uma chave de API?
Este registro não lista nenhuma variável de ambiente obrigatória.
Qual transporte Tiktok Ads usa?
Tiktok Ads roda localmente via stdio.
Quando Tiktok Ads foi verificado pela última vez?
Última verificação: 2026-10-27. TikTok Ads MCP Server – Model Context Protocol Server for TikTok Ads Marketing API Integration