MCP integration guide
Use the Model Context Protocol to let Claude, Cursor, or your own AI agent read and operate your DEXUN AdWhiz three-platform ad accounts directly.
What is MCP?
MCP (Model Context Protocol) is the open standard Anthropic launched in 2024 for how AI applications securely access external data and tools. Think of it as "USB-C for AI" — one interface so any MCP client (Claude Desktop, Cursor, your own agent) can call any MCP server (DEXUN AdWhiz, Notion, GitHub, etc.).
The DEXUN AdWhiz MCP server exposes 100+ fine-grained tools covering reads and writes across Google Ads, Meta Ads, and TikTok Ads. Every call goes through OAuth 2.0 — the same permissions model as our dashboard.
Quick start
Three steps. Five minutes to your AI assistant managing ad campaigns.
Configure Claude Desktop
Edit claude_desktop_config.json (macOS: ~/Library/Application Support/Claude/, Windows: %APPDATA%\Claude\) and add:
# Claude Desktop config: ~/.../claude_desktop_config.json
{
"mcpServers": {
"dexun-adwhiz": {
"command": "npx",
"args": ["-y", "@dexun/adwhiz-mcp@latest"],
"env": {
"DEXUN_API_KEY": "dxk_live_..."
}
}
}
}Configure Cursor
Via project-level .cursor/mcp.json or global config:
# Cursor: ~/.cursor/mcp.json (or Project → Settings → MCP)
{
"mcpServers": {
"dexun-adwhiz": {
"command": "npx",
"args": ["-y", "@dexun/adwhiz-mcp@latest"],
"env": { "DEXUN_API_KEY": "dxk_live_..." }
}
}
}Verify
Restart Claude or Cursor, then try this prompt. If you see the AI calling campaign.list (etc.) and returning real data, you're connected.
Ask Claude:
「Look at all my connected ad accounts. Find the 3 worst-performing ad groups in the past 7 days and give me specific pause recommendations.」
Tool catalog (by category)
The MCP server exposes 100+ tools across six categories. Every tool has a full JSON Schema, so the AI decides when to call which one automatically.
Campaigns
- campaign.list
- campaign.get
- campaign.update_budget
- campaign.update_bid_strategy
- campaign.pause
- campaign.resume
Recommendations
- recommendation.generate
- recommendation.list
- recommendation.apply
- recommendation.dismiss
- recommendation.simulate
Keywords & audiences
- keyword.list
- keyword.add
- keyword.pause
- audience.list
- audience.create_lookalike
Metrics
- metrics.get_summary
- metrics.compare_periods
- metrics.by_keyword
- metrics.by_ad_group
- metrics.search_terms
Creatives
- creative.list
- creative.generate_copy
- creative.test_variant
- tiktok.list_spark_ads
Audit & rollback
- audit.list_changes
- audit.get_change
- change.rollback
- change.diff
The full tool list (with parameters and return shapes) is queryable from your AI client via mcp.list_tools().
Example session
A real Claude conversation showing cross-platform optimization through natural language:
I run ads on Google, Meta, and TikTok in parallel. Give me a global health overview.
Pulling all three connected accounts. Google Ads ROAS 4.2x (healthy), Meta ROAS 2.8x (mediocre — mostly dragged by "Lookalike 1%" at ROAS 1.6x), TikTok ROAS 5.4x (strong, Spark Ads especially).
What should I do about Meta's Lookalike?
Generated 3 recommendations: ①Move 60% of Lookalike 1% budget to TikTok Spark Ads (est. +0.8x ROAS). ②Tighten Lookalike to 0.5%. ③Pause 5 ad sets with CPA > $30. Expected weekly upside: +$8,200.
Apply #1.
Applied via recommendation.apply. Meta Lookalike 1% budget dropped from $1,044/wk to $418, TikTok Spark Ads gained $626/wk. All changes logged to audit; rollback anytime.
Security & permissions
- The MCP server runs locally — your dxk_ API key never leaves your machine for third parties
- All Google / Meta / TikTok platform calls go through OAuth grants you set up in dashboard
- Approval mode is on by default — the AI proposes, you confirm in dashboard or chat
- Every tool call is written to the audit log, viewable in dashboard → Audit
- Revoke MCP access anytime in dashboard → Settings → API Keys