MCP integration guide
Use the Model Context Protocol to let Claude, Cursor, or your own AI agent look up your DEXUN AdWhiz data — connected ad accounts on all three platforms, AI recommendations, and recent activity. Read-only.
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 5 read-only tools: your connected ad accounts, the AI's open recommendations, your savings summary, recent account activity, and your API quota. It cannot change, pause, or create anything in your ad accounts. Every call is authenticated with your API key and counts toward the same per-plan rate limits as our REST API.
Quick start
Three steps. About five minutes until you can ask your AI assistant about your ad accounts.
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": {
"ADWHIZ_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": { "ADWHIZ_API_KEY": "dxk_live_..." }
}
}
}Verify
Restart Claude or Cursor, then try this prompt. If you see the AI call list_ad_accounts or list_recommendations and return your real data, you're connected.
Ask Claude:
「List my connected ad accounts and summarize the AI's open recommendations — which campaigns does it suggest changing, and why?」
Tool catalog
The MCP server exposes 5 tools, all read-only. Each has a full JSON Schema, so the AI decides on its own when to call which.
list_ad_accounts
Read-onlyYour connected Google Ads, Meta Ads, and TikTok Ads accounts and their connection status.
list_recommendations
Read-onlyThe AI's open optimization recommendations (raise budget, lower budget, pause), each with a reason, expected impact, and confidence.
get_savings_summary
Read-onlyYour savings summary: points to the savings figures on your dashboard, plus your plan.
get_recent_activity
Read-onlyRecent account activity: sign-ins, API key changes, ad-account connections, and subscription changes.
get_quota
Read-onlyYour current API rate limit: requests per minute, how many are left, and when the window resets.
Your AI client lists the same tools, with their parameters, through the standard MCP tools/list request.
Example session
An example conversation (sample data) showing what read-only access looks like:
Which ad accounts do I have connected to AdWhiz?
You have three connected accounts — one each on Google Ads, Meta Ads, and TikTok Ads. All three show as connected.
What does the AI recommend right now?
There are 2 open recommendations: ① lower the daily budget of the Meta campaign “Lookalike 1%” — its ROAS has trailed the account average for the past week; ② raise the budget of a TikTok Spark Ads campaign. Each comes with a reason and a confidence score. If you want to act on them, make the change in your ad platform — I can't change anything from here.
Did anything change on my account recently?
In the last 7 days: 2 sign-ins, 1 new API key, and your TikTok Ads account was reconnected. Nothing else is recorded.
Security & permissions
- All 5 tools are read-only: the AI can look up your data but cannot change budgets, pause ads, or create campaigns
- The MCP server runs locally — your dxk_ API key never leaves your machine for third parties
- Calls are authenticated with your API key and share your plan's REST API rate limits (check them with get_quota)
- You make changes to your campaigns yourself, not through MCP
- Revoke MCP access anytime in dashboard → Settings → API Keys