admob-workflows-mcp

v0.1.0
io.github.mesutbeysulen/admob-workflows-mcp Checked 4 days ago Published 7 days ago

AdMob apps, ad units and earnings, plus Google Mobile Ads SDK integration steps for iOS and Android.

An MCP server and an agent skill that let Claude, Codex or any MCP client add AdMob ads to an iOS or Android app: find or create the AdMob app and ad units, integrate the Google Mobile Ads SDK with consent and ATT, keep test IDs in debug builds, and read earnings. It runs locally over stdio and is not affiliated with Google. Works best next to apple-connect-workflows-mcp, which supplies bundle IDs and App Store IDs. Google's AdMob API can create apps and ad units only in its v1beta version, and only for accounts Google has approved. Google's reference says: "This method has limited access.

Summary extracted from the README.

AdMob Workflows MCP

npm version CI License: MIT

An MCP server and an agent skill that let Claude, Codex or any MCP client add AdMob ads to an iOS or Android app: find or create the AdMob app and ad units, integrate the Google Mobile Ads SDK with consent and ATT, keep test IDs in debug builds, and read earnings. It runs locally over stdio and is not affiliated with Google.

Give this line to your AI assistant:

https://github.com/mesutbeysulen/admob-workflows-mcp — install this MCP server and skill for me and follow AGENTS.md.

Two parts

Part What it does
MCP server (admob) Talks to the AdMob API: accounts, apps, ad units, earnings reports; creates apps and ad units; returns integration steps, test IDs and app-ads.txt
Skill (admob-integration) Tells the assistant how to do the whole job in your project: placements, SDK, consent, build-specific IDs, verification, store declarations

Works best next to apple-connect-workflows-mcp, which supplies bundle IDs and App Store IDs.

About creating apps and ad units

Google's AdMob API can create apps and ad units only in its v1beta version, and only for accounts Google has approved. Google's reference says: "This method has limited access. If you see a 403 permission denied error, please reach out to your account manager for access."

So the server works either way:

  • With create access: app_create and ad_unit_create create them and return the IDs.
  • Without it: the same tools return manual_required with the exact AdMob console steps. You paste the ID back, and the assistant continues. Until then the app uses Google's test IDs.

Reading accounts, apps, ad units and earnings works for every account.

Setup

Node.js 24 or newer.

  1. Google Cloud OAuth client (once):

    1. In Google Cloud Console, pick a project and enable AdMob API (APIs & Services > Library).
    2. OAuth consent screen: External; add your Google account as a test user.
    3. Credentials > Create credentials > OAuth client ID > Desktop app, then download the JSON file.
  2. Sign in (opens the browser; the refresh token is saved in ~/.admob-mcp with owner-only permissions):

    npx -y admob-workflows-mcp@0.1.0 auth-setup --client-file /absolute/path/client_secret.json
    

    Add --readonly for reports only, or --publisher pub-… if your Google account has several AdMob accounts.

  3. Register the server:

    claude mcp add --scope user admob -- npx -y admob-workflows-mcp@0.1.0 serve
    
    codex mcp add admob -- npx -y admob-workflows-mcp@0.1.0 serve
    

    JSON clients (Cursor, Claude desktop):

    { "mcpServers": { "admob": { "command": "npx", "args": ["-y", "admob-workflows-mcp@0.1.0", "serve"] } } }
    
  4. Install the skill for Claude Code and Codex:

    npx -y admob-workflows-mcp@0.1.0 install-skill
    
  5. Check: npx -y admob-workflows-mcp@0.1.0 doctor. Then start a new session and ask, for example: "Add a banner on the home screen and a rewarded ad for extra lives to this app."

MCP tools

Tool Purpose
accounts_list AdMob accounts, currency, time zone
apps_list Apps with app IDs, platform, linked store ID, approval state
ad_units_list Ad units with IDs and formats, optionally for one app
earnings_report Earnings, impressions, clicks, requests, rates by date, app, ad unit, country, format
app_create Find or create the AdMob app; linking to a store needs confirmStoreLink because it cannot be undone
ad_unit_create Find or create an ad unit (banner, interstitial, rewarded, rewarded interstitial, native, app open)
integration_guide Ordered SDK steps and code for iOS or Android, with debug/release IDs, UMP consent and ATT
test_ad_units Google's demo IDs
app_ads_txt The app-ads.txt line and where to host it
store_checklist App Privacy / Data safety and other store steps without an API

Safety

  • Credentials stay local: the OAuth client file is read from its path, and the refresh token is stored with owner-only permissions. Neither is ever printed or sent to the model.
  • Creation is idempotent: rerunning returns exists instead of duplicating.
  • Store linking is irreversible on Google's side, so it requires an explicit confirmation flag.
  • Set "allowWrites": false in ~/.admob-mcp/config.json to make the server read-only. Config edits apply on the next call.
  • Debug builds always use test IDs; the skill never puts real IDs in debug builds, because clicking live ads can get an AdMob account disabled.

Development

npm ci
npm run check
npm test

Releasing: bump version in package.json and both versions in server.json, add a CHANGELOG.md entry, and push to main. The Release workflow publishes to npm, tags v<version>, creates a GitHub release and lists the version in the MCP Registry.

License

MIT