GG

googleads/google-ads-mcp

Developer tools

Эта страница переведена автоматически. Технические детали смотрите в оригинале. Открыть оригинал

1,1 тыс. stars 342 forks Качество 89 Тренд 50Apache-2.0

Этот репозиторий содержит исходный код для запуска MCP-сервера, взаимодействующего с API Google Ads.

Обзор

Этот репозиторий содержит исходный код для запуска MCP-сервера, взаимодействующего с API Google Ads. Сервер использует API Google Ads для предоставления нескольких инструментов и ресурсов для использования с LLM и AI-агентами. - поиск: Получает информацию об аккаунте Google Ads. - get_resource_metadata: Получает метаданные о типе ресурса Google Ads API, например «campaign». Это полезно для понимания структуры данных и доступных полей для запроса. - list_accessible_customers: Возвращает идентификаторы клиентов, напрямую доступные пользователям, аутентифицирующим вызов. Сервер Google Ads MCP использует tools_config.yaml, чтобы вы могли избирательно включать или отключать отдельные инструменты или категории инструментов (пространства имён) и настраивать их префиксы пространства имён. Стандартный tools_config.yaml с включёнными всеми инструментами идёт в комплекте, так что сервер работает сразу без дополнительной настройки.

Обзор (машинный перевод)

Этот репозиторий содержит исходный код для запуска MCP-сервер, который взаимодействует с API Google Ads.

Инструменты

Сервер использует Google Ads API чтобы предоставить несколько Инструменты и ресурсы для использования с LLM и AI-агентами.

Доступные инструменты

  • search: Получает информацию об аккаунте Google Ads.
  • get_resource_metadata: Получает метаданные о типе ресурса Google Ads API, например, «campaign». Это полезно для понимания структуры данных и доступных полей для запросов.
  • list_accessible_customers: Возвратные идентификаторы клиентов, доступные напрямую пользователем аутентификация вызова.

Инструменты настройки и промежутка названий

Сервер Google Ads MCP использует tools_config.yaml, позволяя избирательно включать или отключать отдельные инструменты или категории инструментов (пространства имён) и настраивать их префиксы пространства имён.

Стандартный tools_config.yaml с включёнными всеми инструментами входит в комплект, так что сервер работает сразу без дополнительной настройки. Для настройки установки сервер разрешает конфигурацию в следующем порядке:

  1. Явный набор путей через переменную окружения GOOGLE_ADS_MCP_TOOLS_CONFIG.
  2. A 'tools_config.

Эта страница переведена автоматически. Технические детали смотрите в оригинале.

README

Показан фрагмент оригинального README. Открыть оригинал.

Google Ads MCP Server

This repo contains the source code for running an MCP server that interacts with the Google Ads API.

Tools

The server uses the Google Ads API to provide several Tools and Resources for use with LLMs and AI agents.

Tools available

  • search: Retrieves information about the Google Ads account.
  • get_resource_metadata: Retrieves metadata about a Google Ads API resource type, for example “campaign”. This is useful to understand the structure of the data and what fields are available for querying.
  • list_accessible_customers: Returns ids of customers directly accessible by the user authenticating the call.

Configuring and Namespacing Tools

The Google Ads MCP server uses the tools_config.yaml to let you selectively enable or disable individual tools or tool categories (namespaces) and customize their namespace prefixes.

A default tools_config.yaml with all tools enabled is bundled with the package, so the server works out of the box with no extra setup. To customize your installation, the server resolves the configuration in the following order:

  1. An explicit path set via the GOOGLE_ADS_MCP_TOOLS_CONFIG environment variable.
  2. A tools_config.yaml file in the current working directory.
  3. The default tools_config.yaml bundled with the package.

If an explicitly requested configuration file (via the environment variable) is missing, or any resolved file is invalid, the server raises an error and fails to start.

Configuration Example:

namespaces:
  # Option 1: Enable category 'customers' with default prefix -> "customers_list_accessible_customers"
  customers: true

  # Option 2: Enable category 'search' with a custom prefix -> "query_search"
  search: "query"

  # Option 3: Fine-grained control over tools in a category
  metadata:
    enabled: true
    prefix: "metadata"
    enabled_tools:
      - get_resource_metadata: true

Resources available

  • discovery-document: Retrieve the Google Ads API discovery document. Provides the discovery document for the latest version of the Google Ads API, which describes the API surface, including resources, methods, and schemas. Host LLMs should access this resource to understand the structure of the Google Ads API and discover available features.
  • metrics: Retrieve information about the metrics available for reporting in the Google Ads API.
  • segments: Retrieve information about the segments available for reporting in the Google Ads API.
  • release-notes: Retrieve the release notes for the latest version of the Google Ads API.

Notes

  1. The MCP Server will expose your data to the Agent or LLM that you connect to it.
Открыть полный README на GitHub

Установка

This server does not publish a one-line install command.

Open the repository installation guide Новичок в MCP? Начните с руководства на mcpskill.org →

Конфигурация

{ "mcpServers": { "google-ads-mcp": { "serverUrl": "http://localhost:8080/mcp" } } }