Bing Ads MCP Server
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Bing Ads MCP Server list my campaigns"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Bing Ads MCP Server
Production-grade MCP server for Microsoft Advertising (Bing Ads) API. Enables Claude to manage Bing/Microsoft Ads accounts with full campaign, ad group, keyword, and performance analysis capabilities.
Features:
13 tools (9 read, 4 write) -- production-tested
Campaign, ad group, and keyword management
Keyword performance analysis with quality scores
Search term reporting & bid automation
Budget & bid strategy optimization
Campaign-level budget updates
Negative keyword management (shared + campaign-level)
Note: Microsoft also publishes an official, read-only Microsoft Advertising MCP server (open pilot). This server adds search term and Quality Score reporting, shared negative list audits, and a small set of guarded write tools.
Quick install
Claude Code, one line (replace the placeholder values with your own; see Configuration for how to get them):
claude mcp add --env BING_ADS_DEVELOPER_TOKEN=YOUR_DEVELOPER_TOKEN --env BING_ADS_CLIENT_ID=YOUR_CLIENT_ID --env BING_ADS_REFRESH_TOKEN=YOUR_REFRESH_TOKEN --env BING_ADS_ACCOUNT_ID=YOUR_ACCOUNT_ID --env BING_ADS_CUSTOMER_ID=YOUR_CUSTOMER_ID --transport stdio mcp-bing-ads -- npx -y mcp-bing-adsSet BING_ADS_ACCOUNT_ID and BING_ADS_CUSTOMER_ID together, or leave both out. Without them the server starts, but every tool call reports that no account is configured. Add --env BING_ADS_CLIENT_SECRET=YOUR_CLIENT_SECRET if your Azure AD app is a confidential client.
The server starts read-only. Set BING_ADS_MCP_WRITE=true to expose the tools that change an account.
Add this to ~/Library/Application Support/Claude/claude_desktop_config.json (macOS), then fully quit and restart Claude Desktop:
{
"mcpServers": {
"mcp-bing-ads": {
"command": "npx",
"args": ["-y", "mcp-bing-ads"],
"env": {
"BING_ADS_DEVELOPER_TOKEN": "YOUR_DEVELOPER_TOKEN",
"BING_ADS_CLIENT_ID": "YOUR_CLIENT_ID",
"BING_ADS_REFRESH_TOKEN": "YOUR_REFRESH_TOKEN",
"BING_ADS_ACCOUNT_ID": "YOUR_ACCOUNT_ID",
"BING_ADS_CUSTOMER_ID": "YOUR_CUSTOMER_ID"
}
}
}
}Related MCP server: Microsoft Ads MCP Server
Installation
npm install mcp-bing-adsConfiguration
Security: Never share your .mcp.json file or commit it to git -- it may contain API credentials. Add .mcp.json to your .gitignore.
Get OAuth credentials:
Go to Microsoft Azure Portal
Create an Azure AD app registration
Grant API permissions:
Microsoft Advertising APIScopes:
https://ads.microsoft.com/msads.manage offline_access
Create
config.json:cp config.example.json config.jsonFill in your credentials:
{ "oauth": { "client_id": "YOUR_AZURE_CLIENT_ID", "client_secret": "YOUR_AZURE_CLIENT_SECRET" }, "clients": { "default": { "customer_id": "YOUR_CUSTOMER_ID", "account_id": "YOUR_ACCOUNT_ID", "name": "My Account" } } }Set environment variables (recommended):
export BING_ADS_DEVELOPER_TOKEN="your_developer_token" export BING_ADS_CLIENT_ID="your_client_id" export BING_ADS_REFRESH_TOKEN="your_refresh_token" # Optional: export BING_ADS_CLIENT_SECRET="your_client_secret" # Optional: opt into mutating tools (read-only by default) export BING_ADS_MCP_WRITE="true"
Environment Variables
Variable | Required | Default | Description |
| yes | -- | Microsoft Advertising developer token |
| yes | -- | Azure AD app client ID |
| yes | -- | OAuth refresh token |
| no | -- | Azure AD app client secret (if confidential client) |
| no |
| Set to |
Read-only by default
Mutating tools (bing_ads_pause_keywords, bing_ads_update_campaign_budget, bing_ads_update_ad_group_cpc_bid, bing_ads_add_shared_negatives) are hidden from the tool list and refused at call time unless BING_ADS_MCP_WRITE=true is set in the server environment. This is a safety gate against casual write actions -- for example, pausing a keyword or editing a budget based on a throwaway chat message. To make write changes, set the env var explicitly in your .mcp.json or shell profile for the session that needs it, then unset it afterwards. Read tools (list/report/performance) are always available.
Usage
Use with Claude Code
The server runs locally over stdio; your MCP client starts it. Add to ~/.claude.json (or a project .mcp.json):
{
"mcpServers": {
"bing-ads": {
"command": "npx",
"args": ["-y", "mcp-bing-ads"],
"env": {
"BING_ADS_DEVELOPER_TOKEN": "your_developer_token",
"BING_ADS_CLIENT_ID": "your_client_id",
"BING_ADS_REFRESH_TOKEN": "your_refresh_token"
}
}
}
}Claude Desktop: Add to ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows).
Example API Calls
// Get client context
bing_ads_get_client_context({ working_directory: "/path/to/project" })
// List campaigns
bing_ads_list_campaigns()
// Get campaign performance
bing_ads_get_campaign_performance({
start_date: "2026-01-01",
end_date: "2026-03-01"
})
// Get keyword performance
bing_ads_keyword_performance({
start_date: "2026-02-01",
end_date: "2026-03-01"
})
// Create negative keywords
bing_ads_add_shared_negatives({
shared_list_id: "list_123",
keywords: [
{ text: "cheap", match_type: "Phrase" },
{ text: "discount", match_type: "Exact" }
]
})API Reference
Context
bing_ads_get_client_context(working_directory)-- Detect account from working directory
Campaigns
bing_ads_list_campaigns()-- List all campaignsbing_ads_get_campaign_performance(start_date, end_date)-- Campaign metricsbing_ads_update_campaign_budget(campaign_id, daily_budget)-- Update daily spend
Ad Groups
bing_ads_list_ad_groups(campaign_id)-- List ad groups in campaign
Keywords
bing_ads_keyword_performance(start_date, end_date, [campaign_ids])-- Keyword metrics & QSbing_ads_search_term_report(start_date, end_date)-- Search terms that triggered adsbing_ads_pause_keywords(ad_group_id, keyword_ids)-- Pause keywords
Negative Keywords
bing_ads_list_shared_entities([type])-- List shared negative listsbing_ads_add_shared_negatives(list_id, keywords)-- Add to shared list
Performance Reports
Campaign performance (ROI, conversions, CTR, CPC)
Keyword performance (QS, expected CTR, ad relevance, landing page experience)
Search term insights (which queries are converting)
Key Metrics & Definitions
Quality Score (QS): 1-10 rating of keyword quality
1-3: Poor
4-6: Average
7-10: Excellent
Expected CTR: 1-9 rating of expected click-through rate Ad Relevance: 1-9 rating of relevance to search query Landing Page Experience: 1-9 rating of landing page quality
CLI Tools
npm run dev # Run in dev mode (tsx)
npm run build # Compile TypeScript
npm test # Run contract testsArchitecture
Files:
src/index.ts— MCP server, OAuth flow, tool handlerssrc/tools.ts— Tool schema definitionssrc/errors.ts— Error handling & classificationconfig.json— Credentials & client mapping
Error Classification:
Authentication errors (token expired)
Rate limit errors (retry with backoff)
Service errors (API temporarily unavailable)
Validation errors (bad input)
Development
Adding a New Tool
Define schema in
src/tools.tsAdd handler in
src/index.tstool dispatchAdd contract test in
.contract.test.tsTest with
npm test
Testing
npm test -- --run # Single run
npm test -- --watch # Watch modeTroubleshooting
Config file not found
cp config.example.json config.json
# Fill in your Azure credentials and Bing Ads IDsMissing required credentials
Check that:
BING_ADS_DEVELOPER_TOKEN,BING_ADS_CLIENT_ID, andBING_ADS_REFRESH_TOKENare setBING_ADS_CLIENT_SECRETis set (if using a confidential app)OAuth token is valid (expires, may need refresh)
Rate limit exceeded
Bing Ads applies rate limits. The server handles common retries automatically. If you hit limits frequently:
Batch operations when possible
Reduce query frequency
Wait before retrying
Quality Score is 0
QS = 0 means keyword hasn't been shown enough times yet. Increase impressions or wait for more data.
License
MIT
Contributing
Contributions welcome! Please:
Add tests for new features
Update README
Follow existing code style
Tag releases
Support
Issues: GitHub issues for bugs/feature requests
Docs: See
docs/folder for detailed API referenceCommunity: GitHub Discussions
Built By
Mark Harnett — Demand generation leader and paid media practitioner building AI-powered ad management tools. This is the first comprehensive open-source Bing Ads MCP server — born from managing real campaigns across multiple accounts and wanting Claude to do the heavy lifting.
Built with production workloads in mind: resilient API calls (circuit breakers, retry with backoff, response truncation), full Quality Score diagnostics, and negative keyword management at scale.
Also by Mark: mcp-linkedin-ads -- LinkedIn Ads MCP server with 11 tools.
Last Updated: 2026-03-13
Available Tools
9 toolsbing_ads_get_campaign_performanceA
Get campaign performance metrics (impressions, clicks, CTR, CPC, spend, conversions, revenue) for a date range. Returns an array of rows. If the report is too large for one response it is cut and returned as { rows, truncated: true, original_count, returned_count } instead: that result is PARTIAL, so totals summed from it are understated. Narrow the date range or filter by campaign and re-run until truncated is absent.
Inputs: end_date (required), start_date (required), account_id.
bing_ads_get_client_contextA
Get the current client context and health status based on working directory. Call this first to confirm which Bing Ads account you're working with.
Inputs: working_directory (required).
bing_ads_keyword_performanceA
Get keyword performance report with metrics including impressions, clicks, cost, conversions, quality score. Optionally filter by campaign. Returns an array of rows. If the report is too large for one response it is cut and returned as { rows, truncated: true, original_count, returned_count } instead: that result is PARTIAL, so totals summed from it are understated. Narrow the date range or filter by campaign and re-run until truncated is absent.
Inputs: end_date (required), start_date (required), account_id, campaign_ids.
bing_ads_list_ad_groupsB
List ad groups within a specific campaign, including ad group name and status.
Inputs: campaign_id (required), account_id.
bing_ads_list_campaignsA
List all campaigns for the current client's Bing/Microsoft Advertising account, including campaign name, status, budget, and type.
Inputs: account_id.
bing_ads_search_term_reportA
Get search term report showing actual search queries that triggered ads, with matched keywords and performance metrics. Returns an array of rows. If the report is too large for one response it is cut and returned as { rows, truncated: true, original_count, returned_count } instead: that result is PARTIAL, so totals summed from it are understated. Narrow the date range or filter by campaign and re-run until truncated is absent.
Inputs: end_date (required), start_date (required), account_id, campaign_ids.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 9 tools
Each tool targets a distinct resource and action: identity/context, campaign listing, ad group listing, three separate report dimensions (search terms, campaigns, keywords), and three distinct shared-negative-keyword operations. Descriptions go further, explicitly contrasting near-neighbors (e.g. list_shared_entities returns only an AssociationCount, while get_shared_entity_associations returns the campaigns, and get_shared_list_items returns the actual keywords). An agent can select correctly without guessing.
Every tool uses the same bing_ads_ prefix followed by a consistent verb_noun pattern (get_, list_, _report, _performance). All snake_case, no camelCase or stylistic drift. The verb choice also maps predictably to return semantics: list_* for collections, get_* for a specific object or scoped detail.
Nine tools is well within a comfortable range and each earns its place by covering a distinct slice of the audit surface. If anything it is slightly thin for a full ads platform, but nothing is redundant or padding.
The surface is coherent but strictly read-only: campaigns, ad groups, keywords, and negatives can all be inspected, yet nothing can be created, updated, or have negatives added — despite several descriptions referencing the need to add negatives. There is also no ad-level or account-level reporting and no way to fix the misconfiguration the audit tools are designed to detect. Agents can diagnose but hit a dead end before remediating.
Maintenance
Related MCP Connectors
Microsoft Ads (Bing Ads) MCP server: read reports and draft campaign changes from AI.
Hosted Google Ads MCP server for Claude, ChatGPT and Cursor, with each action switched per account.
Google Ads MCP server: run Search, Display, Demand Gen and PMax campaigns from AI.
Hosted MCP server for marketing agencies: connect Google Ads, GA4, Search Console, Meta, LinkedIn and more to Claude or ChatGPT. Pull reports and make changes via OAuth login, no setup.
Related MCP Servers
- AlicenseNot gradedqualityFmaintenanceThis read-only MCP Server allows you to connect to Bing Ads data from Claude Desktop through CData JDBC Drivers. Free (beta) read/write servers available at https://www.cdata.com/solutions/mcp3MIT
- AlicenseNot gradedqualityDmaintenanceA Model Context Protocol (MCP) server for Microsoft Advertising (Bing Ads / DuckDuckGo Ads). This server enables AI assistants to create, manage, and report on Microsoft Advertising campaigns programmatically.2MIT
- AlicenseAqualityCmaintenanceMCP server for Microsoft Advertising (Bing Ads) REST API enabling agent-led campaign management and reporting. It provides tools to manage campaigns, ad groups, keywords, ads, budgets, and pull performance reports.6621 PyPIMIT
- AlicenseAqualityDmaintenanceAn MCP server for the Microsoft Advertising (Bing Ads) API. Gives an MCP client live read and management access to your Microsoft Advertising accounts — reporting, campaign structure, and full write operations.26MIT