YT

ysntony/tiktok-ads-mcp

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

46 stars 8 forks 质量 82 趋势 20MIT

ysntony/tiktok-ads-mcp 是从 https://github.com/ysntony/tiktok-ads-mcp. 导入的 MCP 服务器候选

概览

ysntony/tiktok-ads-mcp 是从 https://github.com/ysntony/tiktok-ads-mcp. 导入的 MCP 服务器候选

概述(AI 翻译)

一个只读的模型上下文协议(MCP)服务器,用于检索TikTok广告账户、活动、广告组、广告和绩效报告。

特色

  • 只读TikTok商业API集成:访问所有主要TikTok广告终端进行数据检索
  • 6 只读工具:业务中心、广告账户、活动、广告组、广告和报表
  • 与API对齐的过滤:为广告活动、广告组、广告和报告进行筛选和分页
  • 多广告主支持:在一次请求中处理多个广告主账户
  • 灵活报告:生成带有自定义维度和指标的详细绩效报告
  • 当前数据:检索当前广告数据和绩效指标
  • 错误处理:全面的错误处理与验证
  • 模块化架构:干净、可维护的代码结构
  • 安全操作:所有工具均为只读,不会修改您的广告活动或广告数据

可用工具

  1. get_business_centers - 通过您的访问令牌检索到的商务中心
  2. get_authorized_ad_accounts - 获取所有授权广告主账户

本页由 AI 翻译,技术细节请以原文为准。

README

以下为原文 README 节选,完整内容请查看原文。

TikTok Ads MCP

A read-only Model Context Protocol (MCP) server for retrieving TikTok advertising accounts, campaigns, ad groups, ads, and performance reports.

Features

  • Read-Only TikTok Business API Integration: Access all major TikTok advertising endpoints for data retrieval
  • 6 Read-Only Tools: Business centers, ad accounts, campaigns, ad groups, ads, and reports
  • API-aligned Filtering: Filtering and pagination for campaigns, ad groups, ads, and reports
  • Multi-Advertiser Support: Handle multiple advertiser accounts in a single request
  • Flexible Reporting: Generate detailed performance reports with custom dimensions and metrics
  • Current Data: Retrieve current advertising data and performance metrics
  • Error Handling: Comprehensive error handling and validation
  • Modular Architecture: Clean, maintainable code structure
  • Safe Operations: All tools are read-only and will not modify your campaigns or ad data

Available Tools

  1. get_business_centers - Retrieve business centers accessible by your access token
  2. get_authorized_ad_accounts - Get all authorized advertiser accounts
  3. get_campaigns - Retrieve campaigns with filtering and pagination
  4. get_ad_groups - Retrieve ad groups with filtering and pagination
  5. get_ads - Retrieve ads with filtering and pagination
  6. get_reports - Generate performance reports and analytics

Prerequisites

  • Python 3.10 or higher
  • TikTok Business API access
  • Valid API credentials (app ID, secret, access token)

Quick Start

Installation

  1. Download the TikTok Ads MCP

    • Click the green “Code” button at the top of the GitHub page
    • Select “Download ZIP”
    • Unzip the downloaded file to a location you can easily find (like your Documents folder)
  2. Alternatively, if you’re familiar with Git:

    git clone https://github.com/ysntony/tiktok-ads-mcp.git
    
  3. Install Dependencies

    cd tiktok-ads-mcp
    pip install -e .
    # or with uv
    uv pip install -e .
    

Configuration

  1. Set up environment variables in your MCP client configuration:
{
  "mcpServers": {
    "tiktok-ads": {
      "command": "python",
      "args": ["-m", "tiktok_ads_mcp"],
      "env": {
        "TIKTOK_APP_ID": "your_app_id",
        "TIKTOK_SECRET": "your_secret",
        "TIKTOK_ACCESS_TOKEN": "your_access_token"
      }
    }
  }
}
  1. Required credentials:

    • TIKTOK_APP_ID: Your TikTok app ID
    • TIKTOK_SECRET: Your TikTok app secret
    • TIKTOK_ACCESS_TOKEN: Your access token

    How to get these credentials:

    1. Go to the TikTok for Business Developers portal and log in.
    2. Click “My Apps” and create a new app.
    3. Select “Marketing API” as the service type.
    4. In the app settings, enable permissions related to Reading and Reporting (e.g., Ads Management, Reporting).
在 GitHub 查看完整 README

安装

This server does not publish a one-line install command.

Open the repository installation guide 新手?先看 mcpskill.org 教程 →

配置

{ "mcpServers": { "tiktok-ads": { "command": "python", "args": ["-m", "tiktok_ads_mcp"], "env": { "TIKTOK_APP_ID": "your_app_id", "TIKTOK_SECRET": "your_secret", "TIKTOK_ACCESS_TOKEN": "your_access_token" } } } }