cohnen/mcp-google-ads
An MCP tool that connects Google Ads with Claude AI/Cursor and others, allowing you to analyze your advertising data through natural language conversations. This integration gives you access to campaign information, performance metrics, keyword analytics, and ad management—all through simple chat wi
461a1d673cf1mcp-google-ads0.1.0 in pyproject.tomlPaths from tool input into commands, SQL, files and URLs
How much power the tools give an agent over the machine
Hidden instructions and poisoning in text for the model
Known vulnerabilities in the packages the server uses
How the server reads credentials and where they can go
Whether the tools do only what their descriptions say
How far the analysis went
The scanner traces each tool from its input to the operations its code performs, and here it could not follow every path. Code Safety is shown as partly traced instead of a score: no finding there is not a clean result. The score of Capability Exposure counts only what it could follow.
- In 11 places a tool's input is handed to a function whose name matches several definitions in the code; the scanner could not tell which one runs, so it stopped there
Top risks in plain words
- MEDIUMTool
download_image_assetreads or writes any file path by design: an agent steered by prompt injection can use it that way.
How to use it safely
Practical steps from what we found in this server. They lower the risk; they do not replace a review of the code.
- Give it only the folder it needs
download_image_assetcan read or write any file path. Mount a single project folder, read-only where you can. - Turn off the tools you do not use
Most MCP clients let you disable single tools. If you do not need
download_image_asset, switch them off. - Give it a narrowly scoped token
Its code reads credentials or environment variables. Use a key limited to what this server needs, not your main one.
- Keep confirmations on
Leave your MCP client's confirmation prompt on for tools that change files, run commands or send data.
What its tools can do on your machine
The server offers 12 tools, 2 prompts, 1 resource. When an AI agent calls them, this is what their code can do on the machine where the server runs, as traced in the source. Tools that call code the scanner could not follow may do more.
analyze_image_assets, download_image_asset, execute_gaql_query, get_account_currency, get_ad_creatives, get_ad_performance and 6 moreanalyze_image_assets, download_image_asset, execute_gaql_query, get_account_currency, get_ad_creatives, get_ad_performance and 6 moreanalyze_image_assets, download_image_asset, execute_gaql_query, get_account_currency, get_ad_creatives, get_ad_performance and 6 moreanalyze_image_assets, download_image_asset, execute_gaql_query, get_account_currency, get_ad_creatives, get_ad_performance and 6 moreanalyze_image_assets, download_image_asset, execute_gaql_query, get_account_currency, get_ad_creatives, get_ad_performance and 6 moreNo tool was seen to: start other programs on the machine.
Where its requests and secrets go
Read from the names along each tool's calls, not from a run: what the code says, not every address it may reach at run time.
The literal addresses the tools' requests name.
- None: no request names a fixed host.
Constants or settings that start an address; the value comes from configuration.
- None seen.
Credential-like environment variables. Give the server a key with the least access it needs.
GOOGLE_ADS_CLIENT_SECRET· analyze_image_assets, download_image_asset, execute_gaql_query +9
Requests whose address comes from the tool's input: the agent decides where they go.
download_image_asset1 call
13 request addresses could not be settled from the code (built at run time).
Text it brings in from outside
Text that reaches the model from outside: an instruction hidden in it can steer the agent (prompt injection). Treat what these tools return as data, not as orders.
- files12 tools · analyze_image_assets, download_image_asset, execute_gaql_query +9
- web or API responses12 tools · analyze_image_assets, download_image_asset, execute_gaql_query +9
All three are present: text from outside could make the agent send private data away. Keep confirmations on for tools that send data.
Tool annotations
No tool declares MCP annotations (readOnlyHint, destructiveHint and the rest). Clients use them to decide what to confirm; directories such as Anthropic's and OpenAI's ask for them.
Tools, prompts and resources (15: 12 tools, 2 prompts, 1 resource)
Open a row for its full description. Chips show what its code can reach, and which risky capability its own description declares.
download_image_assettool Download a specific image asset from a Google Ads account.FilesNetworkCredentialsEnv varsSensitive pathsoutside textReads/writes files
Download a specific image asset from a Google Ads account.
This tool allows you to download the full-size version of an image asset
for further processing, analysis, or backup.
RECOMMENDED WORKFLOW:
1. First run list_accounts() to get available account IDs
2. Then run get_image_assets() to get available image asset IDs
3. Finally use this command to download specific images
Args:
customer_id: The Google Ads customer ID as a string (10 digits, no dashes)
asset_id: The ID of the image asset to download
output_dir: Directory where the image should be saved (default: ./ad_images)
Returns:
Status message indicating success or failure of the download
Example:
customer_id: "1234567890"
asset_id: "12345"
output_dir: "./my_ad_images"gaql_helpprompt Provides assistance for writing GAQL queries.
Provides assistance for writing GAQL queries.
google_ads_workflowprompt Provides guidance on the recommended workflow for using Google Ads tools.
Provides guidance on the recommended workflow for using Google Ads tools.
gaql_referenceresource Google Ads Query Language (GAQL) reference documentation.
Google Ads Query Language (GAQL) reference documentation.
analyze_image_assetstool Analyze image assets with their performance metrics across campaigns.FilesNetworkCredentialsEnv varsSensitive pathsoutside text
Analyze image assets with their performance metrics across campaigns.
This comprehensive tool helps you understand which image assets are performing well
by showing metrics like impressions, clicks, and conversions for each image.
RECOMMENDED WORKFLOW:
1. First run list_accounts() to get available account IDs
2. Then run get_account_currency() to see what currency the account uses
3. Finally run this command to analyze image asset performance
Args:
customer_id: The Google Ads customer ID as a string (10 digits, no dashes)
days: Number of days to look back (default: 30)
Returns:
Detailed report of image assets and their performance metrics
Example:
customer_id: "1234567890"
days: 14execute_gaql_querytool Execute a custom GAQL (Google Ads Query Language) query.FilesNetworkCredentialsEnv varsSensitive pathsoutside text
Execute a custom GAQL (Google Ads Query Language) query.
This tool allows you to run any valid GAQL query against the Google Ads API.
Args:
customer_id: The Google Ads customer ID as a string (10 digits, no dashes)
query: The GAQL query to execute (must follow GAQL syntax)
Returns:
Formatted query results or error message
Example:
customer_id: "1234567890"
query: "SELECT campaign.id, campaign.name FROM campaign LIMIT 10"get_account_currencytool Retrieve the default currency code used by the Google Ads account.FilesNetworkCredentialsEnv varsSensitive pathsoutside text
Retrieve the default currency code used by the Google Ads account.
IMPORTANT: Run this first before analyzing cost data to understand which currency
the account uses. Cost values are always displayed in the account's currency.
Args:
customer_id: The Google Ads customer ID as a string (10 digits, no dashes)
Returns:
The account's default currency code (e.g., 'USD', 'EUR', 'GBP')
Example:
customer_id: "1234567890"get_ad_creativestool Get ad creative details including headlines, descriptions, and URLs.FilesNetworkCredentialsEnv varsSensitive pathsoutside text
Get ad creative details including headlines, descriptions, and URLs.
This tool retrieves the actual ad content (headlines, descriptions)
for review and analysis. Great for creative audits.
RECOMMENDED WORKFLOW:
1. First run list_accounts() to get available account IDs
2. Then run this command with the desired account ID
Args:
customer_id: The Google Ads customer ID as a string (10 digits, no dashes)
Returns:
Formatted list of ad creative details
Example:
customer_id: "1234567890"get_ad_performancetool Get ad performance metrics for the specified time period.FilesNetworkCredentialsEnv varsSensitive pathsoutside text
Get ad performance metrics for the specified time period.
RECOMMENDED WORKFLOW:
1. First run list_accounts() to get available account IDs
2. Then run get_account_currency() to see what currency the account uses
3. Finally run this command to get ad performance
Args:
customer_id: The Google Ads customer ID as a string (10 digits, no dashes)
days: Number of days to look back (default: 30)
Returns:
Formatted table of ad performance data
Note:
Cost values are in micros (millionths) of the account currency
(e.g., 1000000 = 1 USD in a USD account)
Example:
customer_id: "1234567890"
days: 14get_asset_usagetool Find where specific assets are being used in campaigns, ad groups, and ads.FilesNetworkCredentialsEnv varsSensitive pathsoutside text
Find where specific assets are being used in campaigns, ad groups, and ads.
This tool helps you analyze how assets are linked to campaigns and ads across your account,
which is useful for creative analysis and optimization.
RECOMMENDED WORKFLOW:
1. First run list_accounts() to get available account IDs
2. Run get_image_assets() to see available assets
3. Use this command to see where specific assets are used
Args:
customer_id: The Google Ads customer ID as a string (10 digits, no dashes)
asset_id: Optional specific asset ID to look up (leave empty to get all assets of the specified type)
asset_type: Type of asset to search for (default: 'IMAGE')
Returns:
Formatted report showing where assets are used in the account
Example:
customer_id: "1234567890"
asset_id: "12345"
asset_type: "IMAGE"get_campaign_performancetool Get campaign performance metrics for the specified time period.FilesNetworkCredentialsEnv varsSensitive pathsoutside text
Get campaign performance metrics for the specified time period.
RECOMMENDED WORKFLOW:
1. First run list_accounts() to get available account IDs
2. Then run get_account_currency() to see what currency the account uses
3. Finally run this command to get campaign performance
Args:
customer_id: The Google Ads customer ID as a string (10 digits, no dashes)
days: Number of days to look back (default: 30)
Returns:
Formatted table of campaign performance data
Note:
Cost values are in micros (millionths) of the account currency
(e.g., 1000000 = 1 USD in a USD account)
Example:
customer_id: "1234567890"
days: 14get_image_assetstool Retrieve all image assets in the account including their full-size URLs.FilesNetworkCredentialsEnv varsSensitive pathsoutside text
Retrieve all image assets in the account including their full-size URLs.
This tool allows you to get details about image assets used in your Google Ads account,
including the URLs to download the full-size images for further processing or analysis.
RECOMMENDED WORKFLOW:
1. First run list_accounts() to get available account IDs
2. Then run this command with the desired account ID
Args:
customer_id: The Google Ads customer ID as a string (10 digits, no dashes)
limit: Maximum number of image assets to return (default: 50)
Returns:
Formatted list of image assets with their download URLs
Example:
customer_id: "1234567890"
limit: 100list_accountstool Lists all accessible Google Ads accounts.FilesNetworkCredentialsEnv varsSensitive pathsoutside text
Lists all accessible Google Ads accounts.
This is typically the first command you should run to identify which accounts
you have access to. The returned account IDs can be used in subsequent commands.
Returns:
A formatted list of all Google Ads accounts accessible with your credentialslist_resourcestool List valid resources that can be used in GAQL FROM clauses.FilesNetworkCredentialsEnv varsSensitive pathsoutside text
List valid resources that can be used in GAQL FROM clauses.
Args:
customer_id: The Google Ads customer ID as a string
Returns:
Formatted list of valid resourcesrun_gaqltool Execute any arbitrary GAQL (Google Ads Query Language) query with custom formatting options.FilesNetworkCredentialsEnv varsSensitive pathsoutside text
Execute any arbitrary GAQL (Google Ads Query Language) query with custom formatting options.
This is the most powerful tool for custom Google Ads data queries.
Args:
customer_id: The Google Ads customer ID as a string (10 digits, no dashes)
query: The GAQL query to execute (any valid GAQL query)
format: Output format ("table", "json", or "csv")
Returns:
Query results in the requested format
EXAMPLE QUERIES:
1. Basic campaign metrics:
SELECT
campaign.name,
metrics.clicks,
metrics.impressions,
metrics.cost_micros
FROM campaign
WHERE segments.date DURING LAST_7_DAYS
2. Ad group performance:
SELECT
ad_group.name,
metrics.conversions,
metrics.cost_micros,
campaign.name
FROM ad_group
WHERE metrics.clicks > 100
3. Keyword analysis:
SELECT
keyword.text,
metrics.average_position,
metrics.ctr
FROM keyword_view
ORDER BY metrics.impressions DESC
4. Get conversion data:
SELECT
campaign.name,
metrics.conversions,
metrics.conversions_value,
metrics.cost_micros
FROM campaign
WHERE segments.date DURING LAST_30_DAYS
Note:
Cost values are in micros (millionths) of the account currency
(e.g., 1000000 = 1 USD in a USD account)Text the model reads (15)
Every tool, prompt and resource description as written in the code: the model sees all of it, the user usually does not.
list_accounts tool
Lists all accessible Google Ads accounts.
This is typically the first command you should run to identify which accounts
you have access to. The returned account IDs can be used in subsequent commands.
Returns:
A formatted list of all Google Ads accounts accessible with your credentialsexecute_gaql_query tool
Execute a custom GAQL (Google Ads Query Language) query.
This tool allows you to run any valid GAQL query against the Google Ads API.
Args:
customer_id: The Google Ads customer ID as a string (10 digits, no dashes)
query: The GAQL query to execute (must follow GAQL syntax)
Returns:
Formatted query results or error message
Example:
customer_id: "1234567890"
query: "SELECT campaign.id, campaign.name FROM campaign LIMIT 10"get_campaign_performance tool
Get campaign performance metrics for the specified time period.
RECOMMENDED WORKFLOW:
1. First run list_accounts() to get available account IDs
2. Then run get_account_currency() to see what currency the account uses
3. Finally run this command to get campaign performance
Args:
customer_id: The Google Ads customer ID as a string (10 digits, no dashes)
days: Number of days to look back (default: 30)
Returns:
Formatted table of campaign performance data
Note:
Cost values are in micros (millionths) of the account currency
(e.g., 1000000 = 1 USD in a USD account)
Example:
customer_id: "1234567890"
days: 14get_ad_performance tool
Get ad performance metrics for the specified time period.
RECOMMENDED WORKFLOW:
1. First run list_accounts() to get available account IDs
2. Then run get_account_currency() to see what currency the account uses
3. Finally run this command to get ad performance
Args:
customer_id: The Google Ads customer ID as a string (10 digits, no dashes)
days: Number of days to look back (default: 30)
Returns:
Formatted table of ad performance data
Note:
Cost values are in micros (millionths) of the account currency
(e.g., 1000000 = 1 USD in a USD account)
Example:
customer_id: "1234567890"
days: 14run_gaql tool
Execute any arbitrary GAQL (Google Ads Query Language) query with custom formatting options.
This is the most powerful tool for custom Google Ads data queries.
Args:
customer_id: The Google Ads customer ID as a string (10 digits, no dashes)
query: The GAQL query to execute (any valid GAQL query)
format: Output format ("table", "json", or "csv")
Returns:
Query results in the requested format
EXAMPLE QUERIES:
1. Basic campaign metrics:
SELECT
campaign.name,
metrics.clicks,
metrics.impressions,
metrics.cost_micros
FROM campaign
WHERE segments.date DURING LAST_7_DAYS
2. Ad group performance:
SELECT
ad_group.name,
metrics.conversions,
metrics.cost_micros,
campaign.name
FROM ad_group
WHERE metrics.clicks > 100
3. Keyword analysis:
SELECT
keyword.text,
metrics.average_position,
metrics.ctr
FROM keyword_view
ORDER BY metrics.impressions DESC
4. Get conversion data:
SELECT
campaign.name,
metrics.conversions,
metrics.conversions_value,
metrics.cost_micros
FROM campaign
WHERE segments.date DURING LAST_30_DAYS
Note:
Cost values are in micros (millionths) of the account currency
(e.g., 1000000 = 1 USD in a USD account)get_ad_creatives tool
Get ad creative details including headlines, descriptions, and URLs.
This tool retrieves the actual ad content (headlines, descriptions)
for review and analysis. Great for creative audits.
RECOMMENDED WORKFLOW:
1. First run list_accounts() to get available account IDs
2. Then run this command with the desired account ID
Args:
customer_id: The Google Ads customer ID as a string (10 digits, no dashes)
Returns:
Formatted list of ad creative details
Example:
customer_id: "1234567890"get_account_currency tool
Retrieve the default currency code used by the Google Ads account.
IMPORTANT: Run this first before analyzing cost data to understand which currency
the account uses. Cost values are always displayed in the account's currency.
Args:
customer_id: The Google Ads customer ID as a string (10 digits, no dashes)
Returns:
The account's default currency code (e.g., 'USD', 'EUR', 'GBP')
Example:
customer_id: "1234567890"get_image_assets tool
Retrieve all image assets in the account including their full-size URLs.
This tool allows you to get details about image assets used in your Google Ads account,
including the URLs to download the full-size images for further processing or analysis.
RECOMMENDED WORKFLOW:
1. First run list_accounts() to get available account IDs
2. Then run this command with the desired account ID
Args:
customer_id: The Google Ads customer ID as a string (10 digits, no dashes)
limit: Maximum number of image assets to return (default: 50)
Returns:
Formatted list of image assets with their download URLs
Example:
customer_id: "1234567890"
limit: 100download_image_asset tool
Download a specific image asset from a Google Ads account.
This tool allows you to download the full-size version of an image asset
for further processing, analysis, or backup.
RECOMMENDED WORKFLOW:
1. First run list_accounts() to get available account IDs
2. Then run get_image_assets() to get available image asset IDs
3. Finally use this command to download specific images
Args:
customer_id: The Google Ads customer ID as a string (10 digits, no dashes)
asset_id: The ID of the image asset to download
output_dir: Directory where the image should be saved (default: ./ad_images)
Returns:
Status message indicating success or failure of the download
Example:
customer_id: "1234567890"
asset_id: "12345"
output_dir: "./my_ad_images"get_asset_usage tool
Find where specific assets are being used in campaigns, ad groups, and ads.
This tool helps you analyze how assets are linked to campaigns and ads across your account,
which is useful for creative analysis and optimization.
RECOMMENDED WORKFLOW:
1. First run list_accounts() to get available account IDs
2. Run get_image_assets() to see available assets
3. Use this command to see where specific assets are used
Args:
customer_id: The Google Ads customer ID as a string (10 digits, no dashes)
asset_id: Optional specific asset ID to look up (leave empty to get all assets of the specified type)
asset_type: Type of asset to search for (default: 'IMAGE')
Returns:
Formatted report showing where assets are used in the account
Example:
customer_id: "1234567890"
asset_id: "12345"
asset_type: "IMAGE"analyze_image_assets tool
Analyze image assets with their performance metrics across campaigns.
This comprehensive tool helps you understand which image assets are performing well
by showing metrics like impressions, clicks, and conversions for each image.
RECOMMENDED WORKFLOW:
1. First run list_accounts() to get available account IDs
2. Then run get_account_currency() to see what currency the account uses
3. Finally run this command to analyze image asset performance
Args:
customer_id: The Google Ads customer ID as a string (10 digits, no dashes)
days: Number of days to look back (default: 30)
Returns:
Detailed report of image assets and their performance metrics
Example:
customer_id: "1234567890"
days: 14list_resources tool
List valid resources that can be used in GAQL FROM clauses.
Args:
customer_id: The Google Ads customer ID as a string
Returns:
Formatted list of valid resourcesgoogle_ads_workflow prompt
Provides guidance on the recommended workflow for using Google Ads tools.
gaql_help prompt
Provides assistance for writing GAQL queries.
gaql_reference resource
Google Ads Query Language (GAQL) reference documentation.
What we checked
The same checks run on every server. Each line below has one of these marks:
- 8 checks: command injection, argument injection, path traversal, server-side request forgery, SQL injection, code execution, unsafe deserialization, template injectionChecked on every scan. Results in this category are published only after a person has verified them.
- Runs programs the caller choosesNo tool runs a command or program the caller supplies — 15 tool handlers traced. Not every path could be followed, so this is not a clean pass.
- Executes caller-supplied codeNo tool evaluates code the caller supplies — 15 tool handlers traced. Not every path could be followed, so this is not a clean pass.
- Reads or writes any file path MEDIUM1 finding in download_image_asset
- Requests any addressNo tool sends a request to an address the caller supplies — 15 tool handlers traced. Not every path could be followed, so this is not a clean pass.
- Runs caller-supplied SQLNo tool executes a query the caller supplies — 15 tool handlers traced. Not every path could be followed, so this is not a clean pass.
- Tools that start processesNot seen in the traced code of 15 capabilities; 12 more call code the scanner could not follow, where it may happen
- Tools that touch files12 of 15 capabilities touch files
- Tools that call the network12 of 15 capabilities call the network
Where the code is: 15 handlers in 1 file at commit 461a1d673cf1
- 5 checks: tool poisoning, instruction override, hidden content, exfiltration requests, metadata integrityChecked on every scan. Results in this category are published only after a person has verified them.
- Dependency manifests2 manifests: pyproject.toml, requirements.txt
- Lockfiles checked against OSV1 file resolved and checked against the OSV database; 2 not resolved: pyproject.toml: dependency ranges declared here were not resolved against a lockfile and were not checked; requirements.txt: 8 dependency lines carry no exact version, so the installed version was not checked; pin them or add a lockfile
- Known vulnerabilities in production dependenciesNo production dependency with a known advisory
- Known vulnerabilities in other dependenciesNo package used only for development, tests or examples has a known advisory
- MCP SDK versionmcp >=0.0.11
- 3 checks: credential harvesting, undeclared credential access, credentials sent over the networkChecked on every scan. Results in this category are published only after a person has verified them.
- Tools that read credentials12 of 15 capabilities read credentials
- Environment variables12 capabilities read environment variables (often API keys)
- Authentication declaredNot checked: needs the live server's tools/list (a remote server declares how clients authenticate)
- 3 checks: undeclared network access, undeclared file access, undeclared process executionChecked on every scan. Results in this category are published only after a person has verified them.
- Tool descriptions presentEvery tool has a description the model and the user can read
- Statically known namesEvery tool's name could be read from the code
- Input schemasNot checked: needs the live server's tools/list (every tool declares an input schema)
- Destructive tools annotatedNot checked: needs the live server's tools/list (tools that write, delete or run commands carry destructivehint)
Dependencies with known vulnerabilities (0 in production)
Dependency ranges were not resolved against a lockfile, so the score is capped at 7.
No known vulnerabilities in the production dependencies that could be checked.
Past security advisories
Vulnerabilities published for this server itself, from the GitHub Advisory Database.
No security advisories have been published for this server in the GitHub Advisory Database.
How it runs
| Where it runs | On your machine, started by your MCP client from this repository or its package |
|---|---|
| Transport | stdio |
| Sign-in | not checked needs the live server |
| MCP SDK | mcp >=0.0.11 |
| Servers in the code | 1 (google-ads-server) |
The project's own security
| Security policy | none no SECURITY.md in the repository: report issues privately through GitHub if it is enabled |
|---|---|
| Past advisories | none in the GitHub Advisory Database |
| Last push | 2025-10-16 |
| Signed releases | not checked yet |
Where it is published
| Listed in | 5 catalogs (awesome_tensorblock, github_search, glama, mcp_toplist, mcpservers_org) |
|---|---|
| License | MIT |
| Created | 2025-03-20 |
| Topics | ai claude google-ads mcp mcp-server |
Attack map
How the server is built and where its risky tools lead: servers, their tools, what the tools' code can do, and the traced route from a declared risky tool's argument to the operation it reaches. Click a node for details.