Skip to main content

An implementation of MCP server for the Google Ads API.

Project description

Google Ads MCP Server

The Google Ads MCP Server is an implementation of the Model Context Protocol (MCP) that enables Large Language Models (LLMs), such as Gemini, to interact directly with the Google Ads API.

This is not an officially supported Google product.

Disclaimer

Copyright Google LLC. Supported by Google LLC and/or its affiliate(s). This solution, including any related sample code or data, is made available on an “as is,” “as available,” and “with all faults” basis, solely for illustrative purposes, and without warranty or representation of any kind. This solution is experimental, unsupported and provided solely for your convenience. Your use of it is subject to your agreements with Google, as applicable, and may constitute a beta feature as defined under those agreements. To the extent that you make any data available to Google in connection with your use of the solution, you represent and warrant that you have all necessary and appropriate rights, consents and permissions to permit Google to use and process that data. By using any portion of this solution, you acknowledge, assume and accept all risks, known and unknown, associated with its usage and any processing of data by Google, including with respect to your deployment of any portion of this solution in your systems, or usage in connection with your business, if at all. With respect to the entrustment of personal information to Google, you will verify that the established system is sufficient by checking Google's privacy policy and other public information, and you agree that no further information will be provided by Google.

Getting Started

Follow these instructions to configure and run the Google Ads MCP Server.

1. Configure Python Environment

For Direct Use

This project needs Python 3.12 with pipx or uv.

For Development

This project uses uv for dependency management.

Install uv and then run the following command to install the required Python packages:

uv pip sync

2. Configure Google Ads credentials

This tool requires you to have a google-ads.yaml file with your Google Ads API credentials. By default, the application will look for this file in your home directory.

If you don't have one, you can generate it by running the following example from the google-ads-python library: authentication example

Make sure your google-ads.yaml file contains the following keys:

  • client_id
  • client_secret
  • refresh_token
  • developer_token
  • login_customer_id (optional, but recommended)

3. Launch MCP Server

For Direct Use with Gemini CLI

Update your Gemini configuration to include the google-ads-mcp server. The following is an example of a local MCP server configuration:

{
  // Other configs...
  "mcpServers": {
    "GoogleAds": {
      "command": "pipx",
      "args": [
        "run",
        "--spec",
        "git+https://github.com/google-marketing-solutions/google_ads_mcp.git",
        "run-mcp-server"
      ],
      "env": {
        "GOOGLE_ADS_CREDENTIALS": "PATH_TO_YAML"
      },
      "timeout": 30000,
      "trust": false
    }
  }
}

Once the server is running, you can interact with it using the Gemini CLI. Type /mcp in Gemini to see the Google Ads API server listed in the results.

For Local Development with Gemini CLI

Update your Gemini configuration to include the google-ads-mcp server. [DIRECTORY] will be the absolute path to the project. The following is an example of a local MCP server configuration:

{
  // Other configs...
  "mcpServers": {
    "GoogleAds": {
      "command": "uv",
      "args": [
        "run",
        "--directory",
        "[DIRECTORY]",
        "-m",
        "ads_mcp.server"
      ],
      "cwd": "[DIRECTORY]",
      "timeout": 30000,
      "trust": false
    }
  }
}

Once the server is running, you can interact with it using the Gemini CLI. Type /mcp in Gemini to see the Google Ads API server listed in the results.

You can then ask questions like:

  • "list all campaigns"
  • "show me metrics for campaign [CAMPAIGN_ID]"
  • "get all ad groups"

Direct Launch

To start the server directly, in the project path, run the following command:

uv run -m ads_mcp.server

The server will start and be ready to accept requests.

Contributing

We welcome contributions! Please see our CONTRIBUTING.md guide for details.

License

Google Ads MCP Server is an open-source project licensed under the APACHE-2.0 License.

Contact

If you have any questions, suggestions, or feedback, please feel free to open an issue.

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

Built Distribution

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

File details

Details for the file iflow_mcp_google_marketing_solutions_google_ads_mcp-0.6.1.tar.gz.

File metadata

  • Download URL: iflow_mcp_google_marketing_solutions_google_ads_mcp-0.6.1.tar.gz
  • Upload date:
  • Size: 27.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.2 {"installer":{"name":"uv","version":"0.10.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for iflow_mcp_google_marketing_solutions_google_ads_mcp-0.6.1.tar.gz
Algorithm Hash digest
SHA256 23acaf01bf351c69dc1916da22afc7b6620323466844cc0aa322e2440bdd978d
MD5 c4b76dbc84912d10274a1683409b8be2
BLAKE2b-256 20cfb857d68e538cc62e184513507eff0b20a30185074ba1aca7604cc4cc4590

See more details on using hashes here.

File details

Details for the file iflow_mcp_google_marketing_solutions_google_ads_mcp-0.6.1-py3-none-any.whl.

File metadata

  • Download URL: iflow_mcp_google_marketing_solutions_google_ads_mcp-0.6.1-py3-none-any.whl
  • Upload date:
  • Size: 31.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.2 {"installer":{"name":"uv","version":"0.10.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for iflow_mcp_google_marketing_solutions_google_ads_mcp-0.6.1-py3-none-any.whl
Algorithm Hash digest
SHA256 4d56f902785d41d3ee10969965c3df9b612a3338acb1b173135f5dc4e50db429
MD5 db233f8581a54a104c85e1c179efbf6e
BLAKE2b-256 b65804f398e6c9462342572fa4c93a8b2aab0c38bb8ac24ef848abfc47e09e0c

See more details on using hashes here.

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