
appsyogi-com/adsense-mcp-server
Developer toolsЭта страница переведена автоматически. Технические детали смотрите в оригинале. Открыть оригинал
A CLI-installable MCP (Model Context Protocol) server that enables Claude, Cursor, and other AI assistants to interact with your Google AdSense account.
Обзор
Google AdSense MCP Server — Connect Google AdSense to Claude, Cursor, and other MCP clients. - 📊 — Quick overview of today, yesterday, last 7 days, and monthly earnings - 📈 — Generate reports with dimensions (date, site, country, ad unit) and metrics - 🔄 — Compare performance between time periods - 🌐 — Check approval status for all your sites - ⚠️ — Monitor account health and catch violations early - 💰 — View payment history and pending earnings - 📦 — List ad units and get embed codes - 📤 — Export reports for further analysis - 💾 — SQLite cache for faster repeated queries - 🔐 — OAuth tokens stored in OS keychain, read-only scope You need to create your own OAuth credentials in Google Cloud Console: 1. Go to Google Cloud Console 2. Create a new project or select an existing one 3. Enable the : - Go to "APIs & Services" → "Library" - Search for "AdSense Management API" - Click "Enable" 4.
README
Показан фрагмент оригинального README. Открыть оригинал.
AdSense-MCP-Server
Google AdSense MCP Server — Connect Google AdSense to Claude, Cursor, and other MCP clients.
Features
- 📊 Earnings Summary — Quick overview of today, yesterday, last 7 days, and monthly earnings
- 📈 Detailed Reports — Generate reports with dimensions (date, site, country, ad unit) and metrics
- 🔄 Period Comparison — Compare performance between time periods
- 🌐 Site Status — Check approval status for all your sites
- ⚠️ Alerts & Policy Issues — Monitor account health and catch violations early
- 💰 Payment History — View payment history and pending earnings
- 📦 Ad Units — List ad units and get embed codes
- 📤 CSV Export — Export reports for further analysis
- 💾 Caching — SQLite cache for faster repeated queries
- 🔐 Secure — OAuth tokens stored in OS keychain, read-only scope
Quick Start
# Install globally
npm install -g @appsyogi/adsense-mcp-server
# Set up OAuth credentials
adsense-mcp init
# Verify setup
adsense-mcp doctor
# Start the server (for MCP clients)
adsense-mcp run
Prerequisites
1. Create Google Cloud OAuth Credentials
You need to create your own OAuth credentials in Google Cloud Console:
- Go to Google Cloud Console
- Create a new project or select an existing one
- Enable the AdSense Management API:
- Go to “APIs & Services” → “Library”
- Search for “AdSense Management API”
- Click “Enable”
- Create OAuth credentials:
- Go to “APIs & Services” → “Credentials”
- Click “Create Credentials” → “OAuth client ID”
- Choose “Desktop application”
- Name it (e.g., “AdSense-MCP”)
- Click “Create”
- Copy the Client ID and Client Secret
- Add test users (required while app is in testing mode):
- Go to “APIs & Services” → “OAuth consent screen”
- Scroll to “Test users” section
- Click “Add users”
- Add the Google account email(s) you’ll use to authenticate
- Click “Save”
Note: While your app’s publishing status is “Testing”, only test users can authenticate. You can add up to 100 test users.
2. Configure AdSense-MCP
Run the init command and enter your credentials:
adsense-mcp init
This will:
- Prompt for your Client ID and Client Secret
- Open a browser for Google authentication
- Store your refresh token securely in the OS keychain
Installation
Установка
npx @appsyogi/adsense-mcp-server runКонфигурация
{
"mcpServers": {
"adsense": {
"command": "npx",
"args": ["@appsyogi/adsense-mcp-server", "run"]
}
}
}