microsoft-ads-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| MSADS_TENANT | No | Microsoft tenant (optional, Microsoft only). | common |
| MSADS_CLIENT_ID | No | Microsoft application client ID (required for Microsoft provider). | |
| MSADS_TOKEN_FILE | No | Path to token file for refresh token storage. | ~/.config/microsoft-ads-mcp/tokens.json |
| MSADS_ENVIRONMENT | No | API environment: 'production' or 'sandbox'. | production |
| MSADS_REDIRECT_URI | No | Redirect URI for Microsoft confidential app (optional). | http://localhost:8400 |
| MSADS_AUTH_PROVIDER | No | Authentication provider: 'google' or 'microsoft'. | |
| MSADS_CLIENT_SECRET | No | Microsoft client secret for confidential app (optional). | |
| MSADS_LOOPBACK_PORT | No | Loopback port for OAuth redirect. | 8400 |
| MSADS_DEVELOPER_TOKEN | No | Your Microsoft Advertising developer token (required). | |
| MSADS_GOOGLE_CLIENT_ID | No | Google OAuth client ID (required for Google provider). | |
| MSADS_GOOGLE_CLIENT_SECRET | No | Google OAuth client secret (required for Google provider). |
Capabilities
Features and capabilities supported by this server
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
| experimental | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| list_accountsA | List all Microsoft Advertising accounts the signed-in user can access (id, name, number, customer id). Start here to get an account_id. |
| list_campaignsA | List campaigns in an account: id, name, status, type, daily budget. |
| list_ad_groupsA | List ad groups in a campaign: id, name, status, cpc bid. |
| list_keywordsA | List keywords in an ad group: id, text, match type, status, bid. |
| list_adsA | List ads in an ad group: id, type, status, final urls. |
| list_negative_keywordsA | List campaign-level negative keywords (id, text, match type). |
| performance_reportA | Pull a performance report. Numbers come back already typed (floats/ints; percentages as plain numbers, e.g. 1.89 means 1.89%). Args: account_id: Ads account id. report_type: account | campaign | ad_group | ad | keyword | search_term | geographic. - search_term = actual user search queries (best for finding waste + new keywords) - keyword / ad_group / ad = entity performance incl. quality score - geographic = performance by country/state/city predefined_time: Today, Yesterday, LastSevenDays, Last14Days, Last30Days, ThisWeek, LastWeek, LastFourWeeks, ThisMonth, LastMonth, LastThreeMonths, LastSixMonths, ThisYear, LastYear. Ignored if start_date+end_date given. start_date / end_date: custom range YYYY-MM-DD (both required for custom). aggregation: Summary, Daily, Weekly, Monthly, Hourly (TimePeriod column is auto-dropped for Summary). campaign_ids: optional scope to specific campaigns. columns: optional explicit column list (defaults are sensible per report). |
| find_wasted_spendA | Find search terms that burned money with little/no return — spend >= min_spend and conversions <= max_conversions — sorted by spend descending. These are prime candidates to add as negative keywords. |
| set_campaign_statusA | Pause or enable a campaign. status = "Active" or "Paused". WARNING: "Active" lets the campaign spend. Confirm with the user first. |
| set_campaign_budgetA | Set a campaign's daily budget (account currency). WARNING: raising budget raises potential spend. Confirm increases with the user. |
| set_ad_group_statusA | Pause or enable an ad group. status = "Active" or "Paused". |
| set_keywordA | Update a keyword's status ("Active"/"Paused") and/or bid (account currency). Provide at least one of status or bid. |
| add_negative_keywordsA | Add campaign-level negative keywords to stop ads showing for those terms. match_type = "Exact" or "Phrase". Returns the new negative keyword ids. |
| remove_negative_keywordsA | Remove campaign-level negative keywords by id (from list_negative_keywords). |
| list_shared_negative_listsA | List account-level negative-keyword lists (shared across campaigns): id, name, how many campaigns it's attached to, and item count. |
| add_negatives_to_shared_listA | Add negative keywords to a shared list (applies to every campaign the list is attached to). Prefer this over per-campaign negatives when an account uses a shared negatives list. match_type = "Exact" or "Phrase". |
| create_campaignA | Create a Search campaign (Manual CPC). Defaults to PAUSED so it never spends until you explicitly enable it. Returns the new campaign_id. |
| create_ad_groupA | Create an ad group in a campaign (English, given default CPC bid). Defaults to PAUSED. Returns the new ad_group_id. |
| add_keywordsA | Add keywords to an ad group. Each item: {text, match_type (Broad|Phrase|Exact), bid (optional float), status (optional, default Active)}. Returns new keyword ids. |
| add_responsive_search_adA | Add a Responsive Search Ad. Needs 3-15 headlines (<=30 chars each) and 2-4 descriptions (<=90 chars each). path1/path2 are optional display-url paths. Returns the new ad id. |
| account_overviewA | One-call health snapshot: account KPIs + per-campaign breakdown + flags (zero-conversion spenders, campaigns losing impressions to budget). Best starting point for "how are my ads doing?". |
| compare_periodsA | Compare the last |
| optimization_auditA | Audit the account and return a prioritized action list plus the supporting detail: wasted search terms, wasted keywords, low-quality-score keywords, keywords above target CPA (if target_cpa given), top keywords to scale, and campaigns limited by budget. Read-only — suggests, doesn't change anything. |
| apply_negatives_from_wasteA | Find wasted search terms (spend with no conversions) and add them as campaign negative keywords. dry_run=True (default) returns the plan only; set dry_run=False to actually apply. Confirm with the user before applying. |
| search_term_harvestC | Converting search queries that aren't already exact keywords — suggestions to add as keywords (with the ad group they triggered in). The growth mirror of find_wasted_spend. |
| build_search_campaignA | Create a full Search campaign in one call: campaign + ad group + keywords +
a Responsive Search Ad. Everything is created PAUSED. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/james-julius/microsoft-ads-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server