Google Ads MCP Server

Google Ads MCP Server

A free MCP server that brings Google Ads API into Claude Code, translating natural language queries into GAQL or mutation operations, with safety guardrails and change history for undo.

Category
Visit Server

README

google-ads-mcp

Собствен MCP сървър към Google Ads API. Дава ти Google Ads директно в терминала през Claude Code: питаш на човешки език, а сървърът превежда въпроса в GAQL заявка или в mutate операция срещу реалния акаунт.

Заменя платените wrapper-и, които таксуват на „connected account". Тук цената е нула - Google Ads API е безплатен, а един MCC покрива всичките си дъщерни акаунти.

Node, нула зависимости освен MCP SDK-то. Използва вградения fetch и REST-а на Google Ads API, без protobuf библиотеката.

Инсталация: виж SETUP.md. Там е целият процес от нула - Node, developer token, Google Cloud, OAuth, вързване към Claude Code и проверка, че работи.


Инструменти (18)

Четене

Инструмент За какво
list_accounts Цялото дърво под MCC-то. Оттук вадиш customerId.
run_gaql Произволна GAQL заявка. Основният read инструмент.
run_gaql_multi До 20 заявки паралелно, може срещу различни акаунти.
describe_fields Метаданни за GAQL полета - вместо да гадаеш имена.
account_overview Готов одит на акаунт с едно извикване.
change_history Историята от Google, включително ръчните промени в UI-я.

Писане

Инструмент За какво
mutate Сурови операции, всякакъв ресурс. По подразбиране validateOnly.
set_status Bulk pause/enable/remove на кампании, ad groups, реклами, думи.
set_campaign_budget Дневен бюджет, с проверка за споделен бюджет.
set_bid CPC бидове, bulk.
add_keywords Позитивни думи в ad group.
add_negative_keywords Негативни думи на ниво кампания или ad group.
create_responsive_search_ad RSA, по подразбиране PAUSED.

Контрол

Инструмент За какво
list_changes Локалният change log, с ID за връщане назад.
undo_change Връща промяна назад от снимката ѝ.
get_guardrails / set_guardrails Предпазните правила.
check_connection Диагностика.

Безопасност

Всяко писане минава през src/apply.js: guardrails → снимка на старите стойности → mutate → запис в change log.

Guardrails (~/.google-ads-mcp/guardrails.json):

{
  "readOnlyAccounts": [],
  "blockedAccounts": [],
  "writeAllowlist": [],
  "maxBudgetIncreasePct": 50,
  "maxDailyBudget": null,
  "requireConfirmForRemove": true,
  "maxOperationsPerCall": 500
}

writeAllowlist е най-силният предпазител: ако не е празен, писане е позволено само в изброените акаунти. Сложи един тестов акаунт, докато свикнеш, и всички останали са защитени.

Undo (~/.google-ads-mcp/changes.jsonl) - преди всеки update се снима старата стойност на полетата от updateMask, за да може undo_change да я върне.

Две честни ограничения:

  • REMOVE е необратим. Google Ads API няма un-remove. Затова set_status с REMOVED иска confirm: true, а по подразбиране се препоръчва PAUSED.
  • Полета, които не са четими през GAQL, не могат да се снимат. Тогава промяната се записва в лога, но list_changes я маркира undoable: false.

Поддръжка

Версия на API-то. По подразбиране v24. Google мина на месечен цикъл през 2026. Всяка версия живее около година. Смяната е един ред в ~/.google-ads.env:

GOOGLE_ADS_API_VERSION=v25

Тест след промени:

npm test        # MCP handshake, схеми, guardrails - не пипа мрежата
npm run doctor  # реална връзка към Google

Файлове

google-ads-mcp/
  SETUP.md              инсталация от нула
  src/index.js          MCP сървър, регистрация на инструментите
  src/config.js         зареждане на ~/.google-ads.env
  src/auth.js           OAuth refresh + кеш на access token
  src/client.js         REST слой (searchStream, mutate, грешки)
  src/apply.js          guardrails → снимка → mutate → лог
  src/guardrails.js     предпазни правила
  src/changelog.js      change log и undo
  src/tools/            read.js · write.js · ops.js
  bin/oauth.js          еднократен OAuth flow
  bin/doctor.js         диагностика от терминала
  test/smoke.mjs        offline тест

~/.google-ads.env       креденшъли (chmod 600)
~/.google-ads-mcp/      guardrails.json · changes.jsonl

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured
E2B

E2B

Using MCP to run code via e2b.

Official
Featured