Platform Setup — Microsoft Ads
Configure Microsoft Advertising credentials for this plugin and verify account access.
Workflow
Step 1: Identify setup needs
- Use
references/bing-setup.mdfor credential configuration. - Use
references/config-patterns.mdfor environment variable guidance. - If the user already has credentials configured, skip to Step 3.
Step 2: Microsoft Advertising setup
Guide the user through Azure app registration, developer token setup, OAuth credentials, and environment variable configuration from references/bing-setup.md.
Key items:
- Developer token from Microsoft Advertising Developer Portal.
- Azure App Registration for OAuth client ID.
- OAuth refresh token via the Microsoft identity platform.
- Customer ID and Account ID from the Microsoft Advertising UI.
Recommend .claude/settings.local.json (gitignored, project-scoped) as the primary credential store.
Step 3: Verify Microsoft Advertising access
After env vars are configured, run mcp__bing-ads__list_accounts and report:
- Whether account listing succeeds.
- Which account IDs, names, and statuses are visible.
- Any missing env vars or auth failures that block access.
If verification fails, map the error to the specific missing or invalid variable and provide the fix.
Common failures:
- Token expired: Microsoft rotates refresh tokens on every token refresh. Re-run the OAuth flow to get a new BING_ADS_REFRESH_TOKEN.
- Invalid client ID: Verify the Azure App Registration application (client) ID.
- Wrong customer/account ID: Customer ID is the manager-level ID; Account ID is the specific ad account.
Step 4: Summary
Summarize:
- Microsoft Advertising: [N] accounts accessible.
- Any credentials with missing or failed configuration.
- Next steps if verification failed.
Step 5: Generate account profile
After verifying platform access:
- Read
references/profile-template.mdas the base template. - Populate the Accounts table with discovered account IDs, names, and statuses from Step 3.
- Ask the user for their KPI targets (CPA, ROAS, monthly budget) and fill the Targets table.
- Ask about any active tests, conversion actions, attribution model, and preferences.
- Write the populated profile to
${CLAUDE_PLUGIN_ROOT}/profile/account-profile.md. - Confirm the profile was saved and explain that analysis skills (morning-brief, waste-detector, etc.) will read it automatically on each run.
If the profile already exists, ask whether to overwrite or merge new account data into the existing profile.
Cowork compatibility
- Claude Code / Codex: Full API access via MCP tools.
- Claude Cowork: MCP servers are expected to work via passthrough. Verify by running
/setupin your Cowork session.
Guardrails
- Never ask users to paste secrets into chat logs.
- Recommend
.claude/settings.local.json(gitignored, project-scoped) for credentials. Shell env vars are an alternative. - For failed verification, report the exact missing variable or auth step.
- This plugin is read-only. No account modifications are made during setup.
References
references/bing-setup.mdreferences/config-patterns.mdreferences/profile-template.md