<br />

Google Ad Manager offers a remote
[Model Context Protocol (MCP)](https://modelcontextprotocol.io/introduction)
server that lets AI agents to securely interact with Google Ad Manager
networks, inventory, orders, and user data. By configuring the Ad Manager MCP
server, you let AI applications like Google Antigravity, Claude, and ChatGPT
to perform actions as your Ad Manager user.

The MCP server is available at `https://admanager.googleapis.com/mcp`.

## Prerequisites

- Access to create Google Cloud projects or access to view an existing Google Cloud project.
- Access to edit connections or Apps in your AI clients (for example, ChatGPT or Claude).

## Configure the Ad Manager MCP server

To use the Ad Manager MCP server, you must complete the following steps:

- Enable the Ad Manager API in your Google Cloud project.
- Configure OAuth 2.0 end-user authentication.
- Add the MCP server to your AI client.

### Enable the Ad Manager API

To use the Ad Manager MCP server, you must enable the Ad Manager API in your
Google Cloud project. If you need to create a Google Cloud project, see
[New Project](https://console.cloud.google.com/projectcreate).

[Enable the API](https://console.cloud.google.com/flows/enableapi?apiid=admanager.googleapis.com)

### Configure authentication

The Ad Manager MCP server uses OAuth 2.0 for end-user authentication and
authorization. When an AI client connects to the MCP server, it
authenticates as the user running the AI client. The AI agent inherits the exact
Google Ad Manager user roles, network memberships, and permissions as the user.

1. In the Google Cloud console, go to **Google Auth Platform \> Branding**.

   [Go to Branding](https://console.cloud.google.com/auth/branding)
2. If you have already configured the **Google Auth Platform** , you can
   configure the following OAuth Consent Screen settings in
   [Branding](https://console.cloud.google.com/auth/branding),
   [Audience](https://console.cloud.google.com/auth/audience), and
   [Data Access](https://console.cloud.google.com/auth/scopes). If you see a message that says
   **Google Auth Platform not configured yet** , click **Get Started**:

   1. In the **App Information** section, for **App name** , enter `Ad Manager MCP Server` or your preferred name.
   2. In **User support email**, select your email address or an appropriate group.
   3. Click **Next**.
   4. For **Audience** , select **Internal**.
   5. Click **Next**.
   6. For **Contact Information** , enter an **Email address** where you can be notified about any changes to your project.
   7. Click **Next**.
   8. In the **Finish** section, review the [Google API Services User Data Policy](https://developers.google.com/terms/api-services-user-data-policy) and if you agree, select **I agree to the Google API Services: User Data Policy**.
   9. Click **Continue**.
   10. Click **Create**.
3. Click **Data Access \> Add or Remove Scopes**. A panel appears with a
   list of scopes for each API that you've enabled in your Google Cloud
   project.

   1. Under **Manually add scopes** , enter the OAuth scopes required for the Ad Manager MCP server:
      - `https://www.googleapis.com/auth/admanager` (Full access to view and manage campaigns)
   2. Click **Add to Table**.
   3. Click **Update**.
   4. After selecting the scopes required by your app, on the **Data Access** page, click **Save**.

### Add the MCP server to your AI client

To add the Ad Manager MCP server to your AI client, follow the
instructions for your client:

### Antigravity

To add the Ad Manager MCP server to Antigravity, complete the
following steps:

1. Create an OAuth 2.0 client ID and secret:

   1. In the Google API Console, go to
      **Google Auth Platform \> Clients \> Create client**.

      [Go to Create client](https://console.cloud.google.com/auth/clients/create)

      You are prompted to create a project if you don't have one selected.
   2. In the **Application type** list, select **Web application**.

   3. In the **Name** field, enter a name for your application.

   4. In the **Authorized redirect URIs** section, click **+ Add URI** , and then
      enter `https://antigravity.google/oauth-callback` in the **URIs** field.

   5. Click **Create**. The client is created.

      The **OAuth 2.0 client created** dialog opens.
   6. In the **Client secrets** section, copy the **Client secret** and save it
      in a secure place. You can only copy it once. If you lose it, delete the
      secret and create a new one.

      > [!CAUTION]
      > **Caution:** Treat client secrets like passwords and store them in a secure place.

2. To add the Ad Manager MCP server to Antigravity, update your
   `~/.gemini/config/mcp_config.json` file:

   ```json
   {
     "mcpServers": {
       "AdManager-MCP": {
         // Use your chosen MCP server URL.
         "serverUrl": "https://admanager.googleapis.com/mcp",
         "oauth": {
           "clientId": "CLIENT_ID",
           "clientSecret": "CLIENT_SECRET"
         }
       }
     }
   }
   ```

   Replace <var translate="no">CLIENT_ID</var> and <var translate="no">CLIENT_SECRET</var> with your
   OAuth 2.0 client credentials.
3. To authenticate the Ad Manager MCP server, see
   [Antigravity:
   Authenticate with OAuth](https://antigravity.google/docs/mcp#oauth).

### Claude.ai

To add the Ad Manager MCP server to Claude.ai, configure a
custom connector with an OAuth client ID and OAuth client secret:

1. Create an OAuth 2.0 client ID and secret:

   1. In the Google API Console, go to
      **Google Auth Platform \> Clients \> Create client**.

      [Go to Create client](https://console.cloud.google.com/auth/clients/create)

      You are prompted to create a project if you don't have one selected.
   2. In the **Application type** list, select **Web application**.

   3. In the **Name** field, enter a name for your application.

   4. In the **Authorized redirect URIs** section, click **+ Add URI** , and then
      enter `https://claude.ai/api/mcp/auth_callback` in the **URIs** field.

   5. Click **Create**. The client is created.

      The **OAuth 2.0 client created** dialog opens.
   6. In the **Client secrets** section, copy the **Client secret** and save it
      in a secure place. You can only copy it once. If you lose it, delete the
      secret and create a new one.

      > [!CAUTION]
      > **Caution:** Treat client secrets like passwords and store them in a secure place.

2. Follow the instructions to [create a custom connector](https://support.claude.com/en/articles/11175166-get-started-with-custom-connectors-using-remote-mcp). Enter your Client ID and secret in the **Advanced settings** menu.

### Claude Code

To add the Ad Manager MCP server to Claude Code, configure a
custom connector with an OAuth client ID and OAuth client secret:

1. [Install Claude Code](https://code.claude.com/docs/en/quickstart).
2. Create an OAuth 2.0 client ID and secret:

   1. In the Google API Console, go to
      **Google Auth Platform \> Clients \> Create client**.

      [Go to Create client](https://console.cloud.google.com/auth/clients/create)

      You are prompted to create a project if you don't have one selected.
   2. In the **Application type** list, select **Web application**.

   3. In the **Name** field, enter a name for your application.

   4. In the **Authorized redirect URIs** section, click **+ Add URI** , and then
      enter `https://claude.ai/api/mcp/auth_callback` in the **URIs** field.

   5. Click **Create**. The client is created.

      The **OAuth 2.0 client created** dialog opens.
   6. In the **Client secrets** section, copy the **Client secret** and save it
      in a secure place. You can only copy it once. If you lose it, delete the
      secret and create a new one.

      > [!CAUTION]
      > **Caution:** Treat client secrets like passwords and store them in a secure place.

3. Follow the instructions to [create a custom connector](https://support.claude.com/en/articles/11175166-get-started-with-custom-connectors-using-remote-mcp). Enter your Client ID and secret in the **Advanced settings** menu.

### Claude Desktop

To add the Ad Manager MCP server to Claude Desktop,
configure a custom connector with an OAuth client ID and OAuth client
secret:

1. [Install Claude Desktop](https://support.claude.com/en/articles/10065433-install-claude-desktop).
2. Create an OAuth 2.0 client ID and secret:

   1. In the Google API Console, go to
      **Google Auth Platform \> Clients \> Create client**.

      [Go to Create client](https://console.cloud.google.com/auth/clients/create)

      You are prompted to create a project if you don't have one selected.
   2. In the **Application type** list, select **Web application**.

   3. In the **Name** field, enter a name for your application.

   4. In the **Authorized redirect URIs** section, click **+ Add URI** , and then
      enter `https://claude.ai/api/mcp/auth_callback` in the **URIs** field.

   5. Click **Create**. The client is created.

      The **OAuth 2.0 client created** dialog opens.
   6. In the **Client secrets** section, copy the **Client secret** and save it
      in a secure place. You can only copy it once. If you lose it, delete the
      secret and create a new one.

      > [!CAUTION]
      > **Caution:** Treat client secrets like passwords and store them in a secure place.

3. Follow the instructions to [create a custom connector](https://support.claude.com/en/articles/11175166-get-started-with-custom-connectors-using-remote-mcp). Enter your Client ID and secret in the **Advanced settings** menu.

### ChatGPT

You must have a [ChatGPT Business
subscription](https://chatgpt.com/business/) to use the Ad Manager MCP server with
ChatGPT.

To add the MCP server to ChatGPT, create a
Google OAuth 2.0 client ID and secret, and then add the MCP server as an
App in ChatGPT.

#### Create an OAuth 2.0 client ID and secret

1. In the Google API Console, go to
   **Google Auth Platform \> Clients \> Create client**.

   [Go to Create client](https://console.cloud.google.com/auth/clients/create)

   You are prompted to create a project if you don't have one selected.
2. In the **Application type** list, select **Web application**.

3. In the **Name** field, enter a name for your application.

4. In the **Authorized redirect URIs** section, click **+ Add URI** , and then
   enter `https://chatgpt.com/connector_platform_oauth_redirect` in the **URIs** field.

5. Click **Create**. The client is created.

   The **OAuth 2.0 client created** dialog opens.
6. In the **Client secrets** section, copy the **Client secret** and save it
   in a secure place. You can only copy it once. If you lose it, delete the
   secret and create a new one.

   > [!CAUTION]
   > **Caution:** Treat client secrets like passwords and store them in a secure place.

#### Add the MCP server as an app in ChatGPT

1. Sign in to ChatGPT.
2. [Turn on Developer mode](https://developers.openai.com/api/docs/guides/developer-mode).
3. Open [ChatGPT Apps settings](https://chatgpt.com/#settings/Connectors).
4. Click **Create app** and create an app for the remote MCP server.
5. In the OAuth section, provide your client ID and secret.
6. Confirm that you understand the risk associated with MCP server use, and then click **Create**.

The MCP server is displayed in the **Apps** menu, and is ready for
use through chat prompts.

### Cursor

To add the Ad Manager MCP server to Cursor, create a
client ID and secret. Configure the MCP server with static OAuth.
Cursor uses redirect URIs depending what you use to access
Cursor--- such as through a web or a desktop application.

1. Create an OAuth 2.0 client ID and secret:

   ### Web or Cursor agents

   1. In the Google API Console, go to
      **Google Auth Platform \> Clients \> Create client**.

      [Go to Create client](https://console.cloud.google.com/auth/clients/create)

      You are prompted to create a project if you don't have one selected.
   2. In the **Application type** list, select **Web application**.

   3. In the **Name** field, enter a name for your application.

   4. In the **Authorized redirect URIs** section, click **+ Add URI** , and then
      enter `https://www.cursor.com/agents/mcp/oauth/callback` in the **URIs** field.

   5. Click **Create**. The client is created.

      The **OAuth 2.0 client created** dialog opens.
   6. In the **Client secrets** section, copy the **Client secret** and save it
      in a secure place. You can only copy it once. If you lose it, delete the
      secret and create a new one.

      > [!CAUTION]
      > **Caution:** Treat client secrets like passwords and store them in a secure place.

   ### Desktop

   1. In the Google API Console, go to
      **Google Auth Platform \> Clients \> Create client**.

      [Go to Create client](https://console.cloud.google.com/auth/clients/create)

      You are prompted to create a project if you don't have one selected.
   2. In the **Application type** list, select **Web application**.

   3. In the **Name** field, enter a name for your application.

   4. In the **Authorized redirect URIs** section, click **+ Add URI** , and then
      enter `http://localhost:8787/callback` in the **URIs** field.

   5. Click **Create**. The client is created.

      The **OAuth 2.0 client created** dialog opens.
   6. In the **Client secrets** section, copy the **Client secret** and save it
      in a secure place. You can only copy it once. If you lose it, delete the
      secret and create a new one.

      > [!CAUTION]
      > **Caution:** Treat client secrets like passwords and store them in a secure place.

2. To add the Ad Manager MCP server to Cursor, update your
   `~/.cursor/mcp.json` or `.cursor/mcp.json` file:

   ```json
   {
     "mcpServers": {
       "AdManager-MCP": {
         // Use your chosen MCP server URL.
         "url": "https://admanager.googleapis.com/mcp",
         "auth": {
           "CLIENT_ID": "CLIENT_ID",
           "CLIENT_SECRET": "CLIENT_SECRET",
           // Use the OAuth scopes required for your chosen MCP server.
           "scopes": ["https://www.googleapis.com/auth/admanager"]
         }
       }
     }
   }
   ```

   Replace <var translate="no">CLIENT_ID</var> and <var translate="no">CLIENT_SECRET</var> with your
   OAuth 2.0 client credentials.
3. [Use the MCP server
   in Chat](https://cursor.com/docs/mcp#using-mcp-in-chat).

## Test the Ad Manager MCP server

After you configure and authenticate your MCP client, you can verify the
connection by running test prompts in your AI chat interface.

Try asking your AI client the following questions:

- **"List the Google Ad Manager networks I have access to."**

  The client calls `list_networks` to retrieve and display the Ad Manager
  network codes and display names associated with your user account.
- **"Find details for network code `NETWORK_CODE`."**

  The client uses `get_network` to fetch metadata for the specified network.
- **"Show the first 5 orders in network `NETWORK_CODE`."**

  The client invokes `list_orders` to query orders in your network and
  summarize them.

If the tools run successfully and return Google Ad Manager data,
your MCP server connection is configured correctly.