Summary
Read Microsoft Advertising (Bing Ads) through the Bing Ads API v13: ad accounts, campaigns, ad groups, ads, keywords, budgets, targeting, negative keywords and conversion goals, plus Ad Insight data: auction insights against competitors, performance change insights, budget, bid and keyword opportunities, historical search counts and Keyword Planner ideas. 22 read-only tools, OAuth2 with a developer token.
Guided setup
Connect Microsoft Advertising to Claude, ChatGPT or Copilot in 2 minutes
Start a free trial on AnythingMCP Cloud, connect Microsoft Advertising in the guided setup, then add your MCP URL to your AI assistant. No code and no server to run.
No credit card · 7-day trial · Self-host alternative available
Try asking
Example prompts for Microsoft Advertising
Click any prompt to copy it. Paste into Claude, ChatGPT, Cursor, Gemini, Copilot or OpenClaw to run it against this connector.
Claude is AI and can make mistakes. Please double-check responses.
💡 No install? Use cloud.anythingmcp.com directly. Sign in, click Connectors → Microsoft Advertising, paste the client ID, client secret and developer token, click Authorize with Provider and sign in with your Microsoft Advertising user, mint an MCP API key and you're done. No Docker, no
git clone, no local server.
Microsoft Advertising
Read Microsoft Advertising (Bing Ads) through the Bing Ads API v13: ad accounts, campaigns, ad groups, ads, keywords, budgets, targeting, negative keywords and conversion goals, plus Ad Insight data: auction insights against competitors, performance change insights, budget, bid and keyword opportunities, historical search counts and Keyword Planner ideas. 22 read-only tools, OAuth2 with a developer token.
Setup
Setting up takes about one-time. You need the about 15 minutes.
- Open https://entra.microsoft.com, App registrations, New registration. Supported account types: Any Entra ID Tenant + Personal Microsoft accounts (older screens: accounts in any organizational directory and personal Microsoft accounts). The connector signs in through the
commonendpoint, as Microsoft recommends for the Bing Ads API, so a single-tenant app fails with AADSTS50194. - Redirect URI: platform Web,
https://cloud.anythingmcp.com/api/mcp-oauth/callbackon AnythingMCP Cloud, oryour AnythingMCP URL/api/mcp-oauth/callbackwhen you host AnythingMCP yourself. It must match exactly (AADSTS50011 otherwise). - Certificates & secrets, New client secret: copy the secret Value (shown once) and note its expiry date.
- In Microsoft Advertising, sign in as a Super Admin, open Settings, Developer settings (https://ads.microsoft.com/cc/Settings/DevSettings), choose the user and Request token. The universal developer token works for any user; it gives no extra rights.
- Paste the Application (client) ID into
MICROSOFT_ADS_CLIENT_ID, the secret value intoMICROSOFT_ADS_CLIENT_SECRETand the token intoMICROSOFT_ADS_DEVELOPER_TOKEN, and install. - On the connector page click Authorize with Provider and sign in with a Microsoft Advertising user (multi-factor authentication is required by Microsoft). The scope is
https://ads.microsoft.com/msads.manage offline_access; the refresh token is stored encrypted and access tokens (about one hour) are renewed automatically.
If the sign-in fails with AADSTS650052, the Microsoft Advertising application is missing from your organisation's directory: an Entra administrator adds the service principal of app id d42ffc93-c136-491d-b4fd-6f18168c68fd (Microsoft Advertising) once, or adds the delegated permission msads.manage of that API to your app registration.
Where to start
microsoft_advertising_get_user: the signed-in user (User.Id) andCustomerRoles, one per manager account (customer) with itsCustomerIdandAccountIds.microsoft_advertising_list_accounts: the ad accounts withId,Name,Numberand status.microsoft_advertising_search_accountswith fieldUserIdand the user id returns the same accounts withParentCustomerId,CurrencyCodeandTimeZone;microsoft_advertising_get_accountreads one.- Every campaign and Ad Insight tool needs both
customer_id(the account'sParentCustomerId, or theCustomerIdof the role) andaccount_id. They are sent as theCustomerIdandCustomerAccountIdheaders, and a mismatch answers error 106 or 1102. Ids are stable: reuse them within a conversation.
Ids: the account id is a number such as 180012345; the account number shown in the web UI (F149ABCD) is not accepted where an id is asked. All ids travel as strings of digits.
Structure (Campaign Management): microsoft_advertising_list_campaigns (the API alone returns only Search campaigns; this tool asks for Search, Shopping, Audience and PerformanceMax by default), microsoft_advertising_get_campaigns, microsoft_advertising_list_ad_groups, microsoft_advertising_list_ads, microsoft_advertising_list_keywords, microsoft_advertising_get_budgets, microsoft_advertising_list_negative_keywords, microsoft_advertising_list_campaign_criterions (locations, devices, ad schedule, audiences), microsoft_advertising_list_conversion_goals and microsoft_advertising_list_uet_tags. These return settings, statuses, budgets and bids, never clicks or spend.
Performance (Ad Insight): the reads that return numbers as JSON.
microsoft_advertising_get_auction_insights: impression share, overlap rate, above rate, top of page rate and outranking share against each competing domain over a date range.microsoft_advertising_get_performance_insights: what changed (impressions, clicks, spend, conversions), why, and what to do, for up to one month.microsoft_advertising_get_budget_opportunities,microsoft_advertising_get_bid_opportunities,microsoft_advertising_get_keyword_opportunities: Microsoft's suggestions with estimated extra clicks, impressions and cost. They are suggestions only; nothing is applied.microsoft_advertising_get_historical_search_countsandmicrosoft_advertising_get_keyword_ideas: market research (Keyword Planner) for keywords and seed phrases.location_id190 is the United States; other location ids appear inmicrosoft_advertising_list_campaign_criterionswith criterion_type Location.microsoft_advertising_get_monthly_spend: spend of one calendar month, only for accounts billed by monthly invoice.
Not included: the Reporting API (campaign, keyword and search term reports with clicks, impressions, spend and conversions per day). It is asynchronous and delivers a ZIP file, which this connector cannot open. For those figures use the Microsoft Advertising web UI or its scheduled reports.
Reading the answers
- Money (
DailyBudget,Amount,CpcBid.Amount,SuggestedBid,CurrentBudget) is in the account currency, as a plain decimal: readCurrencyCodefrommicrosoft_advertising_search_accountsormicrosoft_advertising_get_accountbefore quoting amounts. - Rates in auction insights are fractions: 0.25 means 25 percent.
- Dates in Ad Insight requests are separate year, month and day numbers; work them out from today's date. Performance insights accept at most one month; daily historical search counts go back 45 days, weekly 15 weeks, monthly 24 months.
- Campaign
Statusvalues include Active, Paused, BudgetPaused, BudgetAndManualPaused and Suspended; ads and keywords also carry anEditorialStatus(Disapproved means the ad or keyword does not serve). - Lists that take ids accept up to 100 per call (ad groups 1,000);
PartialErrorsnames ids that could not be read.
Limits and errors
- Campaign Management and Ad Insight limit calls per user per minute: error 117 CallRateExceeded means wait 60 seconds.
- 105 InvalidCredentials: wrong developer token or access token (a sandbox token such as BBD37VB98 does not work on production). 109 AuthenticationTokenExpired or 3101 OAuthTokenInvalid: authorize again.
- 106 UserIsNotAuthorized: the user has no access to that customer or account. 1029 or 1030: customer_id or account_id missing. 1102: invalid account id. 516 EntityIdFilterMismatch: a campaign id of a type not in
campaign_types. microsoft_advertising_get_monthly_spendrefuses credit card and prepaid accounts.
Prerequisites: MICROSOFT_ADS_CLIENT_ID, MICROSOFT_ADS_CLIENT_SECRET, MICROSOFT_ADS_DEVELOPER_TOKEN
Install the connector locally
curl -fsSL https://raw.githubusercontent.com/HelpCode-ai/anythingmcp/main/docker-compose.quickstart.yml -o docker-compose.yml
printf 'JWT_SECRET=%s\nENCRYPTION_KEY=%s\n' "$(openssl rand -hex 32)" "$(openssl rand -hex 32)" > .env
docker compose up -d
Open http://localhost:3000/connectors/store, pick Microsoft Advertising and paste in the env vars listed under Prerequisites.
Available tools
| Tool | What it does |
|---|---|
microsoft_advertising_get_user | Read the signed-in Microsoft Advertising user: User (Id, UserName, Name, ContactInfo.Email, UserLifeCycleStatus) and CustomerRoles, one… |
microsoft_advertising_list_accounts | List the ad accounts the signed-in user can access, with Id (the account_id for every campaign and insight tool), Name, Number (the… |
microsoft_advertising_search_accounts | Search ad accounts with their full settings: Id, Name, Number, ParentCustomerId (the customer_id to send with that account), CurrencyCode… |
microsoft_advertising_get_account | Read one ad account by id: Name, Number, ParentCustomerId, CurrencyCode, TimeZone, Language, AccountLifeCycleStatus, PauseReason… |
microsoft_advertising_get_monthly_spend | Read how much an ad account spent in one calendar month, as Amount in the account currency. The current month returns month-to-date spend… |
microsoft_advertising_list_campaigns | List the campaigns of an ad account: Id, Name, CampaignType, Status (Active, Paused, BudgetPaused, BudgetAndManualPaused, Suspended)… |
microsoft_advertising_get_campaigns | Read up to 100 campaigns of an ad account by id, with the same fields as microsoft_advertising_list_campaigns. Ids of a type not listed in… |
microsoft_advertising_list_ad_groups | List the ad groups of one campaign: Id, Name, Status (Active, Paused, Expired, Deleted), CpcBid.Amount (default max CPC in the account… |
microsoft_advertising_list_ads | List the ads of one ad group: Id, Type, Status (Active, Paused, Deleted), EditorialStatus (Active, Disapproved, Inactive, ActiveLimited)… |
microsoft_advertising_list_keywords | List the keywords of one ad group: Id, Text, MatchType (Exact, Phrase, Broad), Bid.Amount (max CPC in the account currency; empty means the… |
microsoft_advertising_get_budgets | Read the shared budgets of an ad account: Id, Name, Amount (daily, account currency), BudgetType (DailyBudgetStandard or… |
microsoft_advertising_list_negative_keywords | List the negative keywords set directly on one campaign or ad group: EntityNegativeKeywords with EntityId, EntityType and NegativeKeywords… |
microsoft_advertising_list_campaign_criterions | List one kind of targeting of a campaign: Location (LocationId, DisplayName, LocationType, with bid adjustments; negative criterions are… |
microsoft_advertising_list_conversion_goals | List the conversion goals (conversion tracking) available to the account: Id, Name, Type (Url, Event, Duration, PagesViewedPerVisit… |
microsoft_advertising_list_uet_tags | List the UET (Universal Event Tracking) tags of the customer: Id, Name, Description, TrackingStatus (Unverified, Active, Inactive) and… |
microsoft_advertising_get_budget_opportunities | Read Microsoft's budget suggestions for campaigns limited by budget: Opportunities with CampaignId, CurrentBudget, RecommendedBudget (based… |
microsoft_advertising_get_bid_opportunities | Read keyword bid suggestions that would lift ads to a better position: Opportunities with AdGroupId, CampaignId, KeywordId, MatchType… |
microsoft_advertising_get_keyword_opportunities | Read new keyword suggestions for existing campaigns and ad groups: Opportunities with CampaignId, CampaignName, AdGroupId, AdGroupName… |
microsoft_advertising_get_auction_insights | Compare the account, campaigns, ad groups or keywords with the other advertisers in the same auctions over a date range: Result.Entries… |
microsoft_advertising_get_performance_insights | Explain notable changes in performance over up to one month: Result entries with Date, EntityType, EntityId (account or campaign id)… |
microsoft_advertising_get_historical_search_counts | Count how often keywords were searched on Bing and partner sites in the past: KeywordSearchCounts with Keyword and SearchCountsByAttributes… |
microsoft_advertising_get_keyword_ideas | Keyword Planner: get keyword ideas and their search volume for seed keywords in one location: KeywordIdeas with Keyword… |
Example prompts
- "Which Microsoft Advertising accounts can I see, and in which currency do they bill?"
- "List the active campaigns of account 180012345 with their daily budgets."
- "Who outranks us in the auctions of our brand campaign over the last 30 days?"
- "Which budget and bid opportunities does Microsoft suggest, and how many extra clicks would they bring?"
- "How many monthly searches do running shoes women and trail running shoes get in the US?"
Next steps
Was this guide helpful?