Server data from the Official MCP Registry
MCP server for the Google AdMob API — apps, ad units, mediation, and revenue reports
MCP server for the Google AdMob API — apps, ad units, mediation, and revenue reports
Valid MCP server (1 strong, 1 medium validity signals). 1 known CVE in dependencies Package registry verified. Imported from the Official MCP Registry.
6 files analyzed · 2 issues found
Security scores are indicators to help you make informed decisions, not guarantees. Always review permissions before connecting any MCP server.
This plugin requests these system permissions. Most are normal for its category.
Set these up before or after installing:
Environment variable: ADMOB_ACCOUNT
Environment variable: ADMOB_TOOLSETS
Environment variable: ADMOB_READ_ONLY
Environment variable: ADMOB_CREDENTIALS_DIR
Environment variable: ADMOB_OAUTH_CLIENT_FILE
Environment variable: GOOGLE_CLIENT_ID
Environment variable: GOOGLE_CLIENT_SECRET
Environment variable: GOOGLE_REFRESH_TOKEN
Add this to your MCP configuration file:
{
"mcpServers": {
"io-github-parksanggwon-admob-mcp-server": {
"args": [
"-y",
"admob-mcp-server"
],
"command": "npx"
}
}
}From the project's GitHub README.
English | 한국어
Ask your AI assistant about your AdMob apps and earnings — in plain language:
- "How much did my apps earn in the last 7 days, broken down by country?"
- "Which mediation ad source had the best eCPM this month?"
- "Compare the RPM of my banner vs. rewarded ad units."
- "Create a rewarded ad unit for my new game."

