Tencent Ad MCP Server
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Tencent Ad MCP Server Show me yesterday's ad performance report."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
腾讯广告 MCP Server
将腾讯广告 Marketing API v3.0 全部接口封装为 MCP (Model Context Protocol) 工具,让 AI 助手(Claude Code、Claude Desktop 等)直接操作腾讯广告。
特性
358 个 MCP 工具,覆盖腾讯广告 Marketing API v3.0 全部接口
核心模块(广告组、创意、报表等)手写精细 schema,其余从官方 Go SDK 自动生成
OAuth token 自动刷新 + 本地持久化
支持 Claude Code / Claude Desktop / 任何 MCP 客户端
Related MCP server: meta-mcp
覆盖模块
模块 | 说明 |
广告组 (adgroups) | 创建、查询、更新、删除、调价、调预算、暂停/启动 |
创意 (dynamic_creatives) | 创建、查询、更新、删除创意 |
素材 (images/videos) | 图片和视频的上传、查询、删除 |
报表 (reports) | 日报、时报、异步报表任务 |
人群 (audiences) | 自定义人群管理、定向查询 |
资金 (funds) | 账户余额查询、资金划转 |
线索 (leads) | 线索列表、创建、认领 |
账户 (advertiser) | 账户信息、日预算管理 |
更多... | 微信渠道、落地页、转化追踪、批量操作、AI素材 等 200+ 接口 |
安装
git clone https://github.com/andyleimc-source/tencent-ad-mcp.git
cd tencent-ad-mcp
npm install
npm run buildClaude Code
推荐(使用编译产物,启动快、无额外依赖):
claude mcp add --scope user tencent-ad -- node /path/to/tencent-ad-mcp/dist/index.jsclaude mcp add --scope user tencent-ad -- npx tsx /path/to/tencent-ad-mcp/src/index.ts注意:如果
tsx未全局安装,npx需要下载依赖,可能导致启动超时。
Claude Desktop
在 claude_desktop_config.json 中添加:
{
"mcpServers": {
"tencent-ad": {
"type": "stdio",
"command": "node",
"args": ["/path/to/tencent-ad-mcp/dist/index.js"],
"env": {
"TENCENT_AD_CLIENT_ID": "your_app_id",
"TENCENT_AD_CLIENT_SECRET": "your_client_secret",
"TENCENT_AD_ACCESS_TOKEN": "your_access_token",
"TENCENT_AD_REFRESH_TOKEN": "your_refresh_token",
"TENCENT_AD_ACCOUNT_ID": "your_account_id"
}
}
}
}环境变量
变量 | 必填 | 说明 |
| 是 | OAuth 应用 ID |
| 是 | OAuth 应用密钥 |
| 是 | 访问令牌 |
| 是 | 刷新令牌 |
| 否 | 默认广告主账户 ID |
| 否 | Token 持久化路径(默认 |
获取凭证
注册腾讯广告开发者:https://developers.e.qq.com
创建应用,获取
client_id和client_secret在开发者工具页面获取
access_token和refresh_token在广告投放后台 (e.qq.com) 获取
account_id
开发
npm run dev # 开发模式(tsx 直接运行)
npm run build # 编译 TypeScript
npm run start # 运行编译产物重新生成工具(需要先克隆官方 Go SDK):
git clone --depth 1 https://github.com/TencentAd/marketing-api-go-sdk.git /tmp/marketing-api-go-sdk
npm run generateLicense
Apache-2.0
关注我
雷码工坊笔记 — 微信扫码关注
Available Tools
42 toolsadcreative_previews_getC
获取创意预览 (Get creative previews)
Inputs: filtering (required), account_id (required).
adgroups_addC
创建广告组 (Create ad group)
Inputs: account_id (required), adgroup_name (required), marketing_goal (required), bid_mode, +10 more.
adgroups_deleteB
删除广告组 (Delete ad group)
Inputs: account_id (required), adgroup_id (required).
adgroups_getC
获取广告组列表 (Get ad groups)
Inputs: account_id (required), page, fields, filtering, +1 more.
adgroups_updateC
更新广告组 (Update ad group)
Inputs: account_id (required), adgroup_id (required), end_date, begin_date, +4 more.
adgroups_update_bid_amountC
更新广告组出价 (Update ad group bid amount)
Inputs: account_id (required), adgroup_id (required), bid_amount (required).
adgroups_update_configured_statusB
更新广告组状态 (Update ad group status: enable/pause)
Inputs: account_id (required), adgroup_id (required), configured_status (required).
adgroups_update_daily_budgetC
更新广告组日预算 (Update ad group daily budget)
Inputs: account_id (required), adgroup_id (required), daily_budget (required).
advertiser_addB
添加服务商子客 (Add sub-account under agency)
Inputs: account_id (required), corporation_name (required), certification_image_id.
advertiser_getC
获取广告主信息 (Get advertiser info)
Inputs: page, fields, page_size, account_id.
advertiser_updateC
更新广告主信息 (Update advertiser info)
Inputs: account_id (required), daily_budget, corporation_name.
advertiser_update_daily_budgetB
更新广告主日预算 (Update advertiser daily budget)
Inputs: account_id (required), daily_budget (required).
async_report_files_getC
下载异步报表文件 (Get async report file download URL)
Inputs: task_id (required), account_id (required).
async_reports_addC
创建异步报表任务 (Create async report task)
Inputs: level (required), fields (required), group_by (required), account_id (required), +3 more.
async_reports_getC
查询异步报表任务状态 (Get async report task status)
Inputs: page, filtering, page_size, account_id.
custom_audiences_addC
创建自定义人群 (Create custom audience)
Inputs: account_id (required), audience_name (required), audience_type (required), description.
custom_audiences_deleteB
删除自定义人群 (Delete custom audience)
Inputs: account_id (required), audience_id (required).
custom_audiences_getC
获取自定义人群列表 (Get custom audiences)
Inputs: account_id (required), page, fields, filtering, +1 more.
custom_audiences_updateB
更新自定义人群 (Update custom audience)
Inputs: account_id (required), audience_id (required), description, audience_name.
daily_reports_getC
获取日报表数据 (Get daily reports)
Inputs: level (required), fields (required), group_by (required), date_range (required), +5 more.
dynamic_creatives_addB
创建创意 (Create dynamic creative)
Inputs: account_id (required), adgroup_id (required), creative_components, creative_template_id.
dynamic_creatives_deleteB
删除创意 (Delete dynamic creative)
Inputs: account_id (required), dynamic_creative_id (required).
dynamic_creatives_getB
获取创意列表 (Get dynamic creatives)
Inputs: account_id (required), page, fields, filtering, +1 more.
dynamic_creatives_updateC
更新创意 (Update dynamic creative)
Inputs: account_id (required), dynamic_creative_id (required), creative_components.
funds_getC
获取资金账户信息 (Get fund account info)
Inputs: account_id (required), fields.
fund_transfer_addB
资金划转 (Transfer funds between accounts)
Inputs: amount (required), account_id (required), transfer_type (required), external_bill_no.
hourly_reports_getC
获取时报表数据 (Get hourly reports)
Inputs: level (required), fields (required), group_by (required), account_id (required), +4 more.
images_addC
上传图片素材 (Upload image via URL or base64)
Inputs: signature (required), account_id (required), upload_type (required), image_url, +1 more.
images_deleteC
删除图片素材 (Delete image)
Inputs: image_id (required), account_id (required).
images_getC
获取图片素材列表 (Get images)
Inputs: page, fields, filtering, page_size, +1 more.
images_updateB
更新图片素材信息 (Update image info)
Inputs: image_id (required), account_id (required), description.
leads_addB
创建线索 (Create lead)
Inputs: lead_name (required), account_id (required), lead_phone.
leads_claim_updateC
认领线索 (Claim lead)
Inputs: account_id (required), lead_clue_id (required).
leads_list_getD
获取线索列表 (Get leads list)
Inputs: account_id (required), time_range (required), page, fields, +2 more.
leads_updateC
更新线索 (Update lead)
Inputs: lead_id (required), account_id (required), lead_name.
oauth_exchange_codeA
用授权码换取 token (Exchange authorization code for token)
Inputs: redirect_uri (required), authorization_code (required).
oauth_get_authorize_urlC
获取 OAuth 授权链接 (Get OAuth authorize URL)
Inputs: redirect_uri (required), state.
oauth_refresh_tokenC
刷新 access_token (Refresh access token)
Inputs: no named parameters.
targetings_getC
获取定向详情 (Get targeting details)
Inputs: account_id (required), fields, targeting_id.
videos_deleteC
删除视频素材 (Delete video)
Inputs: video_id (required), account_id (required).
videos_getC
获取视频素材列表 (Get videos)
Inputs: page, fields, filtering, page_size, +1 more.
videos_updateC
更新视频素材信息 (Update video info)
Inputs: video_id (required), account_id (required), description.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 42 tools
Each tool targets a distinct resource and action (e.g., advertiser_add, adgroups_get, images_delete). Even within the same resource like adgroups, operations are clearly separated into get, add, update, delete, status update, budget update, bid update. No overlapping functionalities.
All tool names follow a consistent snake_case verb_noun pattern (e.g., videos_get, custom_audiences_add, async_reports_get). No mixing of conventions like camelCase or different verb styles.
With 42 tools, the server exceeds the 25+ threshold for 'too many' per the calibration. While each tool serves a purpose, the large number may overwhelm agents and suggests scope creep.
Most CRUD operations are covered for major resources (advertisers, ad groups, creatives, images, audiences, leads). Minor gaps exist: missing videos_add, advertiser_delete, and targeting_update/add, but these are not critical for core workflows.
Maintenance
Related MCP Connectors
Meta Ads and Google Ads MCP server: 250+ tools for Claude, ChatGPT, Cursor and Codex.
214 tools for AI agents over one MCP endpoint: image, video, audio, 3D, data, storage, mail, GPUs.
60+ Meta Ads tools for AI agents: audits, campaign management, audiences and CAPI tracking.
100+ MCP tools for AI agents: content metadata, trade intelligence, business-expertise analysis.
Related MCP Servers
- AlicenseAqualityDmaintenanceMCP server that wraps the Meta Marketing API (Graph API v25.0) as semantic tools for LLM agents.181MIT
- AlicenseNot gradedqualityDmaintenanceComprehensive Meta Ads MCP server providing 77 tools for full campaign lifecycle management, enabling AI assistants to control Meta advertising operations through natural language.36 npm12MIT
- AlicenseBqualityDmaintenanceMCP server for Meta Ads providing 30 tools for account discovery, campaign management, targeting research, and insights. Designed with LLM-friendly outputs and productivity features like cloning and bulk operations.311MIT
- AlicenseNot gradedqualityCmaintenanceComplete Google Ads API v21 MCP server with 40+ fully implemented tools for campaign, ad group, keyword, extension, and portfolio bidding management, enabling AI assistants to create, optimize, and manage Google Ads campaigns through natural language commands.MIT