Home>Connect>Microsoft Ads to Claude Code

Connect Microsoft Ads to Claude Code in One Command

By Ahmed Ashraf|Updated October 24, 2026
Microsoft Ads Claude Code

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 Microsoft Ads accounts through 156 tools: reports on campaigns, ad groups, keywords and search terms, plus pauses, budgets, negative keywords and new ad groups, keywords and ads inside existing campaigns. Claude Code asks before it runs each tool.

Build tier. Claude Code works inside your existing campaigns, and every new ad group, keyword and ad starts paused unless you say otherwise.

The command

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 Microsoft campaigns.

claude mcp add --transport http paidsync https://mcp.paidsync.ai/mcp

By 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.

5-Step Setup

1

Sign up at paidsync.ai/signup

Takes 10 seconds. Google or email sign-in. The free plan is 15 tasks a month at $0, no card.

2

Connect Microsoft Ads in the PaidSync dashboard

Click Connect on Microsoft Ads and sign in with the Microsoft account that can open your Microsoft Advertising accounts. Microsoft Ads authorizes via Microsoft OAuth, and PaidSync handles the developer token on its side.

Already inside Claude Code? Ask it to run connect_microsoft_ads. The tool returns a link to open in your browser.

3

Pick the ad account Claude Code should work on

Inside a session, list_ms_accounts shows the Microsoft Ads accounts your sign-in can reach, and set_active_microsoft_account picks the one Claude Code works on.

4

Add PaidSync to Claude Code

In your terminal, run:

claude mcp add --transport http paidsync https://mcp.paidsync.ai/mcp

Start 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.

5

Test the connection

In a Claude Code session ask: “Show me my Microsoft Ads campaigns for the last 30 days with spend, clicks, conversions and ROAS”

Claude Code returns spend, clicks, impressions, conversions, revenue, CTR, average CPC and ROAS for each campaign. The connection is live.

Free plan includes 15 tasks a month. Pro from $99 a month, Team from $249.

Start Free See a Demo

Microsoft Ads prompts to try in Claude Code

Each prompt below maps to tools in the PaidSync Microsoft Ads group. Claude Code picks the tool. The last column says whether the call can change anything in the ad account.

AskTools it callsChanges your account?
“List my Microsoft Ads accounts and make Acme the active one”list_ms_accounts, set_active_microsoft_accountNo
“Show campaigns for the last 30 days with spend, clicks, conversions and ROAS”get_ms_performanceNo
“Which search terms spent money in the last 30 days with no conversions”get_ms_search_query_performanceNo
“Add the worst five as exact match negatives to the Brand Search campaign”add_ms_negative_keywordsYes, after you confirm
“Pause the Spring Sale campaign”pause_ms_campaignYes, after you confirm
“Raise the daily budget on the Brand Search campaign to $80”update_ms_campaign_budgetYes, after you confirm
“Add an ad group called Trail Shoes to the Running campaign with five phrase match keywords and one responsive search ad”create_ms_adgroup, add_ms_keywords, add_ms_responsive_search_adYes, after you confirm

Run it headless with claude -p

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 Microsoft Ads search terms and list the terms that spent money with no conversions." \ --allowedTools "mcp__paidsync" \ --output-format json > reports/microsoft-ads-$(date +%F).json

Reads 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.

What reads and what writes

Of the 156 Microsoft Ads tools, 82 only read and 72 can write. Reads cover campaign, ad group, keyword, search term, conversion, location and audience performance. Writes cover pauses, budgets, ad group and keyword changes, negative keywords, new ad groups, keywords and responsive search ads, audiences, UET tags and conversion goals. Budget, negative keyword, ad group, keyword and ad changes preview by default with dry_run, and new ad groups, keywords and ads start paused.

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.

What Claude Code cannot do on Microsoft

  • PaidSync does not create Shopping or Audience campaigns on Microsoft Ads. Create those in Microsoft Advertising, or import them from Google Ads, and PaidSync then builds inside them.
  • There are no Microsoft Ads tools for bid strategies or labels.
  • Responsive search ads are the one ad type PaidSync creates or edits on Microsoft Ads.
  • PaidSync does not delete ads, ad groups or keywords. It pauses them instead.
  • Enable a paused campaign again with enable_ms_campaign.

Frequently Asked Questions

How do I connect Microsoft Ads to Claude Code?

Sign up at paidsync.ai, connect Microsoft Ads 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.

Can Claude Code create Microsoft Ads campaigns?

PaidSync creates Search and Performance Max campaigns, paused, and builds inside existing campaigns with new ad groups, keywords and responsive search ads. Shopping and Audience campaigns are created in Microsoft Advertising.

Can Claude Code change Microsoft Ads budgets?

Yes. update_ms_campaign_budget changes a campaign budget. It previews as a dry run first, reads the new budget back from Microsoft once applied, and Claude Code asks before it runs the tool.

Does it work in headless mode with claude -p?

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.

Is it free?

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.

Microsoft Ads reports and campaign changes. One command in Claude Code.