Microsoft Ads connector for Claude Code

Use Porter’s Microsoft Ads connector for Claude Code to pull keywords, search spend and conversions into your terminal, then turn them into files, scripts and scheduled reports in your own project.

  • Save keyword results as CSV in your repo
  • Find keywords that spend without converting
  • Run a weekly Microsoft Ads report from a script
  • Compare Microsoft Ads with Google Ads
G2★★★★★Rated 4.6/5 from 288 G2 reviews (October 2026) · Used by 1,600+ marketing teams and agencies

By · Last updated November 26, 2026

Claude Codeporter connected
List keywords with Spend over $50 and no Conversions Qualified in the last 30 days and save them to reports/msads-waste.csv
porter / Microsoft Ads / Trailgear Demo✓ 4 rows
Saved reports/msads-waste.csv with 4 keywords. cheap tents spent the most with no conversions.
KeywordSpendConversions
cheap tents$142.600
tent rental$88.100
camping ideas$64.300
outdoor jobs$51.900
Demo data, Trailgear Demo account
412 Microsoft Ads fields
01Setup

How to connect Microsoft Ads to Claude Code

Connecting Microsoft Ads to Claude Code takes 3 steps and no API keys: connect your Microsoft Ads accounts in Porter with Microsoft Advertising, add Porter’s MCP server to Claude Code with one command, then sign in from /mcp and ask. The same server also works in Cursor, VS Code and Codex, as Porter’s Microsoft Ads MCP server page shows. Using the Claude app instead? See the Microsoft Ads connector for Claude.

Before you start

  • You need Claude Code installed (Anthropic’s Claude Code overview), a free Porter account and a Microsoft Advertising login to your ad accounts.
  • Works with any Claude model in Claude Code, from Opus to Sonnet and Haiku.
  1. Step 1: Connect Microsoft Ads in Porter

    Sign up free at Porter, pick Microsoft Ads as the source and sign in with Microsoft Advertising. Tick every ad account you want Claude Code to read.

  2. Step 2: Add Porter to Claude Code

    In your terminal, run this command. It adds Porter for every project on your machine; drop --scope user to add it to the current project only.

    Terminal
    claude mcp add --transport http --scope user porter https://mcp.portermetrics.com/mcp

    Or, inside Claude Code, install Porter’s plugin, which adds the server and Porter’s skill together: /plugin marketplace add portermetrics/porter, then /plugin install porter-metrics@portermetrics.

  3. Step 3: Sign in and ask

    Start claude, type /mcp, pick porter and sign in with the Google account you use in Porter. When porter shows as connected, paste this prompt:

    Prompt
    Which Microsoft Ads accounts can you see? For the last 7 full days, show Campaign Name, Spend, Clicks and Conversions Qualified and save it to reports/msads-campaigns.csv.

Guides and videos

app.portermetrics.com / create
Porter's Select accounts window for Microsoft Ads with a demo account and the Connect button
First, in Porter, open Microsoft Ads and select Connect.
Microsoft sign-in screen you see when you connect Microsoft Ads to Porter
Then, sign in with your Microsoft account.
$ claude mcp add --transport http --scope user porter https://mcp.portermetrics.com/mcp

$ claude mcp list
porter: https://mcp.portermetrics.com/mcp (HTTP)
Then, add Porter's MCP server from your terminal.
> /mcp
porter · needs authentication → Authenticate

> Which Microsoft Ads accounts can you see?
● porter - list_accounts (MCP)
Trailgear Demo
After you sign in from /mcp, Claude Code lists your Microsoft Ads accounts.
02Use cases and prompts

What you can do in Claude Code

Claude Code works inside your project, so Microsoft Ads answers can become files, scripts and dashboards instead of chat replies. Each use case has a prompt to copy and uses the Microsoft Ads fields Porter reads.

Can Claude Code export Microsoft Ads keywords?

The problemMicrosoft Ads reports need building and downloading each time.

What Claude Code doesClaude Code pulls Campaign Name, Ad Group Name, Keyword, Match Type, Spend, Clicks, Conversions Qualified and Cost Per Conversion and writes them to a CSV.

What you getA clean keyword file in your repo, ready to sort and share.

Prompt
For the last 30 days, show Campaign Name, Ad Group Name, Keyword, Match Type, Spend, Clicks, Conversions Qualified and Cost Per Conversion, and save it as data/msads-keywords.csv.

Which Microsoft Ads keywords spend without converting?

The problemKeywords that never convert hide in long reports.

What Claude Code doesClaude Code filters keywords by Spend and Conversions Qualified and writes a ranked list.

What you getThe keywords to pause or rework, with the spend each one wasted.

