Skip to main content
Glama
Microsoft Ads MCP Server

Microsoft Ads MCP Server

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
MICROSOFT_ADS_HOMENoPer-user folder for secrets, logs and .env.~/.microsoft-ads-mcp
MICROSOFT_ADS_HOSTNoHTTP transport bind host.127.0.0.1
MICROSOFT_ADS_PORTNoHTTP transport bind port.8000
MICROSOFT_ADS_TENANTNoSign-in tenant (default 'common': work, school and personal accounts).common
MICROSOFT_ADS_DRY_RUNNoSet to 'true' to preview writes without sending them.
MICROSOFT_ADS_MAX_BIDNoOptional absolute cap for bids.
MICROSOFT_ADS_TIMEOUTNoRequest timeout in seconds.60
MICROSOFT_ADS_AUDIT_LOGNoAudit log path.~/.microsoft-ads-mcp/logs/audit.jsonl
MICROSOFT_ADS_CLIENT_IDYesApplication (client) ID of your Entra app registration.
MICROSOFT_ADS_LOG_LEVELNoLog level; logs go to stderr.
MICROSOFT_ADS_READ_ONLYNoSet to 'true' to register only read-only tools.
MICROSOFT_ADS_TRANSPORTNo'stdio' (default), 'streamable-http' at http://HOST:PORT/mcp, or deprecated 'sse'.stdio
MICROSOFT_ADS_ACCOUNT_IDNoDefault Microsoft Advertising account ID.
MICROSOFT_ADS_TOKEN_FILENoRefresh-token file written by the auth command.~/.microsoft-ads-mcp/secrets/microsoft-ads-token.json
MICROSOFT_ADS_CUSTOMER_IDNoCustomer ID for the default account; looked up from the account if unset.
MICROSOFT_ADS_ENVIRONMENTNoEither 'production' (default) or 'sandbox'; they use separate credentials.production
MICROSOFT_ADS_TOOL_GROUPSNoComma-separated tool groups: accounts, campaigns, ad_groups, ads, keywords, asset_groups, targeting, budgets, labels, bulk_edits, reporting, insights, bulk, request. Unknown names stop the server at startup.
MICROSOFT_ADS_ALLOW_REMOTENoSet to 'true' (or use --allow-remote) to allow binding HTTP to a non-loopback host. The server has no sign-in, so only do this behind your own authentication.
MICROSOFT_ADS_CLIENT_SECRETNoOnly for apps registered as Web apps with a secret.
MICROSOFT_ADS_REFRESH_TOKENNoThe refresh token itself, instead of the token file.
MICROSOFT_ADS_BULK_THRESHOLDNoItems per write before confirm="APPLY" is needed.10
MICROSOFT_ADS_DEVELOPER_TOKENNoDeveloper token for Microsoft Advertising. Required in production; the sandbox uses Microsoft's universal sandbox token.
MICROSOFT_ADS_MAX_DOWNLOAD_MBNoLargest report or bulk file to download, in MB.200
MICROSOFT_ADS_MAX_DAILY_BUDGETNoOptional absolute cap for daily budgets.
MICROSOFT_ADS_MAX_INCREASE_PCTNoBid/budget rise percentage that needs confirm="APPLY".20
MICROSOFT_ADS_AUDIT_RETENTION_DAYSNoDays to keep audit entries, pruned at startup (0 keeps them).30

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

This server publishes no instructions, or was last inspected before Glama recorded them.

Capabilities

Server capabilities have not been inspected yet.

Tools

Functions exposed to the LLM to take actions

NameDescription

No tools

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources