AdMob MCP Server
Provides tools for interacting with the Google AdMob API to retrieve revenue data, manage publisher accounts, and generate detailed performance reports for apps, ad units, and mediation sources.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@AdMob MCP ServerShow me my revenue trend for the last 30 days"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
AdMob MCP Server
A local Model Context Protocol server that connects Claude to the Google AdMob API, giving you a conversational interface to your ad revenue data.
Two ways to use this server:
Local stdio (Claude Code on one machine): run
./setup.shand pick L.Vercel + Claude.ai Connector (multi-device): click the badge above, then follow docs/VERCEL.md. Or run
./setup.shand pick V.
Prerequisites
Node.js 18+
A Google Cloud project with the AdMob API enabled
OAuth 2.0 client credentials — Desktop app type for local mode, Web application type for Vercel mode (see docs/VERCEL.md for the Vercel-specific setup).
Setup
1. Get Google OAuth credentials
Go to the Google API Console
Create or select a project
Enable the AdMob API in the API Library
Go to Credentials > Create Credentials > OAuth client ID
Select Desktop app, name it, and click Create
Click Download JSON to download the client secret file
Copy the downloaded file into the
secrets/folder in this project
2. Install and configure
cd admob-mcp
./setup.shThe setup script will:
Find and rename the Google OAuth JSON to
secrets/client_secret.jsonInstall dependencies and build
Open a browser for Google OAuth authorization (token saved to
secrets/token.json)Register the MCP server with Claude Code
To re-authorize with updated scopes (e.g. after adding another Google MCP):
./setup.sh --reauthNote: If your Google Cloud project's OAuth consent screen has not been published (i.e. it is still in "Testing" status), you will see an authorization error. To fix this, either publish the app or add your Google account as a test user under OAuth consent screen > Audience in the Google Cloud Console.
Manual configuration
If you prefer not to use setup.sh, add this to your Claude Code MCP config:
{
"mcpServers": {
"admob": {
"type": "stdio",
"command": "node",
"args": ["/absolute/path/to/admob-mcp/dist/src/index.js"],
"env": {
"ADMOB_CREDENTIALS_PATH": "/absolute/path/to/admob-mcp/secrets/client_secret.json"
}
}
}
}Connector setup (Vercel)
Use this if you want the AdMob tools available in Claude.ai on every device, not just Claude Code on your laptop.
Fork the repo.
Click Deploy with Vercel above.
Provision Upstash Redis in the Vercel Storage tab — it auto-injects the
KV_*env vars our code uses. (Vercel deprecated standalone "Vercel KV"; Upstash is the same backend.)Create a Google Cloud OAuth client (Web app). Authorized redirect URI =
https://<your-deploy>.vercel.app/api/oauth/callback.Set env vars in Vercel:
GOOGLE_CLIENT_ID,GOOGLE_CLIENT_SECRET,OAUTH_REDIRECT_URI,CONNECTOR_TOKEN(generate withopenssl rand -hex 32). Watch for stray whitespace.Visit
https://<your-deploy>.vercel.app/api/setup, pasteCONNECTOR_TOKEN, click Authorize, and complete Google sign-in. This authorizes the server to read AdMob data on your behalf.In Claude.ai → Settings → Connectors → Add custom connector: paste
https://<your-deploy>.vercel.app/api/mcpas the URL, leave OAuth Client ID and Secret blank, click Add, then click Connect. A browser tab opens at/oauth/authorize— paste the sameCONNECTOR_TOKENonce. Claude.ai handles the rest.
Two OAuth flows are gated by the same CONNECTOR_TOKEN: Google ↔ server (step 6) and Claude.ai ↔ server (step 7). Full walkthrough including troubleshooting: docs/VERCEL.md.
Usage
Just ask Claude a question about your AdMob data in natural language. On first use, Claude will automatically call list_accounts to discover your AdMob accounts and ask which one you want to work with. After that, it will use the appropriate tools to answer your questions.
Tools
Core API tools
Tool | Description |
| List your AdMob publisher accounts |
| Get details for a specific account |
| List ad units with pagination |
| List apps with pagination |
| Generate a custom network report with full control over dimensions, metrics, filters, and sorting |
| Generate a custom mediation report with full control over dimensions, metrics, filters, and sorting |
Reporting tools
Tool | Prompt example |
| "Show my revenue trend for the last 30 days" |
| "Which ad units are underperforming?" |
| "Break down my earnings by country" |
| "Compare performance across ad formats" |
| "How is iOS vs Android performing?" |
| "What's my fill rate and where am I losing money?" |
| "Which mediation ad sources perform best?" |
| "Show week-over-week revenue changes" |
| "Which apps are my top earners?" |
| "Show my eCPM trends by ad unit over time" |
Revenue optimization tools
Tool | Prompt example |
| "My revenue dropped this week, what happened?" |
| "How much revenue am I losing to privacy restrictions?" |
| "Did my latest app update affect ad revenue?" |
| "Are users on old SDK versions seeing lower eCPM?" |
| "How is this month comparing to last month?" |
| "Which ad placements should I optimize?" |
| "Are certain OS versions hurting my ad revenue?" |
| "Which mediation groups need optimization?" |
| "Where can I improve eCPM by country?" |
| "Which ad formats work best in which countries?" |
| "Am I on track to hit last month's revenue?" |
| "What were my best and worst days this month?" |
| "Do I earn more on weekdays or weekends?" |
| "Which formats perform best on each platform?" |
| "How diversified is my revenue?" |
| "How are my mediation sources trending?" |
| "Give me a full breakdown for my top app" |
| "Flag any unusual days in the last 30 days" |
| "Compare ad instances within each mediation source" |
| "How does this month compare to the same month last year?" |
Project structure
src/index.ts— stdio entry point (Claude Code).src/tools.ts— all 36 tool definitions;registerTools(server, getClient).src/auth.ts— Google OAuth helpers (getAuthenticatedClient,authorizeViaLocalServer).src/token-store.ts—TokenStoreinterface +FileTokenStore(local) +KvTokenStore(Vercel KV).src/oauth-store.ts— KV-backed storage for the connector OAuth flow (auth codes + access tokens).src/http-auth.ts— Timing-safe bearer check for HTTP endpoints (sync againstCONNECTOR_TOKEN, async against KV-issued access tokens).src/admob-client.ts,src/helpers.ts— REST client and report-formatting utilities.api/mcp.ts— Vercel function: HTTP MCP endpoint (Streamable HTTP, bearer-gated, emitsWWW-Authenticateon 401).api/setup.ts— Vercel function: form that initiates the Google ↔ server OAuth flow.api/oauth/callback.ts— Vercel function: Google's redirect URI; stores tokens in KV.api/oauth/authorize.ts,api/oauth/token.ts,api/oauth/register.ts— Vercel functions implementing the Claude.ai ↔ server OAuth 2.1 flow with PKCE and Dynamic Client Registration.api/well-known/oauth-authorization-server.ts,api/well-known/oauth-protected-resource.ts— RFC 8414 / RFC 9728 metadata so Claude.ai can discover the OAuth endpoints.setup.sh— Interactive setup script ([L]ocal / [V]ercel / [B]oth).docs/VERCEL.md— Forker deployment guide.AGENTS.md— Canonical project notes (CLAUDE.md is a symlink to it).
Development
npm run build # Compile TypeScript
npm run start # Run the server directly (stdio)This server cannot be installed
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Appeared in Searches
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/willhou/admob-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server