Skip to main content

Read-only MCP server for Google Ads entities and reporting.

Project description

flin-google-ads-mcp

Read-only MCP server for Google Ads, built for simple public use via uvx.

Why this server

  • Read-only by design
  • No create/update/delete campaign operations
  • Credentials via environment variables only
  • Easy local testing with MCP Inspector

Exposed MCP tools

  • health_check
  • list_accessible_customers
  • get_customer_clients
  • find_customer_clients
  • get_campaigns
  • get_ad_groups
  • get_ads
  • get_insights
  • get_keywords

get_ads includes RSA content fields (headlines/descriptions/paths/final URLs) when available.

get_insights supports:

  • campaign
  • ad_group
  • ad
  • customer (account-level metrics)
  • account (alias of customer)

Requirements

  1. Python 3.10+
  2. Node.js v25.8.1+ (only for MCP Inspector testing)
  3. Google Ads API credentials:
  • GOOGLE_ADS_DEVELOPER_TOKEN
  • GOOGLE_ADS_CLIENT_ID
  • GOOGLE_ADS_CLIENT_SECRET
  • GOOGLE_ADS_REFRESH_TOKEN

Optional:

  • GOOGLE_ADS_LOGIN_CUSTOMER_ID
  • GOOGLE_ADS_CUSTOMER_ID (default customer if no customer_id argument is passed)
  • GOOGLE_ADS_USE_PROTO_PLUS (true by default)

For MCC flows, you can also pass login_customer_id directly per tool call.

Quick flow: "Avesco spend yesterday"

  1. 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
  }
}
  1. Use the returned client_customer_id with 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 and get_keywords support:

  • TODAY
  • YESTERDAY
  • THIS_WEEK_MON_TODAY
  • THIS_WEEK_SUN_TODAY
  • LAST_WEEK_MON_SUN
  • LAST_WEEK_SUN_SAT
  • LAST_7_DAYS
  • LAST_14_DAYS
  • LAST_30_DAYS
  • LAST_60_DAYS
  • LAST_90_DAYS
  • THIS_MONTH
  • LAST_MONTH
  • CUSTOM (requires start_date and end_date in YYYY-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_REFRESH_TOKEN": "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_REFRESH_TOKEN": "xxx",
        "GOOGLE_ADS_CUSTOMER_ID": "1234567890",
        "GOOGLE_ADS_LOGIN_CUSTOMER_ID": "0987654321"
      }
    }
  }
}

How to test

Detailed guide: docs/testing.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 tags v*)

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

The Release workflow builds, tests, and publishes to PyPI using OIDC (no PyPI API token in GitHub secrets).

CI

GitHub Actions validates:

  • unit tests
  • import/compile checks
  • package build

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

flin_google_ads_mcp-0.1.3.tar.gz (15.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

flin_google_ads_mcp-0.1.3-py3-none-any.whl (12.0 kB view details)

Uploaded Python 3

File details

Details for the file flin_google_ads_mcp-0.1.3.tar.gz.

File metadata

  • Download URL: flin_google_ads_mcp-0.1.3.tar.gz
  • Upload date:
  • Size: 15.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for flin_google_ads_mcp-0.1.3.tar.gz
Algorithm Hash digest
SHA256 93aec548527d9835b53e051b26a59bbd3354f2c78a5a3fee3470b6273b5d8b55
MD5 64585a0a88a11a358a19c19929c53e12
BLAKE2b-256 5287227a66b8bd48883c590daf57b2a8a13304e784ef2cd2b376314e708c2acc

See more details on using hashes here.

Provenance

The following attestation bundles were made for flin_google_ads_mcp-0.1.3.tar.gz:

Publisher: release.yml on flin-agency/flin-google-ads-mcp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file flin_google_ads_mcp-0.1.3-py3-none-any.whl.

File metadata

File hashes

Hashes for flin_google_ads_mcp-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 5a8d7af5d6eacd0b1100ec68bce03913fc3c0c3621c09b45aaa4676bcbd25b70
MD5 be340df6192fbe4a0b0fc6e8c0f14360
BLAKE2b-256 e35cc6eadae8f8118d1b06e1d4c13ffac01ea6f6aa4e70c077e66e690a81983e

See more details on using hashes here.

Provenance

The following attestation bundles were made for flin_google_ads_mcp-0.1.3-py3-none-any.whl:

Publisher: release.yml on flin-agency/flin-google-ads-mcp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page