MCP.Market

Google AdSense MCP server

by SirMacke·io.github.SirMacke/adsense-mcp·v0.2.0

Read AdSense Management API v2 accounts, inventory, payments, policy, and reports through MCP.

B78/100grade B
What users say
No reviews yet
Be the first
Safety scan
B78/100

full report

Adoption
New

0 stars75 downloads/wk

Reviews

Write one

Nobody has reviewed Google AdSense yet.

If you have run it, two minutes of your experience saves the next person an afternoon.

Google AdSense tools (26)

write = sends, deletes, buys or posts

Read from the package source without running it. The installed server may list more.

  • adsense_generate_report

    Extract any ad-hoc AdSense report. Supply API v2 dimensions, metrics, filters, dates, sorting, and other report parameters. Account is discovered automatically when omitted.

  • adsense_generate_saved_report

    Generate a saved AdSense report as structured JSON.

  • adsense_get_account

    Get one AdSense account by resource name, e.g. accounts/pub-123.

  • adsense_get_ad_blocking_recovery_tag

    Get the ad-blocking recovery tag for an AdSense account.

  • adsense_get_ad_client

    Get one AdSense ad client by resource name.

  • adsense_get_ad_client_ad_code

    Get the ad code for an AdSense ad client.

  • adsense_get_ad_unit

    Get one AdSense ad unit by resource name.

  • adsense_get_ad_unit_ad_code

    Get the ad code for an AdSense ad unit.

  • adsense_get_custom_channel

    Get one AdSense custom channel by resource name.

  • adsense_get_policy_issue

    Get one AdSense policy issue by resource name.

  • adsense_get_saved_report

    Get one saved AdSense report's metadata by resource name.

  • adsense_get_site

    Get one AdSense site by resource name.

  • adsense_get_url_channel

    Get one AdSense URL channel by resource name.

  • adsense_list_accounts

    List AdSense accounts available to the authenticated user.

  • adsense_list_ad_clients

    List ad clients in an AdSense account.

  • adsense_list_ad_units

    List ad units under an AdSense ad client.

  • adsense_list_alerts

    List account alerts, including their severity, type, and localized message.

  • adsense_list_child_accounts

    List accounts directly managed by an AdSense account.

  • adsense_list_custom_channels

    List custom channels under an AdSense ad client.

  • adsense_list_linked_ad_units

    List ad units linked to an AdSense custom channel.

  • adsense_list_linked_custom_channels

    List custom channels linked to an AdSense ad unit.

  • adsense_list_payments

    List paid and unpaid earnings for an AdSense account. Account is discovered automatically when omitted.

  • adsense_list_policy_issues

    List policy issues involving an AdSense account and its AFP child accounts.

  • adsense_list_saved_reports

    List reports saved in an AdSense account.

  • adsense_list_sites

    List sites in an AdSense account, including readiness and Auto Ads state.

  • adsense_list_url_channels

    List active URL channels under an AdSense ad client.

Public scan report

scanner v0.1.10 · 2026-10-29 · same rubric, same numbers if you re-run it

no findings
  • Code scan3 source files scanned25/25
  • –Live reliabilityno gateway calls yet and no remote to proben/a
  • –Tool poisoningtools not inspected (local package is not executed); not countedn/a
  • Auth qualitystatic API keys via environment variables6/15
  • Maintenancelast push 37 days ago12/15
  • Maintainer identityregistry namespace matches repository owner; GitHub account older than a year8/10
Overall 78/100. Components that don't apply are left out of the denominator. Any critical finding is an F.RubricAppeal a findingJSON

How Google AdSense compares

Against every graded MCP server, from our own scans and uptime checks. Updated after each scan run.

Safety score
78/100
higher than 57% of 48,243 servers
Tools
26
the typical server has 7
Tools that change things
0%
typical: 0%. Fewer write tools means less an agent can break
Downloads a week
75
more than 55% of 12,306 servers with a package

What its tools let an agent do: 26 read

Release history: 2 versions in the registry since 2026-08-31, latest 2026-09-22, typically one every 22 days.

Install Google AdSense in Claude Code, Cursor or VS Code

Runs npx -y @sirmacke/adsense-mcp on your machine. Read the scan report first; the gateway never runs local packages.

claude mcp add adsense-mcp -- npx -y @sirmacke/adsense-mcp
Add to Cursor

What the publisher says

From the Google AdSense repository's README, as published. We do not edit it. Read it on GitHub

AdSense MCP

An MCP server that extracts ad-hoc data from the AdSense Management API v2. It exposes an unrestricted report interface: any supported AdSense dimensions, metrics, filters, time period, sort order, timezone, language, currency, and limit can be passed through to accounts.reports.generate.

The server uses the read-only https://www.googleapis.com/auth/adsense.readonly OAuth scope. It does not write to an AdSense account.

Install

Once published, run it from an MCP client with npx -y @sirmacke/adsense-mcp. Configure either ADSENSEACCESSTOKEN, or all three of ADSENSECLIENTID, ADSENSECLIENTSECRET, and ADSENSEREFRESHTOKEN.

Security

OAuth access tokens, refresh tokens, and client secrets are credentials. Keep them out of this repository, issue trackers, shell history, and MCP configuration that is shared with others. If one is exposed, revoke it in Google Cloud immediately; see SECURITY.md.

Setup

  1. In Google Cloud, enable AdSense Management API and create an OAuth Desktop client.
  2. Obtain a refresh token granted the https://www.googleapis.com/auth/adsense.readonly scope. Keep it secret.
  3. Copy .env.example to your secure environment configuration and populate either ADSENSEACCESSTOKEN or the OAuth client ID, secret, and refresh token.
  4. Install and build:
npm install
npm run build

One-time OAuth authorization (without gcloud)

Download the OAuth Desktop client JSON from Google Cloud, then run:

$env:ADSENSE_OAUTH_CLIENT_FILE = "C:\secure\adsense-client.json"
$env:ADSENSE_TOKEN_FILE = "C:\secure\adsense-oauth.json"
npm run authorize

The command opens the Google consent screen on a localhost callback and saves the client ID, client secret, and refresh token only in the private token file. Copy those values to the ADSENSECLIENTID, ADSENSECLIENTSECRET, and ADSENSEREFRESHTOKEN fields of the MCP configuration. Do not leave an External consent screen in Testing: its refresh tokens expire after seven days.

Claude Desktop

Current Claude Desktop builds use extensions. Run npm run package, then install build/adsense-mcp.mcpb from Settings → Extensions → Advanced settings → Install extension. It securely prompts for the OAuth values. On installations that support classic configuration, add this instead:

{
  "mcpServers": {
    "adsense": {
      "command": "node",
      "args": ["/absolute/path/to/adsense-mcp/dist/index.js"],
      "env": {
        "ADSENSE_CLIENT_ID": "...",
        "ADSENSE_CLIENT_SECRET": "...",
        "ADSENSE_REFRESH_TOKEN": "..."
      }
    }
  }
}

Codex

Add the equivalent server definition to your Codex MCP configuration, using the same command, arguments, and environment variables. The server uses the standard MCP stdio transport and works in both clients.

Tools

  • adsenselistaccounts
  • adsensegetaccount
  • adsensegeneratereport

Example report request: metrics: ["ESTIMATEDEARNINGS", "PAGEVIEWS", "CLICKS"], dimensions: ["DATE", "COUNTRYNAME"], dateRange: "LAST7DAYS", orderBy: ["-ESTIMATEDEARNINGS"].

Verify

npm test
npm run build

Live verification also requires the OAuth values above and an AdSense account. The API’s report endpoint is GET /v2/{account}/reports:generate; it requires the AdSense or AdSense read-only OAuth scope.

Releasing

Releases are published to both npm and the official MCP Registry. The registry stores discovery metadata from server.json; the installable server itself is distributed through npm.

Shortened. The full README is on GitHub.

Nothing above is checked by us. What we check is on the safety report.

Google AdSense: common questions

Is Google AdSense MCP server safe?
Mostly: it is graded B (78/100). Read the Google AdSense safety report
How do I install Google AdSense?
It runs on your machine. Copy the Claude Code, Cursor, VS Code or Claude Desktop config from the install section.
Does Google AdSense need an API key?
Yes. The registry entry asks for ADSENSE_ACCESS_TOKEN, ADSENSE_CLIENT_SECRET, ADSENSE_REFRESH_TOKEN.
Is Google AdSense maintained?
The last commit was 44 days ago (2026-09-22). The latest release is v0.2.0.
How does Google AdSense compare with other MCP servers?
safety score 78/100 (higher than 57% of 48,243 servers); tools 26 (the typical server has 7); tools that change things 0% (typical: 0%. Fewer write tools means less an agent can break). Full comparison.