Skip to main content
Glama
msads-mcp

msads-mcp

by kopeli91
README.md
# msads-mcp

A small, read-only Microsoft Advertising (Bing Ads) MCP server for Claude Code.

It's built for one common case. Your Microsoft Ads login is a **personal Microsoft account (MSA)** that uses a work email as its username, and the hosted Microsoft Ads connector rejects it with *"This username may be incorrect… contact your admin."*

## Quick start with Claude Code

Clone the repo, open Claude Code in the folder, and say:

> Follow SETUP_PROMPT.md and set this up for me.

The setup prompt walks Claude (or you) through every step. It covers the Azure app registration, secrets, one-time sign-in and registering the server.

Using the **Claude Desktop** app instead of Claude Code? Follow [CLAUDE_DESKTOP.md](CLAUDE_DESKTOP.md).

## What's in here

| file | what it does |
|---|---|
| `CLAUDE_DESKTOP.md` | how to add the server to the Claude Desktop app |
| `SETUP_PROMPT.md` | the full setup guide, written as a prompt you can give Claude |
| `auth.py` | one-time OAuth sign-in that stores a refresh token |
| `server.py` | the MCP server, with the tools `campaigns` and `conversion_goals` |
| `requirements.txt` | Python dependencies |

Secrets go in `~/.msads/` by default. Set `MSADS_SECRETS_DIR` to use a different folder. Nothing secret is stored in this repo.

## Tools (read-only)

- `campaigns(status)` returns each search campaign's name, status, daily budget, bid strategy, tROAS and max CPC
- `conversion_goals()` returns each account conversion goal's name, type, status, exclude-from-bidding flag and conversion window

Change history, offline-upload status and performance reporting are TODO. Pull requests are welcome.