MCP server for Google AdMob API
概览
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: - run ./setup.sh and pick . - click the badge above, then follow docs/VERCEL.md. Or run ./setup.sh and pick . - Node.js 18+ - A Google Cloud project with the enabled - OAuth 2.0 client credentials — type for local mode, type for Vercel mode (see docs/VERCEL.md for the Vercel-specific setup). 1. Go to the Google API Console 2. Create or select a project 3. Enable the in the API Library 4. Go to > > 5. Select , name it, and click 6. Click to download the client secret file 7. Copy the downloaded file into the secrets/ folder in this project The setup script will: - Find and rename the Google OAuth JSON to secrets/client_secret.json - Install dependencies and build - Open a browser for Google OAuth authorization (token saved to secrets/token.
README
以下为原文 README 节选,完整内容请查看原文。
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.sh
The setup script will:
- Find and rename the Google OAuth JSON to
secrets/client_secret.json - Install 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 --reauth
Note: 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.
安装
This server does not publish a one-line install command.
Open the repository installation guide 新手?先看 mcpskill.org 教程 →配置
{
"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"
}
}
}
}