MCP
Microsoft Advertising MCP server: Bing Ads from Claude or Codex
TL;DR
Microsoft Advertising's own MCP server is a pilot focused on reading account data, and its v13 API's REST surface still carries habits from its SOAP ancestry. This page covers the setup and six failures measured on a real account, because every one of them is invisible until you call the API for real.
What already exists for this platform
Microsoft Advertising opened its own MCP server to an open pilot in June 2026, focused on reading account data from assistants such as Microsoft 365 Copilot, Claude and ChatGPT. At the time of writing (September 2026) the pilot does not change campaigns, and community servers tend to wrap reporting rather than the Campaign Management surface.
- An official server, in pilot — reporting and exploration of account data, not campaign changes.
- Three credentials, not one — an Entra application, a developer token, and the OAuth grant. Most people stall on the developer token.
- The v13 REST API is a JSON transcoding of a SOAP contract, which is the root of several traps below: the documentation describes SOAP conventions that REST does not share.
What a full MCP server adds
| Microsoft's pilot and community servers | Agent Planners MCP | |
|---|---|---|
| Microsoft Ads tools | Reads; community wrappers vary | 24 reads, 20 writes |
| Campaign / ad group / RSA creation | Rare | Yes, under the key's write mode |
| Keywords and negative keywords | Rare | Add, update, status, delete |
| Offline conversion upload | No | Yes |
| Magnitude caps on budget and bid changes | No | Same caps as every sibling platform |
| Google Ads in the same session | No | Yes — the comparison people actually want |
Tool counts are derived from the live catalogue: 1012 tools across 30 families, 475 reads and 537 writes. Microsoft Advertising is one of the fuller write surfaces on it.
How to configure it
- 1Create a key in API & MCP.
tools:readfor reporting; addtools:writefor campaign changes. Tools mode needs a paid plan and fails closed. - 2Connect Microsoft Advertising under Integrations — its own Entra OAuth, separate from the Google connections.
- 3Add the server to Claude Code, Claude Desktop or Codex with the snippet below.
- 4Run
describe_permissions, thenlist_accountsfor the account and customer ids.
bash
claude mcp add --transport http agentplanners https://www.agentplanners.com/api/mcp \
--header "Authorization: Bearer ap_live_…"Codex uses the same endpoint from
~/.codex/config.toml, with the key in an environment variable rather than the file: [mcp_servers.agentplanners] / url = "…/api/mcp" / bearer_token_env_var = "AGENTPLANNERS_API_KEY".Six failures measured on a real account
- A prefix is not a name. Inferring the service host by prefix match sent
Keywords/QueryByAdGroupId— a core Campaign Management read — to the Ad Insight host, where it is a bare 404.BidStrategies/QueryByIdswent the same way. One missing word boundary broke every keyword read, and the 404 explained nothing. - Space-separated flags are a SOAP convention. The documentation says space-separated; the REST surface parses .NET enums and needs commas. Four fields are affected, and the symptom is the worst kind — a connect that returns zero accounts rather than an error.
Summaryaggregation always failed with error 2034, because every default column set begins withTimePeriod. The obvious one-row-per-campaign request is the one that breaks.- An exhaustive default is not a safe default. Asking for every conversion-goal type fails the whole query on an ordinary account with 5359 — a pilot feature nobody enabled takes the request down with it.
- RSA headlines are not
{ Text }. They are AssetLink arrays wrapping a TextAsset; errors 6206 and 6207 are what you get for the obvious shape. - The negative-keyword write route is not the read route.
POST NegativeKeywordsis a 404 — writes go toEntityNegativeKeywords. That one was settled by probing eight candidate routes until one answered "entities are required".
A seventh, for anyone wiring tracking: error 4615 means a tracking template needs a final URL on the SAME object. Set it at ad-group or campaign level instead if the ad has none.
Two credential details that waste an afternoon
- The Entra Secret ID and the Secret VALUE both look like GUIDs. Copying the wrong one produces an auth failure that says nothing about which field is wrong.
- The refresh token rotates on every use and dies after 90 days idle. An integration that sits unused over a quiet quarter comes back disconnected, and that is Microsoft's design rather than a bug.
Use cases
- Bing against Google on one definition of cost per result — both connect natively, which is the comparison most advertisers cannot make quickly.
- Search-term and negative-keyword hygiene, which on a smaller-spend platform is exactly the work nobody schedules.
- Campaign builds — campaign, ad group, responsive search ad, keywords and negatives, everything created paused for review.
- Offline conversion upload, closing the loop between closed revenue and what the bidding optimises toward.
Frequently asked questions
- Is there an official Microsoft Advertising MCP server?
- Yes, as a pilot: Microsoft Advertising opened its MCP server to an open pilot in June 2026, focused on reading account data. At the time of writing (September 2026) campaign changes — budgets, bids, keywords, new campaigns — are outside it, and community servers mostly wrap reporting.
- What do I need to connect Bing Ads to an AI agent?
- Three things, not one: an Entra application, a Microsoft Advertising developer token, and the OAuth grant. The developer token is where most people stall.
- Why does my Bing Ads connect return zero accounts?
- Most often the flags field. Microsoft's documentation describes space-separated values, which is a SOAP convention — the REST surface parses .NET enums and needs commas. The symptom is an empty account list rather than an error.
- Why does a Bing Ads Summary report fail with error 2034?
- Because the default column set begins with TimePeriod, which is invalid for Summary aggregation. Drop the time column before requesting a summary rather than after being refused.
- Can an agent create Bing Ads campaigns?
- Yes — 20 writes covering campaigns, ad groups, responsive search ads, keywords, negative keywords, sitelink and callout extensions and offline conversions, each queued for approval or run inside the guardrails as the key's write mode says, with the same magnitude caps on budget and bid changes as every other platform here.