Run claude mcp add --transport http paidsync https://mcp.paidsync.ai/mcp, type /mcp, and sign in with your PaidSync login. Claude Code then reaches your X ad accounts through 14 tools: performance by account, campaign or line item, plus pause, enable, budget and bid changes on existing campaigns. Claude Code asks before it runs each tool.
Manage tier. Claude Code works on campaigns you already run. It does not create new X campaigns.
Claude Code talks to remote MCP servers over Streamable HTTP. PaidSync is one of them. Add it once and the same terminal that edits your code can report on and manage your X campaigns.
claude mcp add --transport http paidsync https://mcp.paidsync.ai/mcpBy default that registers the server for the current project only. Add --scope user to make it available in every project on your machine. Run claude mcp list to confirm it is there, then start a session and type /mcp to sign in.
Takes 10 seconds. Google or email sign-in. The free plan is 15 tasks a month at $0, no card.
Click Connect on X Ads and sign in with the X account that can open your ad accounts, then authorize PaidSync. X Ads authorizes via X OAuth, and PaidSync never sees your X password.
Already inside Claude Code? Ask it to run connect_x_ads. The tool returns a link to open in your browser.
Inside a session, list_x_accounts shows every ad account your X login can reach, and set_active_x_account picks the one Claude Code works on.
In your terminal, run:
claude mcp add --transport http paidsync https://mcp.paidsync.ai/mcpStart a session, type /mcp, pick paidsync, and sign in with your PaidSync login in the browser window that opens. Claude Code stores the OAuth token for you. No key is pasted anywhere.
Setting this up for a team? Commit a .mcp.json at the repo root so every engineer gets the same connector:
{
"mcpServers": {
"paidsync": { "type": "http", "url": "https://mcp.paidsync.ai/mcp" }
}
}Prefer an API key, for example for headless runs? Send it in a header, never in the URL, where it would end up in logs:
claude mcp add --transport http paidsync https://mcp.paidsync.ai/mcp --header "Authorization: Bearer $PAIDSYNC_API_KEY"In a committed .mcp.json, add "headers": { "Authorization": "Bearer ${PAIDSYNC_API_KEY}" } so the key stays in each engineer's environment and never enters git. Applying a change to Google Ads still requires the OAuth sign-in. On other platforms a key can apply changes too, so treat it like a password and prefer OAuth.
In a Claude Code session ask: “Show me X spend, impressions and clicks by campaign for the last 7 days”
Claude Code returns spend, impressions, clicks and engagements for each campaign. The connection is live.
Each prompt below maps to tools in the PaidSync X Ads group. Claude Code picks the tool. The last column says whether the call can change anything in the ad account.
| Ask | Tools it calls | Changes your account? |
|---|---|---|
| “List my X ad accounts and make Acme the active one” | list_x_accounts, set_active_x_account | No |
| “Show my campaigns from the last 7 days with spend, impressions, clicks and engagements” | get_x_performance | No |
| “Which line items spent the most in the last 30 days” | get_x_performance | No |
| “List the line items in this campaign” | list_x_line_items | No |
| “Pause the Spring Launch campaign” | list_x_campaigns, pause_x_campaign | Yes, after you confirm |
| “Set the daily budget on the Retargeting campaign to 80” | update_x_campaign_budget | Yes, after you confirm |
| “Lower the bid on the Lookalikes line item to 1.50” | list_x_line_items, update_x_line_item | Yes, after you confirm |
The -p flag runs Claude Code without the interactive session. Sign in once through /mcp and the stored OAuth token carries over. A report that lands in a file looks like this:
claude -p "Pull last 30 days X performance at line item level and list the line items with the highest spend and no clicks." \
--allowedTools "mcp__paidsync" \
--output-format json > reports/x-ads-$(date +%F).jsonReads run straight through, and so do writes. --allowedTools "mcp__paidsync" allows every PaidSync tool, writes included, with no prompt. For an unattended job, allow only the read tools it needs, each by name as mcp__paidsync__tool_name.
Of the 14 X Ads tools, 7 only read and 5 can write. Reads cover ad accounts, campaigns, line items, promoted posts and performance. Writes cover pausing and enabling campaigns, campaign daily budgets, line item status and bids, and campaign and line item names. Budget, bid, name and status edits through the update tools preview by default with dry_run, and PaidSync reads each change back from X afterwards.
Over MCP, the approval step is Claude Code’s own prompt. It asks before it runs a tool unless you allowed it with --allowedTools or in your settings. PaidSync adds checks on its side. Deletes, pauses and budget changes need confirm_destructive, and a pre-write rule check blocks unsafe arguments. The approval card, and Undo on an applied card whose change has a safe inverse, apply only in the PaidSync workspace.
update_x_line_item, and campaigns through pause_x_campaign and enable_x_campaign.Sign up at paidsync.ai, connect X Ads via OAuth in the dashboard, then run claude mcp add --transport http paidsync https://mcp.paidsync.ai/mcp in your terminal. Type /mcp inside a session, pick paidsync, and sign in with your PaidSync login.
No. X Ads is a manage tier platform in PaidSync. Claude Code can report on existing campaigns, pause and enable them, and change budgets and line item bids. New campaigns are built in X Ads Manager.
Yes. update_x_campaign_budget changes a campaign daily budget and update_x_line_item changes a line item bid. Both preview as a dry run first, and Claude Code asks before it runs each tool.
Yes. Once you have signed in through /mcp, claude -p reuses the stored OAuth token. Reads run straight through. Writes need care. No one is there to answer the Claude Code prompt, so any write tool you allowed with --allowedTools runs straight through. For an unattended job, allow only the read tools it needs.
Yes. The free plan is $0 for 15 tasks a month with no card. Pro starts at $99 a month and Team at $249 a month.
X Ads reports and campaign management. One command in Claude Code.