mcpField
T
TikTok GMV Max

TikTok GMV Max

Local
github.com/Buer2333Business & Marketing0Updated 1w ago

About TikTok GMV Max

TikTok GMV Max is a read-only MCP server for merchants and marketing teams querying the TikTok Business API. It covers GMV Max, ads, reports, and Business Center finance, with reporting aligned to shop time zones and non-USD amounts converted to USD.

Key features

  1. 01Inspect GMV Max campaigns, budgets, and videos
  2. 02Browse ad accounts, ad groups, and ads
  3. 03Generate performance and creative reports
  4. 04Check Business Center balances and transactions
  5. 05Retrieve trending hashtags
  6. 06Align reports to shop time zones and convert currencies

Use cases

  1. 01Review GMV Max campaign ROI and performance
  2. 02Reconcile ad spend and orders by shop date
  3. 03Check Business Center funds and account spend
  4. 04Compare video engagement across ad creatives

MCP support

The MCP server exposes 24 read-only TikTok Business API tools for querying GMV Max, ads, reports, finance, and trending topics.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

mcp.json · Universal config
{
"mcpServers": {
"buer2333-tiktok-gmvmax": {
"command": "uvx",
"args": [
"tiktok-gmvmax-mcp"
],
"env": {
"TIKTOK_APP_ID": "<TIKTOK_APP_ID>",
"TIKTOK_SECRET": "<TIKTOK_SECRET>",
"TIKTOK_ACCESS_TOKEN": "<TIKTOK_ACCESS_TOKEN>",
"TIKTOK_ACCESS_TOKEN_2": "<TIKTOK_ACCESS_TOKEN_2>"
}
}
}
}
Run commanduvx tiktok-gmvmax-mcp
Environment variables to set
TIKTOK_APP_IDTikTok Business API app ID
TIKTOK_SECRETSecretTikTok Business API app secret
TIKTOK_ACCESS_TOKENSecretLong-lived Business API access token
TIKTOK_ACCESS_TOKEN_2SecretOptional second token, tried on permission errors

Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.

Packages
pypitiktok-gmvmax-mcp0.2.0

Tools

No tool list yet

Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.

Details

From the project README

TikTok GMV Max MCP

A read-only Model Context Protocol server for the TikTok Business (Marketing) API, with first-class GMV Max support. Ask your assistant how your GMV Max campaigns, regular ads, and Business Center budgets are doing, and get answers in your shop's timezone and in USD.

It runs daily in production behind a multi-shop TikTok Shop reporting stack, so most of the code beyond plain API wrappers handles things the raw API gets wrong. Report days are realigned from the ad account's timezone to the shop's. Non-USD accounts are converted at that day's rate. TikTok's transient 51010 timeouts are retried.

Started as a fork of ysntony/tiktok-ads-mcp (MIT), which covers the six core campaign/report tools. This project adds GMV Max, timezone-aligned and range reports, creatives, Business Center finance and trending hashtags, and is published separately as tiktok-gmvmax-mcp. The Python import package is still tiktok_ads_mcp, so don't install both distributions into the same environment.

Tools (24, all read-only)

GMV Max

ToolWhat it returns
get_gmvmax_campaigns_toolGMV Max campaigns with status and ROI-protection info
get_gmvmax_campaign_info_toolBudget, bid, products and schedule for one campaign
get_gmvmax_reports_toolGMV Max performance reports (/gmv_max/report/get/)
get_gmvmax_report_aligned_toolOne shop-timezone day, rebuilt from hourly data: cost, gross revenue, orders, ROI
get_gmvmax_range_report_toolAggregate cost / GMV / orders / ROI for a date range
get_gmvmax_videos_toolVideos available to GMV Max for a store
get_gmvmax_store_list_toolStores linked to a GMV Max advertiser

Accounts, campaigns and ads

ToolWhat it returns
get_business_centers_toolBusiness Centers visible to the token
get_authorized_ad_accounts_toolAll authorized advertiser accounts
get_campaigns_tool / get_ad_groups_tool / get_ads_toolCampaign, ad group and ad lists with filtering
get_identities_toolTikTok identities (creator accounts) authorized to an advertiser
get_video_info_toolVideo asset URL, poster and duration by video ID

Reporting