This is a Model Context Protocol (MCP) server for the Google AdMob API.
It works with Claude Code, Claude Desktop, Cursor, Gemini CLI, and any other MCP-capable AI client.
flowchart LR
C["MCP client<br/>Claude Code · Claude Desktop · Cursor · Gemini CLI"]
subgraph S["admob-mcp-server — runs on your machine"]
direction TB
T["18 tools in 5 toolsets<br/>accounts · apps · adunits · reports · mediation<br/>(filtered by --toolsets / --read-only)"]
A["Credential resolver<br/>env vars → token.json → gcloud ADC"]
R["Report flattener<br/>chunk stream → rows · micros → currency"]
end
G["Google AdMob API<br/>v1beta"]
C <-->|"MCP over stdio"| T
T --> A
A <-->|"OAuth 2.0 / HTTPS"| G
G -.->|"report chunks"| R
R -.-> T
Credentials and revenue data travel only between your machine and Google — there is no third-party server in between.
--read-only to hide all write tools (create/update) and issue tokens that can't modify anything--toolsets reports,accountsnpx admob-mcp-server auth), environment-variable refresh token, or gcloud Application Default CredentialsOne-time setup, roughly 10 minutes:
| Step | What you do | Where |
|---|---|---|
| 1. Google Cloud setup | Register a personal "app" so Google lets you access your own data | browser |
| 2. Sign in | Run one command and log in with Google | terminal |
| 3. Connect your AI client | Add one config entry and restart the client | terminal |
node --version; if missing, install from nodejs.orgWhy is this needed?
The AdMob API has no simple API keys — Google requires every program that accesses your data to be registered as an "OAuth app".
Here you register a personal one that only you will use.
It's free and needs no billing setup.
admob-mcp), and your email as the support/contact email[!WARNING] While the consent screen is in Testing mode, Google expires sign-ins after 7 days, so you'll need to re-run the sign-in weekly.
To stop that, publish the app (Audience → Publish app).
Publishing for your own use doesn't require Google's verification — you'll just see an "unverified app" warning during sign-in, which is expected.
Move the JSON file you downloaded to where the server looks for it, then run the sign-in command:
mkdir -p ~/.admob-mcp
mv ~/Downloads/client_secret_*.json ~/.admob-mcp/oauth_client.json
npx admob-mcp-server auth
(On Windows, move the file to C:\Users\<you>\.admob-mcp\oauth_client.json in Explorer, then run the npx command.)
Your browser opens.
Pick the Google account that owns your AdMob account and allow access.
If you see a "Google hasn't verified this app" warning, that's your own app from Part 1 — click "Continue".
When the terminal prints Setup complete, your sign-in is saved to ~/.admob-mcp/token.json and reused from then on.
By default the sign-in covers every tool, including write tools.
If you only want reporting access, run npx admob-mcp-server auth --read-only instead.
What the auth command does:
sequenceDiagram
autonumber
participant T as Terminal
participant S as admob-mcp-server
participant B as Browser
participant G as Google
T->>S: npx admob-mcp-server auth
S->>S: read ~/.admob-mcp/oauth_client.json
S->>B: open consent URL (loopback redirect, random port)
B->>G: sign in & allow scopes
G-->>S: authorization code → refresh token
S->>S: save ~/.admob-mcp/token.json (reused for every later call)
If you already have a refresh token, no files are needed (write tools additionally need the token to cover the admob.monetization scope):
export GOOGLE_CLIENT_ID="....apps.googleusercontent.com"
export GOOGLE_CLIENT_SECRET="..."
export GOOGLE_REFRESH_TOKEN="..."
The same pattern Google's official Analytics/Ads MCP servers use:
gcloud auth application-default login \
--scopes=https://www.googleapis.com/auth/admob.readonly,https://www.googleapis.com/auth/admob.report,https://www.googleapis.com/auth/admob.monetization,https://www.googleapis.com/auth/cloud-platform \
--client-id-file=path/to/oauth_client.json
Drop the admob.monetization scope if you only want reporting access.
Credential resolution order: environment variables → token.json (from auth) → ADC.
Pick your client below.
MCP servers are loaded when the client starts, so restart the client after adding the config.
Claude Code
claude mcp add admob -- npx -y admob-mcp-server
Verify with claude mcp list — you should see admob: ... - ✔ Connected.
Claude Desktop — open Settings → Developer → Edit Config, which opens claude_desktop_config.json (macOS: ~/Library/Application Support/Claude/, Windows: %APPDATA%\Claude\), and add:
{
"mcpServers": {
"admob": {
"command": "npx",
"args": ["-y", "admob-mcp-server"]
}
}
}
Restart the app; the admob tools appear in the tools menu of the chat input.
Cursor — add the same mcpServers block to ~/.cursor/mcp.json, then check Settings → MCP shows admob as enabled.
Gemini CLI — add the same mcpServers block to ~/.gemini/settings.json, then check with /mcp inside the CLI.
[!TIP] If you used the environment-variable sign-in, pass the variables through your client's
envblock (Claude Code: repeat--env KEY=valuebefore--; JSON configs: add an"env": { ... }object next to"args").
You don't call tools yourself — just ask in plain language and the assistant picks the right tools.
Some starters:
Most clients ask for your permission before each tool call, so nothing (especially write operations) runs without your approval.
All configuration is optional — the defaults work for a single AdMob account.
| Variable | Description | Default |
|---|---|---|
ADMOB_ACCOUNT | Publisher ID (pub-XXXXXXXXXXXXXXXX). Only needed when your login can access multiple accounts | auto-discovered |
ADMOB_TOOLSETS | Comma-separated toolsets to enable | all |
ADMOB_READ_ONLY | true to skip write tools | false |
ADMOB_CREDENTIALS_DIR | Directory for oauth_client.json / token.json | ~/.admob-mcp |
ADMOB_OAUTH_CLIENT_FILE | Path to the OAuth client JSON used by auth | <credentials dir>/oauth_client.json |
GOOGLE_CLIENT_ID | OAuth client ID (env sign-in; also used by auth instead of the JSON file) | — |
GOOGLE_CLIENT_SECRET | OAuth client secret (env sign-in) | — |
GOOGLE_REFRESH_TOKEN | OAuth refresh token (env sign-in) | — |
| Flag | Description |
|---|---|
--toolsets <names> | Same as ADMOB_TOOLSETS, e.g. --toolsets reports,apps |
--read-only | Same as ADMOB_READ_ONLY=true |
--account <pub-id> | Same as ADMOB_ACCOUNT |
--client-file <path> | Same as ADMOB_OAUTH_CLIENT_FILE (for auth) |
CLI flags take precedence over environment variables.
Flags go after the command in your client config, e.g. npx -y admob-mcp-server --read-only.
A "tool" is a function the AI assistant can call on your behalf.
Tools are grouped into five toolsets; all are enabled by default, and --read-only skips the write tools:
| Toolset | Read tools | Write tools (skipped with --read-only) |
|---|---|---|
accounts | list_accounts, get_account | — |
apps | list_apps | create_app |
adunits | list_ad_units | create_ad_unit |
reports | generate_network_report, generate_mediation_report, generate_campaign_report | — |
mediation | list_ad_sources, list_adapters, list_mediation_groups, list_ad_unit_mappings | create_mediation_group, update_mediation_group, create_ad_unit_mapping, create_mediation_ab_experiment, stop_mediation_ab_experiment |
Read tools require the admob.readonly / admob.report scopes; write tools require admob.monetization (requested by default during auth).
| Tool | Description |
|---|---|
list_accounts | List accessible publisher accounts — use to find your pub-... ID |
get_account | Get account details: publisher ID, reporting currency, reporting time zone |
| Tool | Description |
|---|---|
list_apps | List registered apps with app ID, platform, store link, and approval state |
create_app | Create an app — link a store listing via appStoreId, or register manually via displayName |
| Tool | Description |
|---|---|
list_ad_units | List ad units with their IDs, formats, and owning apps |
create_ad_unit | Create an ad unit (appId, displayName, adFormat, optional adTypes / rewardSettings) |
All report tools take startDate / endDate (YYYY-MM-DD), metrics, and optional dimensions, dimensionFilters, sortConditions, maxReportRows (default 1000), currencyCode.
Responses are flat tables; monetary metrics are converted from micros to currency units.
| Tool | Description |
|---|---|
generate_network_report | AdMob Network performance: earnings, impressions, clicks, match rate, RPM, ... |
generate_mediation_report | Mediation performance across ad sources: earnings, observed eCPM per AD_SOURCE / MEDIATION_GROUP |
generate_campaign_report | Cross-promotion campaign stats (last 30 days only): impressions, clicks, installs, cost |
Valid dimensions/metrics per report are exposed as MCP resources (reference documents the assistant can read): admob://reference/network-report-spec, mediation-report-spec, campaign-report-spec.
| Tool | Description |
|---|---|
list_ad_sources | List available mediation ad sources (ad networks) and their IDs |
list_adapters | List adapters of an ad source, incl. required configuration keys |
list_mediation_groups | List mediation groups with targeting and lines (supports filter) |
list_ad_unit_mappings | List third-party placements mapped to an ad unit |
create_ad_unit_mapping | Map an ad unit to a third-party placement via an adapter |
create_mediation_group | Create a mediation group (targeting + mediation lines) |
update_mediation_group | Patch a mediation group using an updateMask |
create_mediation_ab_experiment | Start an A/B experiment on a mediation group |
stop_mediation_ab_experiment | Stop the experiment, choosing the winning variant |
Prompts are ready-made analysis requests.
Your client surfaces them as slash commands or a prompt picker (e.g. /top_performing_apps in Claude Code).
All take an optional days argument:
| Prompt | What it does |
|---|---|
top_performing_apps | Ranks your apps by revenue with RPM and match-rate context |
revenue_summary | Daily revenue trend with anomaly call-outs |
compare_ad_formats | Compares earnings and efficiency across ad formats |
~/.admob-mcp/oauth_client.json (your OAuth app) and ~/.admob-mcp/token.json (your sign-in).~/.admob-mcp/token.json, and optionally revoke the app's access at myaccount.google.com/permissions.--read-only — write tools disappear entirely and the sign-in only requests read scopes.command not found: npx / spawn npx ENOENTclaude mcp list, Gemini CLI: /mcp), and make sure npx -y admob-mcp-server runs in a terminal without errors.invalid_grant / "token has been expired or revoked"npx admob-mcp-server auth.access_denied during browser sign-innpx admob-mcp-server auth and pick the account that owns your AdMob account in the account chooser.PERMISSION_DENIEDadmob.monetization — tokens from auth --read-only can't write; re-run npx admob-mcp-server authRESOURCE_EXHAUSTEDADMOB_ACCOUNT=pub-... (find IDs with list_accounts).git clone https://github.com/ParkSangGwon/admob-mcp-server.git
cd admob-mcp-server
npm install
npm test
npm run build
# debug with the MCP Inspector
npm run inspect
To run a local build in a client, point it at the built entry instead of npx: node /path/to/admob-mcp-server/dist/index.js.
Releases: pushing a v* tag runs CI and publishes to npm with provenance (see .github/workflows/release.yml).
Issues and pull requests are welcome.
For larger changes, please open an issue first to discuss the direction.
Make sure npm run lint, npm run format:check, and npm test pass.
Be the first to review this server!
by Modelcontextprotocol · Developer Tools
Web content fetching and conversion for efficient LLM usage
by Toleno · Developer Tools
Toleno Network MCP Server — Manage your Toleno mining account with Claude AI using natural language.
by mcp-marketplace · Developer Tools
Create, build, and publish Python MCP servers to PyPI — conversationally.