adsense-mcp
Provides tools for managing Google AdSense accounts, including creating and managing ad units, generating ad code for various frameworks, querying earnings reports, checking policy alerts, managing payments, and automating ads.txt verification.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@adsense-mcpCreate a display ad unit called 'Homepage Banner'"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
adsense-mcp
MCP (Model Context Protocol) server for Google AdSense management. Create ad units, generate framework-specific ad code, manage earnings reports, and automate ads.txt — all from your AI assistant.
Built for solo developers who build websites with AI agents and want to monetize them without leaving the terminal.
Features
Ad Unit CRUD — Create and manage ad units via AdSense Management API v2
Ad Code Retrieval — Get ready-to-paste HTML/JS embed code for any ad unit
Framework Snippets — Generate ad integration code for React, Next.js, Vue, Nuxt, Astro, Svelte
ads.txt Automation — Generate and remotely verify ads.txt for your domains
Earnings Reports — Query revenue, page views, clicks with flexible date ranges and dimensions
Alerts & Payments — Monitor policy issues and payment history
Auto-detection — Automatically resolves your account and ad client, so most parameters are optional
Lightweight — Uses direct REST calls instead of the heavy
googleapispackage
Related MCP server: flour-ads
Prerequisites
Active Google AdSense account (already approved)
Node.js 18+
Google Cloud OAuth credentials (see Setup below)
Setup
1. Create Google Cloud OAuth Credentials
Go to Google Cloud Console
Create a new project (or select an existing one)
Enable the AdSense Management API:
Navigate 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 app as the application type
Download the JSON file
Configure the OAuth consent screen:
Go to APIs & Services > OAuth consent screen
Keep the publishing status as Testing
Add your Google account as a Test user
Note: While in "Testing" mode, only test users you add can authenticate. This is fine for personal use — no Google review required.
2. Install
npm install -g adsense-mcp3. Authenticate
adsense-mcp auth /path/to/downloaded-credentials.jsonThis will:
Save your OAuth credentials to
~/.adsense-mcp/credentials.jsonOpen your browser for Google OAuth consent
Save access/refresh tokens to
~/.adsense-mcp/tokens.json
You only need to do this once. Tokens auto-refresh on subsequent use.
4. Configure Your AI Tool
Claude Code
Add to your project's .mcp.json:
{
"mcpServers": {
"adsense": {
"command": "npx",
"args": ["-y", "adsense-mcp"]
}
}
}Or add globally in ~/.claude/settings.json:
{
"mcpServers": {
"adsense": {
"command": "npx",
"args": ["-y", "adsense-mcp"]
}
}
}Cursor
Add to .cursor/mcp.json in your project root:
{
"mcpServers": {
"adsense": {
"command": "npx",
"args": ["-y", "adsense-mcp"]
}
}
}Windsurf
Add to ~/.codeium/windsurf/mcp_config.json:
{
"mcpServers": {
"adsense": {
"command": "npx",
"args": ["-y", "adsense-mcp"]
}
}
}Tools Reference
Account & Configuration
list_accounts
List all AdSense accounts linked to your Google account.
Parameters: (none)Example prompt: "Show me my AdSense accounts"
list_ad_clients
List ad clients (publisher IDs like ca-pub-XXXX) for an account.
Parameters:
account (optional) Account name. Auto-detected if omitted.Example prompt: "What's my AdSense publisher ID?"
list_sites
List all sites with their approval status and auto-ads setting.
Parameters:
account (optional) Account name. Auto-detected if omitted.Example prompt: "Which sites are approved in my AdSense?"
Ad Unit Management
create_ad_unit
Create a new ad unit. Returns the unit name, slot ID, and state.
Parameters:
displayName (required) Human-readable name (e.g., "Homepage Banner")
type (optional) DISPLAY | IN_FEED | IN_ARTICLE | MATCHED_CONTENT (default: DISPLAY)
adClient (optional) Ad client name. Auto-detected if omitted.Example prompt: "Create a display ad unit called 'Sidebar Ad' for my blog"
list_ad_units
List all ad units with their name, display name, state, type, and size.
Parameters:
adClient (optional) Ad client name. Auto-detected if omitted.Example prompt: "List all my ad units"
get_ad_code
Get the raw HTML/JS ad code for a specific ad unit, as provided by Google.
Parameters:
adUnit (required) Full ad unit name (e.g., accounts/pub-XXX/adclients/ca-pub-XXX/adunits/123)Example prompt: "Get the embed code for my sidebar ad unit"
get_ad_snippet
Generate framework-specific ad component code, ready to drop into your project.
Parameters:
framework (required) html | react | nextjs | vue | nuxt | astro | svelte
publisherId (required) Publisher ID (e.g., ca-pub-1234567890123456)
slotId (required) Ad unit slot ID (e.g., 1234567890)
style (optional) responsive | in-article | in-feed | fixed (default: responsive)
width (optional) Width in px (only for "fixed" style)
height (optional) Height in px (only for "fixed" style)Example prompt: "Generate a Next.js component for my ad unit slot 9876543210"
Supported frameworks and what gets generated:
Framework | Output |
| Standard |
|
|
| Layout with |
| SFC with |
|
|
|
|
| Component with |
ads.txt
generate_ads_txt
Generate the correct ads.txt content for your AdSense account.
Parameters:
account (optional) Account name. Auto-detected if omitted.Example prompt: "Generate ads.txt for my site"
Returns the entry line and instructions for where to place the file in various project types.
verify_ads_txt
Fetch a domain's /ads.txt and check if it contains your publisher entry.
Parameters:
domain (required) Domain to check (e.g., example.com)
account (optional) Account name. Auto-detected if omitted.Example prompt: "Check if ads.txt is set up correctly on myblog.com"
Analytics
generate_report
Generate an earnings report with customizable date range, metrics, and dimensions.
Parameters:
dateRange (optional) TODAY | YESTERDAY | LAST_7_DAYS | LAST_30_DAYS |
MONTH_TO_DATE | YEAR_TO_DATE | LAST_3_MONTHS | LAST_12_MONTHS
(default: LAST_7_DAYS)
metrics (optional) Array of metrics (default: [ESTIMATED_EARNINGS, PAGE_VIEWS, CLICKS, PAGE_VIEWS_CTR])
dimensions (optional) Array of dimensions (default: [DATE])
account (optional) Account name. Auto-detected if omitted.Available metrics: ESTIMATED_EARNINGS, PAGE_VIEWS, IMPRESSIONS, CLICKS, PAGE_VIEWS_CTR, COST_PER_CLICK, PAGE_VIEWS_RPM, AD_REQUESTS, AD_REQUESTS_CTR
Available dimensions: DATE, WEEK, MONTH, SITE_DOMAIN, AD_UNIT_NAME, COUNTRY_NAME, PLATFORM_TYPE
Example prompt: "Show my earnings for the last 30 days broken down by site"
list_alerts
List policy alerts and issues that need attention.
Parameters:
account (optional) Account name. Auto-detected if omitted.Example prompt: "Are there any AdSense policy issues I should know about?"
list_payments
List payment history.
Parameters:
account (optional) Account name. Auto-detected if omitted.Example prompt: "Show my AdSense payment history"
Usage Examples
Full workflow: Add ads to a new Next.js site
You: "I just deployed myblog.com with Next.js. Set up AdSense ads for it."
AI: 1. Calls list_accounts → gets your account
2. Calls list_sites → confirms myblog.com is approved
3. Calls create_ad_unit → creates "myblog-header" (DISPLAY)
4. Calls create_ad_unit → creates "myblog-article" (IN_ARTICLE)
5. Calls get_ad_snippet (nextjs) → generates Next.js components
6. Calls generate_ads_txt → generates ads.txt content
7. Inserts ad components into your layout and article pages
8. Creates public/ads.txt
9. Calls verify_ads_txt → confirms setup after deployQuick report
You: "How are my ads performing this month?"
AI: Calls generate_report with dateRange=MONTH_TO_DATE,
dimensions=[DATE, SITE_DOMAIN]
→ Shows earnings trend by siteAd placement for existing units
You: "Add my existing ad units to this Astro blog"
AI: 1. Calls list_ad_units → gets your units and slot IDs
2. Calls get_ad_snippet (astro) for each unit
3. Inserts components into your Astro layoutsTroubleshooting
"Not authenticated" error
Re-run the auth flow:
adsense-mcp authIf tokens exist but are invalid, delete them and re-authenticate:
rm ~/.adsense-mcp/tokens.json
adsense-mcp auth"AdSense Management API has not been used" error
Enable the API in Google Cloud Console:
Go to APIs & Services > Library
Search "AdSense Management API"
Click Enable
"Access Not Configured" or 403 errors
Make sure:
Your Google account is added as a test user in the OAuth consent screen
The AdSense Management API is enabled in your GCP project
Your AdSense account is active and approved
Token refresh failures
Delete the saved tokens and re-authenticate:
rm ~/.adsense-mcp/tokens.json
adsense-mcp authSecurity
OAuth tokens are stored in
~/.adsense-mcp/tokens.json(file permission: user-only recommended)Credentials are stored in
~/.adsense-mcp/credentials.jsonThe server uses
https://www.googleapis.com/auth/adsensescope (full read/write)No data is sent to any third party — all API calls go directly to Google
Auth callback runs on
127.0.0.1with a randomly assigned port
To restrict to read-only access, modify the SCOPES array in src/auth.ts to:
const SCOPES = ['https://www.googleapis.com/auth/adsense.readonly'];License
MIT
Available Tools
12 toolscreate_ad_unitA
Create a new ad unit. Returns the created unit with its name and slot ID.
| Name | Required | Description | Default |
|---|---|---|---|
| type | No | Ad format type | DISPLAY |
| adClient | No | Ad client name. Auto-detected if omitted. | |
| displayName | Yes | Display name for the new ad unit (e.g., "Homepage Banner") |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden of behavioral disclosure. It does disclose that the tool creates a new ad unit and that the response includes the unit's name and slot ID. However, it does not mention key behavioral details such as adClient auto-detection, uniqueness constraints, or failure behavior when the ad client is invalid. Some useful context is given, but it is not comprehensive.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is two concise sentences. The action verb and object are front-loaded in the first sentence, and the return value follows in the second. There is no wasted text or redundant restating of the tool name.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the relatively simple 3-parameter schema with full coverage and no output schema, the description is mostly complete: it states what is created and what is returned. It could additionally mention that adClient is optional and auto-detected, but that is already captured in the schema. For a straightforward create operation, this level of detail plus the schema is sufficient.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the schema already documents all three parameters: type, adClient, and displayName. The description adds no additional per-parameter meaning, only mentioning the return value. Baseline 3 applies because the schema does the heavy lifting and the description does not materially enrich parameter understanding.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states a specific verb and resource: 'Create a new ad unit.' It also clarifies the expected return value, distinguishing this creation tool from the sibling list/get/generate tools. The purpose is immediately recognizable and unambiguous.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description gives no explicit guidance on when to use this tool versus alternatives. It does not mention checking existing ad units via list_ad_units, nor any required preconditions or context. The use case is only implied by the 'create' wording, not articulated.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
generate_ads_txtA
Generate ads.txt content for your site. Place this file at your domain root (e.g., example.com/ads.txt).
| Name | Required | Description | Default |
|---|---|---|---|
| account | No | Account name. Auto-detected if omitted. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden. It adds a useful behavioral clue: the tool produces content meant to be placed at the domain root, implying it does not publish the file itself. However, it does not disclose whether any authentication, site verification, or other hidden side effects are involved, so the transparency is adequate but incomplete.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two short, efficient sentences with no redundancy. The core action is front-loaded, and the placement guidance is a necessary practical detail. Every sentence earns its place.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a tool with one optional parameter and no output schema, the description is largely sufficient: it states what is generated and where to put it. The main gap is not connecting to verify_ads_txt as a natural follow-up, and not describing the content format beyond 'ads.txt content', but these are minor for this simple tool.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%: the only parameter, account, is already described as auto-detected if omitted. The description adds nothing beyond the schema, so the baseline of 3 applies.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb and resource: 'Generate ads.txt content for your site.' It is clearly distinct from siblings like verify_ads_txt (verification), generate_report (reporting), and list_* tools (retrieval). The placement hint reinforces the purpose without ambiguity.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description gives some context: it is for generating ads.txt content and tells where to place the file (domain root). However, it does not explicitly state when to choose this over related tools such as verify_ads_txt, nor mention any prerequisites like site ownership or account requirements. Usage is implied rather than explicitly guided.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
generate_reportA
Generate an AdSense earnings report with customizable date range, metrics, and dimensions
| Name | Required | Description | Default |
|---|---|---|---|
| account | No | Account name. Auto-detected if omitted. | |
| metrics | No | Metrics to include (e.g., ESTIMATED_EARNINGS, IMPRESSIONS, CLICKS, PAGE_VIEWS_CTR, COST_PER_CLICK) | |
| dateRange | No | Date range for the report | LAST_7_DAYS |
| dimensions | No | Dimensions to group by (e.g., DATE, SITE_DOMAIN, AD_UNIT_NAME, COUNTRY_NAME) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the operation ('generate') and resource ('AdSense earnings report'), which strongly implies a read-only action, but it does not explicitly disclose side effects, permission requirements, output format, or whether data is live vs cached. This leaves significant room for agent uncertainty.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, efficient sentence with the core action front-loaded. Every phrase earns its place: the resource is named, and the customizable aspects are listed without fluff or repetition.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given no annotations and no output schema, the description provides adequate context for the tool's purpose and parameter capabilities, but it omits information about the output format, return structure, or any limitations. An agent can invoke it with defaults, but may not know what to expect in the response. The parameter schemas fill most gaps, yet the absence of output guidance leaves it a minimum-viable description.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the baseline is 3. The description's mention of 'date range, metrics, and dimensions' merely echoes the schema properties without adding new meaning. It does not clarify enum semantics, units, or how parameters interact beyond what the schema already provides.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses a specific verb ('Generate'), a clear resource ('AdSense earnings report'), and states the customizable dimensions ('date range, metrics, dimensions'). This distinguishes it from sibling tools like generate_ads_txt and the various list_* tools, so an agent can immediately tell what this tool does.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage by identifying the report generation purpose, but it does not explicitly state when to choose this tool over alternatives or list any exclusions. An agent would infer from the word 'report', but there is no direct guidance such as 'use this to aggregate earnings data' or 'for account-level lists, use list_accounts instead.'
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_ad_codeB
Get the HTML/JS ad code snippet for an ad unit, ready to paste into your website
| Name | Required | Description | Default |
|---|---|---|---|
| adUnit | Yes | Full ad unit name (e.g., accounts/pub-XXX/adclients/ca-pub-XXX/adunits/123) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden of behavioral disclosure. It only states that the tool retrieves an HTML/JS snippet, implying a read operation, but does not disclose authentication needs, error conditions, whether the result may be null, or any additional behavioral traits.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single efficient sentence with no filler. The action and object are front-loaded, and every word contributes to understanding the tool's purpose.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a one-parameter tool with full schema coverage, the core purpose is clear. However, with no output schema and no mention of return format or potential failures, plus a likely overlapping sibling tool, the description is minimally viable but leaves some ambiguity for an agent deciding between get_ad_code and get_ad_snippet.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the baseline is 3. The description adds no extra semantic context beyond the schema; it simply repeats the concept of 'ad unit' without providing examples, format, or guidance. The schema already documents the parameter adequately.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states a clear verb ('Get') and resource ('HTML/JS ad code snippet for an ad unit'), making the core purpose unambiguous. It does not differentiate from the similarly named sibling get_ad_snippet, so it misses the full 5.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance is given on when to use this tool versus alternatives, nor any exclusions. The phrase 'ready to paste into your website' implies a use case, but the confusingly similar sibling get_ad_snippet is not mentioned, leaving the agent without clear selection criteria.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_ad_snippetB
Generate framework-specific ad integration code (React, Next.js, Vue, Astro, Svelte, etc.)
| Name | Required | Description | Default |
|---|---|---|---|
| style | No | Ad placement style | responsive |
| width | No | Width in px (only for "fixed" style) | |
| height | No | Height in px (only for "fixed" style) | |
| slotId | Yes | Ad unit slot ID (e.g., 1234567890) | |
| framework | Yes | Target framework | |
| publisherId | Yes | Publisher ID (e.g., ca-pub-1234567890123456) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden of disclosing behavior. It only says code is generated, but does not clarify whether this is a pure, side-effect-free operation, whether it validates ad unit existence, what the output format is, or whether any account changes occur. The absence of such detail for a code-generation tool with no output schema is a significant gap.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The single sentence is efficient, front-loaded with the action and resource, and uses a compact parenthetical to list frameworks. No wasted words or redundancy. It is concise, though it could be slightly expanded to include behavioral or usage context without becoming verbose.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
There is no output schema and no annotations, so the description must provide a complete picture. It covers the core purpose but omits the return format, preconditions (e.g., required ad unit existence), permissions, and how it relates to get_ad_code. For a tool with six parameters and overlapping siblings, this one-line description is under-specified.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the schema already documents all parameters (framework, publisherId, slotId, style, width, height). The description adds no parameter-specific meaning beyond echoing some framework names that are already in the enum. Baseline 3 is appropriate because the schema carries the parameter documentation burden.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses a specific verb ('Generate') with a clear resource ('framework-specific ad integration code') and gives concrete framework examples (React, Next.js, Vue, Astro, Svelte). It signals differentiation from the sibling get_ad_code by focusing on frameworks, but it does not explicitly name the alternative or define the contrast, so it stops short of full sibling differentiation.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The phrase 'framework-specific' and the framework list imply when to use this tool, but no explicit guidance is given about when not to use it or which sibling to prefer. For example, it does not state that get_ad_code should be used for plain HTML or that this tool is for JavaScript frameworks. Usage context is implied, not stated.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list_accountsA
List all AdSense accounts associated with your Google account
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the behavioral burden. It communicates a read-only listing operation scoped to the caller's Google account, but it does not disclose authorization requirements, pagination, or return behavior.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, front-loaded sentence with no redundant wording. Every word contributes to defining the tool's purpose and scope.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a zero-parameter list tool, describing the resource and scope is largely sufficient, and the output is reasonably predictable from the word 'List.' It only lacks explicit usage routing or output format details, which are minor for this simple tool.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The tool has zero parameters, so the input schema already covers everything; there are no parameter semantics for the description to add. The phrase 'all ... associated with your Google account' clarifies the implied result scope.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses a specific action and resource: 'List all AdSense accounts' with a scope qualifier 'associated with your Google account.' This clearly distinguishes it from sibling tools like list_ad_clients and list_ad_units.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description gives no explicit guidance about when to use this tool versus alternatives, and it does not mention any exclusions or prerequisites. Usage is only implied by the resource name.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list_ad_clientsA
List ad clients (publisher IDs) for an account
| Name | Required | Description | Default |
|---|---|---|---|
| account | No | Account name (e.g., accounts/pub-XXX). Auto-detected if omitted. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are present, so the description carries the burden of signaling behavior. The verb 'List' clearly implies a read-only operation and the parenthetical clarifies the returned entities, but the description does not mention auth requirements, failure modes, or response shape.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
One short, front-loaded sentence with no redundant words. Every phrase adds relevant meaning: action, resource, disambiguation, and scope.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The core operation is clear and the input schema covers the optional account parameter. However, with no annotations, no output schema, and no usage guidance relative to the many sibling tools, the description leaves an agent to infer when this tool is the right choice and what the response contains.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, so the baseline of 3 applies. The description does not add parameter semantics beyond the schema, though it does consistently refer to the 'account' parameter.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb ('List'), a specific resource ('ad clients'), and a scope ('for an account'). The parenthetical 'publisher IDs' disambiguates the resource from sibling tools like list_ad_units and list_accounts.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance on when to prefer this tool over its siblings, and no exclusions or alternatives are mentioned. The only contextual hint is 'for an account,' which does not help an agent choose among list_accounts, list_ad_units, or list_ad_clients.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list_ad_unitsA
List all ad units. Returns name, displayName, state, type, and size for each unit.
| Name | Required | Description | Default |
|---|---|---|---|
| adClient | No | Ad client name. Auto-detected if omitted. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the burden of behavioral disclosure. It does state that the tool is a list operation and enumerates the returned fields, which is useful. However, it does not clarify the scoping behavior around the optional adClient parameter or potential pagination, and 'all ad units' is slightly ambiguous.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is two short sentences with no filler. The action is front-loaded, and the second sentence provides exactly the output detail an agent needs without an output schema.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a low-complexity list operation, the description covers the core purpose and return fields, and the schema handles the optional parameter. It is slightly incomplete regarding the adClient scoping caveat and sibling-tool routing, but nothing critical is missing for correct invocation.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100% for the single parameter, and the schema already explains that adClient is optional and auto-detected if omitted. The description adds no additional parameter-level meaning, so the baseline score of 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description opens with a specific verb and resource: 'List all ad units.' It clearly identifies the object type and differentiates from siblings like list_accounts and list_ad_clients by specifying the exact resource being listed.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The imperative 'List all ad units' implies when to use the tool, but there is no explicit guidance about when to choose it over related tools such as list_ad_clients or get_ad_code. No alternatives or exclusion conditions are mentioned.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list_alertsA
List AdSense alerts and policy issues that need attention
| Name | Required | Description | Default |
|---|---|---|---|
| account | No | Account name. Auto-detected if omitted. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
The verb 'List' conveys a read-only operation and 'need attention' adds a filtering trait, but the description does not disclose what the returned entries contain, whether only unresolved issues are included, or how the optional account parameter affects results. Since no annotations are provided, the description carries the full behavioral burden and only partially meets it.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
One concise, front-loaded sentence with no redundant filler. Every word contributes meaning, and the action verb appears first.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple one-parameter list tool, the description gives the essential purpose and scope. However, with no output schema and no annotations, it does not clarify the response shape or the exact meaning of 'need attention,' leaving the agent to infer those details. It is adequate but not fully complete.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%: the single 'account' parameter is already described as 'Account name. Auto-detected if omitted.' The tool description adds no additional parameter-level meaning, so the schema-based baseline of 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses a specific verb ('List') and a clear resource ('AdSense alerts and policy issues') with a scope qualifier ('that need attention'). It is immediately distinguishable from sibling list tools like list_accounts, list_ad_clients, and list_ad_units.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The phrase 'that need attention' implies this is for reviewing actionable or notable alerts, but the description gives no explicit guidance on when to choose this over siblings or when it is not appropriate. The intended context is inferable, not stated.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list_paymentsA
List payment history for your AdSense account
| Name | Required | Description | Default |
|---|---|---|---|
| account | No | Account name. Auto-detected if omitted. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full disclosure burden; 'List' conveys a read-only operation and 'payment history' indicates the returned domain. It does not, however, disclose pagination, ordering, result shape, or any account-specific behavior beyond what the parameter schema covers.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
A single short sentence states the action, resource, and scope with no filler or duplicated schema information. The most important operand ('payment history') is front-loaded.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a one-parameter, read-only list tool this is close to sufficient, but there is no output schema and no description of the returned fields, ordering, or pagination. The missing usage guidance and absent behavioral notes leave an agent with less context than it could reasonably have.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the schema already documents the single optional 'account' parameter and its auto-detection behavior. The description adds only that the history belongs to the AdSense account, which is already implied by the tool scope, not new parameter semantics.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Description states an explicit verb+resource ('List payment history') and scopes it to the user's AdSense account, which differentiates it from sibling list tools focused on accounts, ad clients, ad units, and sites. The name is not merely restated.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The phrasing implies this is the tool to use when payment history is needed, and the scope 'for your AdSense account' provides some context. However, no explicit when-to-use or when-not-to-use guidance is given, and none of the alternatives such as generate_report or list_alerts are referenced.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list_sitesA
List all sites in your AdSense account with their approval status and auto-ads setting
| Name | Required | Description | Default |
|---|---|---|---|
| account | No | Account name. Auto-detected if omitted. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the burden of conveying safety and behavior. 'List' clearly signals a read-only operation, and specifying that it returns all sites along with approval status and auto-ads setting provides useful behavioral context without needing to state side effects.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single sentence with no redundancy. The verb and resource are front-loaded, and the return fields are stated compactly. Every word contributes to the agent's understanding.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple list tool with one optional parameter and no output schema, the description provides sufficient context: what is listed, the account scope, and which properties are returned. It could add explicit alternative routing, but that is already covered by the usage_guidelines gap.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100% for the only parameter (account), which already documents auto-detection. The description adds no param-specific meaning beyond placing the operation within the user's AdSense account, so the baseline of 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses a specific verb 'List' with a clear resource 'all sites in your AdSense account' and names the returned data ('approval status and auto-ads setting'). This distinguishes it from sibling tools like list_accounts, list_ad_clients, and list_ad_units.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives such as list_ad_units or list_accounts. There are no exclusion criteria, prerequisites, or explicit routing to sibling tools.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
verify_ads_txtB
Check if ads.txt is correctly set up on a domain by fetching and verifying its contents
| Name | Required | Description | Default |
|---|---|---|---|
| domain | Yes | Domain to check (e.g., example.com) | |
| account | No | Account name. Auto-detected if omitted. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description bears the full responsibility for behavioral disclosure. It says the tool fetches and verifies, implying a read-only operation, but does not state side effects, output format, failure behavior, network dependencies, or auth requirements. The agent cannot anticipate what a 'verified' result looks like.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, front-loaded sentence with no wasted words. It is appropriately compact for the simplicity of the tool, though 'check' and 'verifying' are mildly redundant.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
With no output schema and no annotations, the description leaves important operational details undefined, such as what the verification result looks like, whether account is required for any domains, and how errors or invalid domains are handled. It is minimally viable but not complete.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the schema already documents both parameters. The description adds no additional parameter-level detail beyond restating the domain context, which is acceptable but not extra.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Description uses specific verb 'Check' with resource 'ads.txt' and clear scope 'on a domain by fetching and verifying its contents'. It clearly distinguishes from sibling tools like generate_ads_txt by focusing on verification rather than generation.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies a usage context: verifying an existing domain's ads.txt. However, it does not explicitly mention when to use it vs alternatives like generate_ads_txt or how it relates to list_sites. No exclusions or alternative guidance is provided.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
12 tool updates
v0.1.0- First observed
create_ad_unit - First observed
generate_ads_txt - First observed
generate_report - First observed
get_ad_code - First observed
get_ad_snippet - First observed
list_accounts - First observed
list_ad_clients - First observed
list_ad_units - First observed
list_alerts - First observed
list_payments - First observed
list_sites - First observed
verify_ads_txt
TDQS
Most tools target clearly distinct resources and actions, such as listing accounts, creating ad units, and verifying ads.txt. The only potential confusion is between get_ad_code and get_ad_snippet, but their descriptions distinguish raw HTML/JS from framework-specific integration code.
Tool names consistently follow a verb_noun pattern in snake_case: list_*, create_ad_unit, get_ad_code, generate_report, verify_ads_txt. The naming is predictable and easy for an agent to navigate.
Twelve tools is well within the typical 3-15 range for a focused server. Each tool covers a meaningful AdSense workflow without obvious padding or duplication.
The server covers listing, creation, reporting, payments, alerts, and ads.txt verification, but has notable gaps: there is no update or delete operation for ad units, and site management is limited to listing. Agents can complete core workflows but cannot modify existing resources.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Website monetization for AI agents: apply, integrate ads, reporting, and payouts — all over MCP.
MCP-native ad server. Monetize AI chatbots and agents with conversational ads.
Google Ads MCP server — manage campaigns, keywords, and metrics.
Ad network for AI agents — monetize MCP servers with contextual ads. 70% revenue share.
Related MCP Servers
- AlicenseAqualityFmaintenanceAn MCP server that lets AI assistants look up any advertiser's Google ads. Search by domain or company name, retrieve ad creatives, and decode text ad content from Google's Ads Transparency Center.46MIT
- AlicenseNot gradedqualityDmaintenanceMCP server for managing ad campaigns across Google Ads, Meta, and more. Enables deploying campaigns, checking performance, and managing budgets from terminal or AI assistants.MIT
- AlicenseNot gradedqualityCmaintenanceConnects Google AdSense to MCP clients like Claude and Cursor, enabling earnings summaries, detailed reports, site status checks, and more via natural language.295MIT
- AlicenseAqualityCmaintenanceA Model Context Protocol (MCP) server that gives Claude Desktop direct access to your Google AdSense account. Ask plain English questions about your revenue — no dashboard required.1018MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/mkroo/adsense-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server