Skip to content
plugmcp
DirectorySkillsCategoriesBlog
EN/中文
Sign inSign up
Home/Servers/Google AdSense

Google AdSense

I
by io.github.SirMacke

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

Power your agent

Add this server

The publisher's own command. Not a PlugMCP endpoint.

Local command
npx -y @sirmacke/[email protected]
Credentials from the publisher
  • ADSENSE_ACCESS_TOKEN — Optional short-lived OAuth access token.
  • ADSENSE_CLIENT_ID — OAuth desktop client ID. Required when not using an access token.
  • ADSENSE_CLIENT_SECRET — OAuth desktop client secret. Required when not using an access token.
  • ADSENSE_REFRESH_TOKEN — OAuth refresh token. Required when not using an access token.
  • ADSENSE_ACCOUNT — Optional AdSense account resource name. The first accessible account is used when omitted.
Provider
Claude Code
ADSENSE_ACCESS_TOKEN=<secret> ADSENSE_CLIENT_ID=<value> ADSENSE_CLIENT_SECRET=<secret> ADSENSE_REFRESH_TOKEN=<secret> ADSENSE_ACCOUNT=<value> claude mcp add io.github.sirmacke-adsense-mcp -- npx -y @sirmacke/[email protected]

Run in a terminal.

Claude Desktop
{
  "mcpServers": {
    "io.github.sirmacke-adsense-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@sirmacke/[email protected]"
      ],
      "env": {
        "ADSENSE_ACCESS_TOKEN": "<secret>",
        "ADSENSE_CLIENT_ID": "<value>",
        "ADSENSE_CLIENT_SECRET": "<secret>",
        "ADSENSE_REFRESH_TOKEN": "<secret>",
        "ADSENSE_ACCOUNT": "<value>"
      }
    }
  }
}

claude_desktop_config.json

Step-by-step: add this in Claude

Remote URL or a command on your machine? How the two installs differ

Run on PlugMCP

Host a copy with our keys and logs.

A new server you create. It is not this listing's official endpoint. Use the publisher install when you want their URL and their credentials.

Launch

Related MCP

View more
  • Firecrawl🔥 Official Firecrawl MCP Server - Adds powerful web scraping and search to Cursor, Claude and any other LLM clients.
  • N
    NotionToken-auth Notion MCP: pages, databases, blocks, comments, files. Runs headless in CI and agents.
  • Context7Context7 Platform -- Up-to-date code documentation for LLMs and AI code editors

Related skills

View all
  • reaReverse engineer anything with agents, from app behavior down to native binaries.
  • rea-changelog-updatePrepare or rewrite REA release changelogs and GitHub release notes from pinned Git history, with verified contributor thanks and Release Please synchronization.
  • rea-tool-designDesign or change REA investigation tools, CLI/MCP contracts, provider capabilities, and Evidence semantics.

Questions

How do I install Google AdSense?
Copy the stdio config for Cursor, Claude Desktop, Claude Code, or VS Code on this page. It uses the publisher's install, not a PlugMCP proxy.
Does Google AdSense need an API key?
The publisher lists these environment variables: ADSENSE_ACCESS_TOKEN, ADSENSE_CLIENT_ID, ADSENSE_CLIENT_SECRET, ADSENSE_REFRESH_TOKEN, ADSENSE_ACCOUNT.
What transport does Google AdSense use?
Google AdSense runs locally over stdio.
When was Google AdSense last checked?
Last checked 2026-10-21. Read AdSense Management API v2 accounts, inventory, payments, policy, and reports through MCP.

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

AdSense MCP

An MCP server providing read-only access to the AdSense Management API v2: accounts, payments, alerts, policy issues, sites, inventory, ad code, and saved or ad-hoc reports.

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 ADSENSE_ACCESS_TOKEN, or all three of ADSENSE_CLIENT_ID, ADSENSE_CLIENT_SECRET, and ADSENSE_REFRESH_TOKEN.

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 ADSENSE_ACCESS_TOKEN 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 ADSENSE_CLIENT_ID, ADSENSE_CLIENT_SECRET, and ADSENSE_REFRESH_TOKEN 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

Accounts and account status

  • adsense_list_accounts
  • adsense_get_account
  • adsense_list_child_accounts
  • adsense_list_payments
  • adsense_list_alerts
  • adsense_get_ad_blocking_recovery_tag
  • adsense_list_policy_issues
  • adsense_get_policy_issue
  • adsense_list_sites
  • adsense_get_site

Inventory

  • adsense_list_ad_clients
  • adsense_get_ad_client
  • adsense_get_ad_client_ad_code
  • adsense_list_ad_units
  • adsense_get_ad_unit
  • adsense_get_ad_unit_ad_code
  • adsense_list_linked_custom_channels
  • adsense_list_url_channels
  • adsense_get_url_channel
  • adsense_list_custom_channels
  • adsense_get_custom_channel
  • adsense_list_linked_ad_units

Reports

  • adsense_list_saved_reports
  • adsense_get_saved_report
  • adsense_generate_saved_report
  • adsense_generate_report

Account-level tools discover the configured or first accessible account when account is omitted. Paginated list tools accept pageSize and pageToken; pass a returned nextPageToken to continue. Resource-specific tools accept the canonical names returned by their corresponding list tools.

adsense_list_payments returns paid and unpaid earnings, including the formatted amount and, for paid earnings, the credited date. The AdSense API does not expose bank or payment-method details.

Example report request: metrics: ["ESTIMATED_EARNINGS", "PAGE_VIEWS", "CLICKS"], dimensions: ["DATE", "COUNTRY_NAME"], dateRange: "LAST_7_DAYS", orderBy: ["-ESTIMATED_EARNINGS"].

The server returns structured JSON. The API's duplicate CSV report methods are intentionally omitted because agents can transform the structured response when CSV is needed.

Verify

npm test
npm run build

Live verification also requires the OAuth values above and an AdSense account. Every exposed endpoint accepts the 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.

  1. Update the version consistently in package.json, package-lock.json, server.json (including its npm package entry), mcpb/manifest.json, and the MCP server version in src/index.ts.
  2. Run npm test and npm pack --dry-run to verify the build and published package contents.
  3. Commit and push the release to GitHub.
  4. Publish the public scoped package with npm publish --access public.
  5. Authenticate when necessary with mcp-publisher login github, then run mcp-publisher publish to publish the matching server.json version.

Publish npm before the MCP Registry because registry validation requires the referenced public package version to exist. Published versions are immutable, so corrections require a new version.

License

MIT

How do I install Google AdSense?
Copy the stdio config for Cursor, Claude Desktop, Claude Code, or VS Code on this page. It uses the publisher's install, not a PlugMCP proxy.
Does Google AdSense need an API key?
The publisher lists these environment variables: ADSENSE_ACCESS_TOKEN, ADSENSE_CLIENT_ID, ADSENSE_CLIENT_SECRET, ADSENSE_REFRESH_TOKEN, ADSENSE_ACCOUNT.
What transport does Google AdSense use?
Google AdSense runs locally over stdio.
When was Google AdSense last checked?
Last checked 2026-10-21. Read AdSense Management API v2 accounts, inventory, payments, policy, and reports through MCP.

No tool list yet. Remote servers get one after the first health check.

plugmcp

Plug any tool into any agent. MCP servers for people who do not write servers. Gateway for volume, n8n for apps.

  • github.com/TODO
  • x.com/TODO
  • linkedin.com/company/TODO

PlugMCP, 2026

Product
  • Browse
  • Install
  • Host your own
  • Pricing
  • Voice mode
  • Browser
Directory
  • All MCP servers
  • MCP Apps
  • Tools
  • Agent skills
  • Categories
  • New
  • Voice
  • Submit a server
Developers
  • Docs
  • Blog
  • Club
  • Work with us
  • What is MCP
  • What is WebMCP
  • Status
Company
  • About
  • Contact
  • Terms
  • Privacy
  • DPA