Skip to content
MCP server

AdSense

Read-only MCP server that pulls Google AdSense earnings reports into AI clients

AdSense is an open-source MCP server for analytics and data. It is available on CLI and Self-hosted.

Pricing
Open source
Platforms
CLI, Self-hosted
Version
0.1.0
Listing updated

Similar MCP servers

About AdSense

Connects an AI assistant to a Google AdSense account so it can query earnings, page views, clicks and RPM broken down by site, page, ad unit, country, platform and more. Reports can be built from ready-made presets or specified in full, and results come back as markdown tables or CSV files.

The server is written in Go on the official MCP Go SDK and wraps the AdSense Management API v2. Sign-in happens once through a browser OAuth consent flow, and the token is stored locally. It requests only the read-only AdSense scope, so it cannot change anything in the account. Beyond reports, it lists sites, ad units, payments, alerts, policy issues and ad code.

It suits publishers and ad operations people who want to ask plain-language questions about revenue, compare periods, or get a full performance sweep without opening the AdSense dashboard. Setup requires a Google Cloud OAuth client and the mcp-homielab binary.

Tools this server provides (22)

Taken from the project documentation; the running server may differ.

From the tool list in its README, going by the names, 15 of 22 tools read data; 7 names don't say.

From the server's own tool labels and tool names; not verified by us.

adsense_list_accountsName suggests: reads
Lists accessible AdSense accounts.
adsense_get_accountName suggests: reads
Returns account details such as name, time zone and premium status.
adsense_preset_report
Runs one or many ready-made reports in a single call.
adsense_generate_report
Generates a custom report with markdown table and totals.
adsense_generate_report_csv
Generates a raw CSV report of up to 1,000,000 rows.
adsense_period_comparison
Compares a report across the current and preceding windows.
adsense_list_sitesName suggests: reads
Lists registered sites with review state and auto-ads.
adsense_list_ad_unitsName suggests: reads
Lists ad units of the content ad client.
adsense_list_saved_reportsName suggests: reads
Lists reports saved in the AdSense UI.
adsense_generate_saved_report
Runs a saved report with an optional date range and CSV output.
adsense_list_paymentsName suggests: reads
Lists payment records.
adsense_list_alertsName suggests: reads
Lists active policy and payment alerts.
adsense_list_policy_issuesName suggests: reads
Lists policy violations per site.
adsense_list_channelsName suggests: reads
Lists custom and URL channels.
adsense_get_ad_codeName suggests: reads
Returns the HTML ad code for an ad unit or account-wide.
adsense_get_ad_blocking_recovery_tagName suggests: reads
Returns the ad-blocking recovery tag script.
adsense_list_child_accountsName suggests: reads
Lists sub-accounts.
adsense_list_ad_clientsName suggests: reads
Lists ad clients.
adsense_list_channel_linksName suggests: reads
Lists ad unit and custom channel memberships.
adsense_login
Starts the OAuth consent flow in the browser.
adsense_login_statusName suggests: reads
Reports the state of the login flow and token.
adsense_logout
Deletes the stored token.

What it does

Ready-made report presets
Run many breakdowns such as sites, pages, countries and daily totals in a single call.
Custom report builder
Choose any dimensions, metrics, filters and sort order for a date range.
Period-over-period comparison
Shows per-key changes against the preceding window of equal length, sorted by impact.
CSV export to file
Writes large exports of up to a million rows straight to disk with a short preview.
Alerts and policy checks
Lists active payment and policy alerts and violations per site.
Read-only access
Requests only the read-only AdSense scope, so the account cannot be modified.

Good for

  • Get a monthly breakdown of earnings by site, page and country
  • Find which ad unit or site lost the most earnings week over week
  • Export daily earnings data to CSV for spreadsheet analysis
  • Check account alerts and policy issues before a payment cycle
  • Generate a written performance review with recommended actions

Pricing

Open source

AdSense FAQ

Can it change settings or ad units in my AdSense account?

No. It requests only the read-only scope and does not include methods that create or modify ad units or channels.

How do I authorize the server?

Create a Google Cloud OAuth desktop client, enable the AdSense Management API, then run the login command or the adsense_login tool and approve in the browser.

What happens if a report combination is rejected by the API?

That preset is reported inline with the error and the other presets in the same call still run.

How are rate limits and failures handled?

Requests time out after 90 seconds and are retried up to three times with backoff on rate limits, server errors and network problems, but not on client errors.

Is AdSense free?

Yes. AdSense is open source, so you can use and self-host it for free.

What are the best alternatives to AdSense?

The closest alternatives to AdSense are AdMob, Admob MCP Server, Google AdSense, Google Analytics 4 MCP and Google Ads + Meta Ads + SEO/GEO MCP.

Where this comes from

  • Description: written from the project's README and its MCP Registry entry.

How AIPoweredBot checks servers