flin-google-ads-mcp
Read-only MCP server for Google Ads, built for simple public use via uvx.
Install in Claude Desktop on Mac
Download the .mcpb file from the latest GitHub release. See the Mac installation guide for setup, credentials and verification. The bundle requires a current Claude Desktop with MCPB UV runtime support and internet access at server startup. From extension 0.1.10 onward, each server start automatically checks PyPI for the latest stable compatible server version. Existing 0.1.9 installations need a one-time extension replacement.
See SECURITY.md for the security model and review results.
Why this server
- Read-only by design
- No create/update/delete campaign operations
- Browser sign-in automatically captures and stores the refresh token; access tokens renew automatically
- Easy local testing with MCP Inspector
Exposed MCP tools
health_checklist_accessible_customersget_customer_clientsfind_customer_clientsget_campaignsget_ad_groupsget_adsget_insightsget_conversion_insightsget_keywordsget_search_termsget_change_eventsauth_statusget_auth_urlsave_refresh_token_from_codeclear_auth_token
get_ads includes RSA content fields (headlines/descriptions/paths/final URLs) when available.
get_insights supports:
campaignad_groupadcustomer(account-level metrics)account(alias ofcustomer)
get_search_terms is backed by search_term_view, so it returns actual user search terms rather than configured keywords. Pass segment_by_date=true when you need daily search-term rows with a date field instead of one aggregate row per search term for the requested range.
Search-term conversion filters:
conversion_action_idconversion_action_name
Search-term optional segmentation:
segment_by_date
get_change_events is backed by the Google Ads change_event resource. It returns recent account changes with user, client type, changed resource, operation, changed field paths, and old/new values where the API returns them. Google Ads requires a finite change_event.change_date_time window within the past 30 days and a LIMIT; pass start_date and end_date as YYYY-MM-DD.
Example:
{
"tool": "get_change_events",
"args": {
"customer_id": "2054139041",
"login_customer_id": "6050181535",
"start_date": "2026-06-01",
"end_date": "2026-06-15",
"resource_type": "CAMPAIGN",
"limit": 50
}
}
Conversion insights
Use get_conversion_insights when you need conversion-only reporting by day or conversion action, for example "which campaigns had lead conversions each day last week."
It supports the same levels as get_insights:
campaignad_groupadcustomer(account-level metrics)account(alias ofcustomer)
Optional segmentation:
segment_by_datesegment_by_conversion_action
Optional conversion-action filters:
conversion_action_idconversion_action_name
Rules:
- pass at most one of the two parameters
conversion_action_idmust be a Google Ads resource name such ascustomers/1234567890/conversionActions/555conversion_action_namematchessegments.conversion_action_nameget_conversion_insightsreturns onlymetrics.conversionsandmetrics.conversions_value
Use get_insights for general performance metrics such as impressions, clicks, CTR, CPC, and cost. Use get_conversion_insights for conversion-action or daily conversion breakdowns.
Requirements
- Python 3.10+
- Node.js v25.8.1+ (only for MCP Inspector testing)
- Google Ads API credentials:
GOOGLE_ADS_DEVELOPER_TOKENGOOGLE_ADS_CLIENT_IDGOOGLE_ADS_CLIENT_SECRET
Optional:
GOOGLE_ADS_REFRESH_TOKEN(backwards-compatible override; normally generated with MCP auth tools)GOOGLE_ADS_AUTH_FILE(defaults to~/.config/flin-google-ads-mcp/auth.json)GOOGLE_ADS_OAUTH_REDIRECT_URI(optional loopback callback override; automatic sign-in defaults tohttp://127.0.0.1:<available-port>/)GOOGLE_ADS_LOGIN_CUSTOMER_IDGOOGLE_ADS_CUSTOMER_ID(default customer if nocustomer_idargument is passed)GOOGLE_ADS_USE_PROTO_PLUS(trueby default)
For MCC flows, you can also pass login_customer_id directly per tool call.
Auth flow
The MCP client config no longer needs GOOGLE_ADS_REFRESH_TOKEN.
- Configure
GOOGLE_ADS_DEVELOPER_TOKEN,GOOGLE_ADS_CLIENT_ID, andGOOGLE_ADS_CLIENT_SECRET. - Run
auth_status. - If it reports
missing_refresh_token, runget_auth_url. - Open the returned Google URL in a browser on the same computer and sign in within 10 minutes, keeping the MCP server running. The local callback captures the code and stores the refresh token automatically. Wait for the browser success message; no copying is required.
- Run
auth_statusandhealth_check, thenlist_accessible_customersto verify live account access. Choose the customer account for your first report.
The stored refresh token is written to ~/.config/flin-google-ads-mcp/auth.json by default and is never returned by MCP tools. The Google client automatically renews access tokens using that refresh token. Stored credentials survive restarts; expired or revoked refresh tokens require another browser sign-in.
auth_status includes oauth_flow_status for pending, successful, denied, expired or failed sign-ins. A new get_auth_url cancels the previous flow. The temporary HTTP receiver binds only to loopback, validates state and PKCE, and closes after completion or ten minutes. clear_auth_token also cancels pending sign-in. A configured callback port must be free; leave GOOGLE_ADS_OAUTH_REDIRECT_URI unset to select an available port. This automatic flow requires the browser and MCP server to run on the same computer.
An existing refresh token can still be supplied through the extension's sensitive field or GOOGLE_ADS_REFRESH_TOKEN; it takes precedence over the file, so remove a stale override before reauthorizing. save_refresh_token_from_code remains a legacy manual fallback, not a required setup step.
Quick flow: "Avesco spend yesterday"
- Find the subaccount by name under the manager:
{
"tool": "find_customer_clients",
"args": {
"manager_customer_id": "6050181535",
"login_customer_id": "6050181535",
"name_query": "Avesco",
"direct_only": false,
"include_hidden": false,
"include_self": false,
"status": "ALL",
"limit": 50
}
}
- Use the returned
client_customer_idwith account-level insights:
{
"tool": "get_insights",
"args": {
"customer_id": "2054139041",
"login_customer_id": "6050181535",
"level": "account",
"date_range": "YESTERDAY",
"limit": 10
}
}
Date ranges
get_insights, get_conversion_insights, get_keywords, and get_search_terms support:
TODAYYESTERDAYTHIS_WEEK_MON_TODAYTHIS_WEEK_SUN_TODAYLAST_WEEK_MON_SUNLAST_WEEK_SUN_SATLAST_7_DAYSLAST_14_DAYSLAST_30_DAYSLAST_60_DAYSLAST_90_DAYSTHIS_MONTHLAST_MONTHCUSTOM(requiresstart_dateandend_dateinYYYY-MM-DD)
Quickstart (from source)
uv sync --extra dev
cp .env.example .env
# Fill .env values
uv run flin-google-ads-mcp
Quickstart (as published package)
uvx flin-google-ads-mcp@latest
Claude integration (published via uvx)
{
"mcpServers": {
"flin-google-ads-mcp": {
"command": "uvx",
"args": ["flin-google-ads-mcp@latest"],
"env": {
"GOOGLE_ADS_DEVELOPER_TOKEN": "xxx",
"GOOGLE_ADS_CLIENT_ID": "xxx",
"GOOGLE_ADS_CLIENT_SECRET": "xxx",
"GOOGLE_ADS_CUSTOMER_ID": "1234567890",
"GOOGLE_ADS_LOGIN_CUSTOMER_ID": "1234567890"
}
}
}
}
Claude integration (local development)
{
"mcpServers": {
"flin-google-ads-mcp-local": {
"command": "uv",
"args": [
"run",
"--directory",
"/Users/nicolasg/Antigravity/flin-google-ads-mcp",
"flin-google-ads-mcp"
],
"env": {
"GOOGLE_ADS_DEVELOPER_TOKEN": "xxx",
"GOOGLE_ADS_CLIENT_ID": "xxx",
"GOOGLE_ADS_CLIENT_SECRET": "xxx",
"GOOGLE_ADS_CUSTOMER_ID": "1234567890",
"GOOGLE_ADS_LOGIN_CUSTOMER_ID": "0987654321"
}
}
}
}
How to test
Detailed guide: docs/testing.md
- Release checklist: docs/release.md
Operational usage guide:
Fast path:
uv sync --extra dev
python3 -m pytest
python3 -m compileall src
Then run live smoke tests with MCP Inspector (see the testing guide).
Release on GitHub + PyPI
This repository publishes automatically with GitHub Actions:
- CI:
.github/workflows/ci.yml - Release:
.github/workflows/release.yml(triggered by git tagsv*)
1) Configure PyPI Trusted Publisher (one-time)
In PyPI project settings for flin-google-ads-mcp, add a Trusted Publisher with:
- Owner:
flin-agency - Repository:
flin-google-ads-mcp - Workflow:
release.yml - Environment:
pypi
2) Cut a release
# bump version in pyproject.toml first, then:
git add -A
git commit -m "release: v0.1.0"
git tag v0.1.0
git push origin main --tags
Every v* release automatically builds and tests both packages, publishes to PyPI using OIDC, verifies the published files and the extension startup against PyPI, then publishes the Mac MCPB and Python packages to GitHub. See the release checklist.
CI
GitHub Actions validates:
- unit tests
- import/compile checks
- package build
Metadata
Release files for flin-google-ads-mcp 0.1.11
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| flin_google_ads_mcp-0.1.11.tar.gz | 155.8 kB | With provenance | Details for flin_google_ads_mcp-0.1.11.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| flin_google_ads_mcp-0.1.11-py3-none-any.whl | Python 3 | none | any | Details for flin_google_ads_mcp-0.1.11-py3-none-any.whl |
Total release size: 179.0 kB
Release files / flin_google_ads_mcp-0.1.11.tar.gz
| Download URL | flin_google_ads_mcp-0.1.11.tar.gz |
|---|---|
| Size | 155.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e83fc2447635a2a9aca66cf72308f5aa0e2ffb4149d56a7fbb8109d1d7ca5ced
|
|
BLAKE2b-256 checksum How to use checksums |
a7fbe67f49b694a2672521890c885d95275da6724fdddb46c9b16937557d4b8e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 6, 2026.
Transparency logRelease files / flin_google_ads_mcp-0.1.11-py3-none-any.whl
| Download URL | flin_google_ads_mcp-0.1.11-py3-none-any.whl |
|---|---|
| Size | 23.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0421b5e5551c2b0b6d11af82efb1b1fa02f913df56180e097874ac28602d1e6f
|
|
BLAKE2b-256 checksum How to use checksums |
5e54e430f2ab1ec30854ed2ff1270f65101addec4ee7a8dccb9627912ae085eb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 6, 2026.
Transparency logSecurity for flin-google-ads-mcp 0.1.11
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for flin_google_ads_mcp-0.1.11.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 6, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.