MCP server

MCP server

The Model Context Protocol server lets any MCP-compatible AI client read your spend data, pause campaigns, adjust budgets, and more. The same guardrails that apply to CLI commands apply here.

Quick setup for Claude Desktop

The fastest path is adduck agents install:

adduck agents install --client claude

This writes the server entry into ~/Library/Application Support/Claude/claude_desktop_config.json and prints confirmation. Restart Claude Desktop after running it.

Manual setup

Add the following to your claude_desktop_config.json:

{
  "mcpServers": {
    "adduck": {
      "command": "adduck",
      "args": ["mcp"],
      "env": {
        "ADDUCK_CONFIG": "/path/to/your/adduck.json"
      }
    }
  }
}

If your adduck.json is in a standard location, you can omit the env block and adduck will use the active project.

Setup for Cursor

adduck agents install --client cursor

Writes to ~/.cursor/mcp.json. Same format as Claude Desktop.

Other MCP clients

Any client that supports stdio MCP servers can use adduck. The command is just adduck mcp. Check your client's documentation for where to add server definitions.

Available tools

All tool names follow snake_case. Parameters are JSON.

get_spend

Returns spend, installs, taps, and CPI for connected platforms over a date range.

ParameterTypeDescription
daysnumberNumber of trailing days. Default: 7.
platformstringOptional. Limit to one platform.
startstringOptional. Start date in YYYY-MM-DD. Overrides days.
endstringOptional. End date in YYYY-MM-DD.

list_campaigns

Returns all campaigns with their IDs, status, and daily budgets.

ParameterTypeDescription
platformstringOptional. Limit to one platform.
statusstringOptional. One of: active, paused, all. Default: all.

inspect_campaign

Returns detailed data for a single campaign including daily spend breakdown.

ParameterTypeDescription
platformstringRequired. Platform name.
campaignIdstringRequired. Campaign ID from that platform.
daysnumberDays of history to include. Default: 7.

pause_campaign

Pause one or more campaigns. Blocked if the campaign is in protectedCampaigns or if allowMutations is false.

ParameterTypeDescription
platformstringRequired.
campaignIdsstring[]Required. Array of campaign IDs.

resume_campaign

Resume one or more paused campaigns.

ParameterTypeDescription
platformstringRequired.
campaignIdsstring[]Required.

set_budget

Set the daily budget for a campaign. Checked against maxBudgetChangePct and maxDailyBudgetMicros.

ParameterTypeDescription
platformstringRequired.
campaignIdstringRequired.
dailyBudgetnumberRequired. Amount in whole dollars.

get_guardrails

Returns the current guardrail configuration. No parameters. Useful for an AI assistant to check what it's allowed to do before attempting a mutation.

list_schedules

Returns all configured schedules with their IDs, actions, and enabled state.

ParameterTypeDescription
platformstringOptional. Filter by platform.

run_audit

Runs the same checks as adduck audit and returns pass/fail for each guardrail rule. No parameters.

Error responses

When a tool call fails (guardrail violation, API error, unknown campaign ID), the tool returns an object with error: true and a message field. Well-behaved AI clients will surface this to the user rather than silently failing.

{
  "error": true,
  "code": "GUARDRAIL_VIOLATION",
  "message": "Cannot set daily budget to $600: exceeds maxDailyBudgetMicros of $500.00"
}

What the AI can and can't do

The MCP tools give the AI the same permissions as the CLI, subject to guardrails. Specifically:

Example conversation

Claude Desktop
You: What's my CPI looking like across networks this week?

Claude: [calls get_spend with days=7]

Your 7-day CPI by network:
  Meta: $2.86 (71 installs)
  Apple: $3.02 (47 installs)
  Reddit: $4.05 (22 installs)

Reddit is running at $4.05 CPI while Meta is at
$2.86. Want me to pause Reddit or just lower the
budget while you evaluate?

You: Pause it.

Claude: [calls pause_campaign for reddit]
 Paused "App Awareness Q3" on Reddit Ads.