Prompt
For the last 30 days, list keywords with Spend over $50 and no Conversions Qualified, with Campaign Name and Match Type, and save them to reports/msads-waste.csv.
Then ask
Prompt
Pause the 5 keywords with the highest Spend from that list after I confirm, and show me each change first.

Can I schedule a Microsoft Ads report with Claude Code?

The problemMicrosoft Ads often gets checked last, after Google Ads, so its weekly change goes unnoticed.

What Claude Code doesclaude -p runs each Monday and compares Spend, Clicks, Conversions Qualified and Cost Per Conversion for every campaign.

What you getreports/msads-weekly.md, so Microsoft Ads gets its own line in the weekly review.

Prompt
claude -p "Compare last week with the week before for every Microsoft Ads campaign: Spend, Clicks, Conversions Qualified and Cost Per Conversion. Write it to reports/msads-weekly.md" --allowedTools "mcp__porter" "Write"

Can Claude Code compare Microsoft Ads and Google Ads?

The problemSearch spend splits across two platforms with different column names.

What Claude Code doesClaude Code pulls spend, clicks and conversions from both through the same porter server and writes one table.

What you getOne file with both search platforms side by side.

Prompt
For the last 30 days, pull Spend, Clicks and Conversions Qualified from Microsoft Ads and Cost, Clicks and Conversions from Google Ads, by week, and save one comparison table to reports/search-platforms.csv.
03Why Porter

Why Porter for Microsoft Ads in Claude Code

Porter reads every Microsoft Ads account your login can reach, with no developer token or Azure app, and puts Microsoft Ads next to Google Ads and 30+ other sources behind the same server.

✓

One server for all your sources

The same porter server answers about Microsoft Ads, Meta Ads, Google Ads, GA4 and Shopify, so one script can pull every channel.

⊞

Changes only after you approve

Claude Code can make changes through Porter where the platform allows them, and each change waits for your yes.

⚙

No developer token or Azure app

You sign in with Microsoft Advertising in Porter and with Google in Claude Code. There is no developer token or Azure app registration to maintain.

↻

Hosted dashboards when a file isn’t enough

Ask for a Porter AI dashboard and it is published at its own link, synced automatically and ready to share with a client.

04Dashboard

Dashboard template

Start from a ready-made Microsoft Ads template, or ask Claude Code to build a live one with AI dashboards.

AI dashboards

Build a live Microsoft Ads dashboard from your terminal

Describe the dashboard in one sentence and Porter builds it. A client-ready dashboard in minutes, with no chart dragging and no BI tool to learn. Ask Claude Code:

Prompt
Build a live Microsoft Ads dashboard for my account with the last 30 days, the main KPIs and a weekly trend.
Live URLEach dashboard at its own link: no login, no app, no download
Auto-syncFresh Microsoft Ads data, nobody re-exports each period
Scheduled deliveryEmail or PDF sends on a set day
White labelYour logo and branding for clients
Sharing permissionsView or edit access per person
Microsoft Ads dashboard template by Porter
Template

The Microsoft Ads dashboard template

Start from Porter’s official Microsoft Ads dashboard template, or run the prompt above in Claude Code and Porter publishes the dashboard at its own link.

Or start from a template

05Pricing

Pricing

You can start free, since Porter’s Microsoft Ads connector for Claude comes with every plan. Use the calculator for your number of accounts, or see Porter pricing for every plan.

What you get

  • Free plan: never expires, with unlimited connected accounts and the last 15 days of data in Claude (30 days in Data Studio and Sheets)
  • Reporting: from $12.50 per account a month billed annually, or $15 month to month for one account
  • Billing: each Microsoft Ads ad account counts as one account the first time a question returns its data, with volume discounts and no per-seat fee
  • Changes: 1 AI credit per completed change; failed tasks are free, and the Free plan includes 100 credits a month
  • Trial: 14 days of full access, no card

Price calculator

$33.33/mo$6.67 per account

An account is one ad account, Stripe account, store, page or GA4 property. The Free plan never expires and has unlimited accounts, with the last 15 days of data in AI chats.

06Data and actions

Microsoft Ads data Claude can use

The Microsoft Ads connector gives Claude 412 fields across campaigns, ad groups, keywords, ads, budgets, devices, age, gender and location. It also adds 20 actions to list, create, edit, pause and delete them, while the Microsoft Ads fields list has every label and ID.

The 12 Microsoft Ads fields Claude uses most