ToolWhat it returns
get_reports_toolIntegrated reports with custom dimensions and metrics
get_ads_report_aligned_toolManual-bid ads, one shop-timezone day: cost, GMV, orders, ROAS
get_ads_range_report_toolManual-bid ads aggregate for a date range
get_creative_report_toolCreative-level video insights (engagement, play metrics)

Business Center finance

ToolWhat it returns
get_advertiser_balance_toolBalance and basic info per advertiser (≤100 IDs per call)
get_bc_balance_toolBusiness Center available funds
get_bc_account_cost_toolSpend per ad account under a BC for a date range
get_bc_transactions_toolTop-ups and deductions at BC or advertiser level
get_bc_budget_changelog_toolWho changed an advertiser's budget, and when

Discovery

ToolWhat it returns
get_trending_list_toolTrending hashtags by country (7 or 30 days), optional daily history

Install

Requires Python 3.10+.

uvx tiktok-gmvmax-mcp          # run without installing
# or
pip install tiktok-gmvmax-mcp  # provides the `tiktok-gmvmax-mcp` command

Configure

Create an app in the TikTok for Business developer portal, grant it read permissions for the endpoints you need (ad accounts, campaigns and ads, reporting, GMV Max, Business Center), and generate a long-lived access token.

VariableRequiredMeaning
TIKTOK_APP_IDyesApp ID
TIKTOK_SECRETyesApp secret
TIKTOK_ACCESS_TOKENyesAccess token
TIKTOK_ACCESS_TOKEN_2noSecond token (e.g. another Business Center), tried on permission errors
TIKTOK_ADVERTISER_IDnoDefault advertiser
TIKTOK_SANDBOXnotrue to use the sandbox API
TIKTOK_REQUEST_TIMEOUTnoSeconds, default 30
TIKTOK_ADS_PROXYnoProxy URL used only for Business API calls
LARK_BOT_CACHE_DIRnoWhere FX rates are cached (default ~/.cache/lark-bot)

Versions before 0.2 read the token from TIKTOK_ACCESS_TOKEN_XINCHENG / TIKTOK_ACCESS_TOKEN_ZECHENG. Those names still work.

Claude Desktop / Claude Code (mcpServers):

{
  "mcpServers": {
    "tiktok-gmvmax": {
      "command": "uvx",
      "args": ["tiktok-gmvmax-mcp"],
      "env": {
        "TIKTOK_APP_ID": "your_app_id",
        "TIKTOK_SECRET": "your_secret",
        "TIKTOK_ACCESS_TOKEN": "your_access_token"
      }
    }
  }
}

Behavior worth knowing

  • Timezones. TikTok reports days in the ad account's timezone. The *_aligned_tools fetch hourly rows and re-aggregate them into a day in the shop's timezone, so ad spend lines up with shop orders.
  • Currency. Cost and revenue from non-USD accounts are converted to USD at that day's ECB midpoint rate (Frankfurter). If the rate API is down, a small built-in table of approximate rates is used for that call only and never cached; any other currency is then returned unconverted (rate 1.0) with a logged error.
  • Retries. Code 51010 (TikTok backend timeout) is retried with backoff at the client layer. Rate-limit and 5xx errors are retried too.
  • mcp 1.x and 2.x. Both work: the server imports MCPServer (2.x) and falls back to FastMCP (1.x).

Development

git clone https://github.com/Buer2333/tiktok-ads-mcp && cd tiktok-ads-mcp
python -m venv .venv && .venv/bin/pip install -e ".[dev]"
.venv/bin/python -m pytest tests -q

Issues and PRs are welcome. Please include a test with any behavior change.

Changelog

0.2.0
  • Published as tiktok-gmvmax-mcp (the PyPI name tiktok-ads-mcp belongs to the upstream project).
  • Generic TIKTOK_ACCESS_TOKEN / TIKTOK_ACCESS_TOKEN_2. The legacy names still work.
  • CLI logs go to stderr, so stdout stays clean for the stdio protocol.
  • FX: a fallback rate used during an API outage is no longer cached permanently.
  • 18 tools added since the fork: GMV Max, aligned and range reports, creatives, Business Center finance, identities, trending. Also added: account discovery, 51010 retry, USD conversion, mcp 2.x compatibility.
0.1.x (upstream)

License

MIT. See LICENSE.

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.