AdMob MCP Server

AdMob MCP Server

Connects Claude to the Google AdMob API to provide a conversational interface for managing and analyzing ad revenue data. It enables users to generate custom network reports, track performance trends, and diagnose revenue fluctuations using natural language.

Category
访问服务器

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.

Prerequisites

  • Node.js 18+
  • A Google Cloud project with the AdMob API enabled
  • OAuth 2.0 credentials (Desktop app type) downloaded from the Google API Console

Setup

1. Get Google OAuth credentials

  1. Go to the Google API Console
  2. Create or select a project
  3. Enable the AdMob API in the API Library
  4. Go to Credentials > Create Credentials > OAuth client ID
  5. Select Desktop app, name it, and click Create
  6. Click Download JSON to download the client secret file
  7. 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

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/index.js"],
      "env": {
        "ADMOB_CREDENTIALS_PATH": "/absolute/path/to/admob-mcp/secrets/client_secret.json"
      }
    }
  }
}

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_accounts List your AdMob publisher accounts
get_account Get details for a specific account
list_ad_units List ad units with pagination
list_apps List apps with pagination
generate_network_report Generate a custom network report with full control over dimensions, metrics, filters, and sorting
generate_mediation_report Generate a custom mediation report with full control over dimensions, metrics, filters, and sorting

Reporting tools

Tool Prompt example
revenue_trend "Show my revenue trend for the last 30 days"
ad_unit_performance "Which ad units are underperforming?"
country_breakdown "Break down my earnings by country"
format_comparison "Compare performance across ad formats"
platform_comparison "How is iOS vs Android performing?"
fill_rate_analysis "What's my fill rate and where am I losing money?"
mediation_ad_source_performance "Which mediation ad sources perform best?"
wow_revenue "Show week-over-week revenue changes"
top_apps "Which apps are my top earners?"
ecpm_trend "Show my eCPM trends by ad unit over time"

Revenue optimization tools

Tool Prompt example
revenue_drop_diagnosis "My revenue dropped this week, what happened?"
serving_restriction_impact "How much revenue am I losing to privacy restrictions?"
app_version_impact "Did my latest app update affect ad revenue?"
sdk_version_check "Are users on old SDK versions seeing lower eCPM?"
month_over_month "How is this month comparing to last month?"
high_impression_low_ctr "Which ad placements should I optimize?"
os_version_performance "Are certain OS versions hurting my ad revenue?"
mediation_group_analysis "Which mediation groups need optimization?"
country_ecpm_opportunity "Where can I improve eCPM by country?"
format_by_country "Which ad formats work best in which countries?"

Project structure

admob-mcp/
├── src/
│   ├── index.ts          # MCP server and tool definitions
│   ├── auth.ts           # OAuth 2.0 flow with local redirect server
│   ├── admob-client.ts   # AdMob REST API client
│   └── helpers.ts        # Date utilities, report parsing, table formatting
├── secrets/              # Git-ignored; holds credentials and tokens
├── setup.sh              # One-command setup script
├── package.json
└── tsconfig.json

Development

npm run build     # Compile TypeScript
npm run start     # Run the server directly (stdio)

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选