FieldWhat it's for
Time PeriodTimePeriodDay-by-day trends
Account NameAccountNameRolling up many ad accounts
Campaign NameCampaignNameRanking campaigns
Ad Group NameAdGroupNameAd group breakdowns
KeywordKeywordKeyword spend and waste
Match TypeMatchTypeBroad vs Phrase vs Exact
SpendSpendCost behind every efficiency metric
ClicksClicksTraffic
Conversions QualifiedConversionsQualifiedThe current conversions column
Cost Per ConversionCostPerConversionCPA (cost per conversion)
Return On Ad SpendReturnOnAdSpendROAS (revenue per ad dollar)
Month To Date SpendMonthToDateSpendBudget pacing

Can Claude pause, edit or create Microsoft Ads campaigns?

Yes, Claude creates, edits, pauses and deletes campaigns, ad groups, keywords and responsive search ads. For a new keyword text or match type, Claude adds the new keyword and pauses the old one.

How fresh is the data, and how far back?

Clicks reach Microsoft's reports within about 2 hours, while conversions arrive within 3 (Microsoft's reporting delays). Microsoft keeps 36 months of daily data (Microsoft's report data retention periods), while Porter's paid plans have no history cap.

Product stats

WhatMicrosoft Ads connector
Fields412 across campaigns, ad groups, keywords, ads, budgets, devices, age, gender and location
Actions20 to list, create, edit, pause and delete campaigns, ad groups, keywords and responsive search ads
FreshnessLive query; answers cover up to today and show the last refresh time; clicks arrive about 2 hours late, conversions about 3
History36 months of daily data and 6 months of hourly data from Microsoft; no cap on Porter's paid plans
SpeedReports time out after about 200 seconds, so ask for fewer metrics per question
AccessMicrosoft sign-in; changes need Advertiser Campaign Manager or higher
Not availableSearch terms report, impression share, ad extensions, audiences, image and video assets

See all 412 Microsoft Ads fields

07Security

Is it safe?

Yes, the Microsoft Ads connector for Claude Code uses Microsoft's own sign-in, and Microsoft requires multi-factor authentication for apps such as Porter (Microsoft's multi-factor authentication requirement). Deletes are permanent, so Claude shows each one and waits for your approval.

How you approve changes

New campaigns, ad groups and responsive search ads are created paused, so nothing serves until you turn it on. Claude shows each change before writing, then reports partial failures item by item.

Status, budget and bid changes can also be reverted.

What the connector needs from Microsoft Ads

Porter needs a Microsoft sign-in to your ad accounts, then adds the developer token itself. Under Microsoft Advertising user roles, Viewer can see reports while Advertiser Campaign Manager can edit campaigns.

Claude's changes therefore need Advertiser Campaign Manager or higher. You can also revoke Porter's access any time.

08FAQ

FAQ

Answers on setup, scope, scripts and credits, plus fixes for the most common Claude Code errors with Microsoft Ads. Setup questions every source shares, like where Claude Code saves the server and how to share it with your team, are in the Claude Code hub FAQ.

Can I compare Microsoft Ads with Google Ads in one report?

Yes. Connect both in Porter and ask for Spend and Cost Per Conversion next to Google Ads Cost and Cost / conv. Claude Code writes both to one table.

Do Claude Code questions use Porter credits?

Reading Microsoft Ads data uses no AI credits. Each completed change, such as pausing a keyword, uses 1 credit, and every Porter account gets 100 free credits a month.

Troubleshooting

Why does /mcp show porter as needing authentication?

Claude Code adds the server before you sign in. Pick porter in /mcp, choose Authenticate and sign in with the Google account you use in Porter.

Why does my claude -p script stop and ask for permission?

Scripts can’t answer permission prompts. Pass the tools the script may use, for example --allowedTools "mcp__porter" "Write", so Claude Code can read Porter and save files without stopping.

Why does Claude Code see my accounts but return no data?

Usually the login lost access to that account, or the range had no spend. Check the user in Microsoft Advertising, then ask again.

09Next

More Claude connectors

Porter brings many sources into Claude, and also sends Microsoft Ads to more places than Claude. If you want the full list, browse all Claude connectors. Otherwise, pick another platform for Claude, a Microsoft Ads destination for dashboards or a warehouse, or Porter's MCP servers for other AI tools.

Not only Claude. Send Microsoft Ads data anywhere

The same Porter account and connection also send Microsoft Ads data to these destinations, at no extra cost.

Try the connector in Claude Code

Porter’s Microsoft Ads connector for Claude Code takes one command, so your first keyword file can land in your project today.

Free plan · 14-day trial · No card needed

PPC managers: wasted keywords get found from the terminal and paused after your yes.

Search marketers: Microsoft Ads and Google Ads land in one file.

Agencies: one script builds the weekly report for every client account.