Google Ads MCP

Google Ads MCP

A private, read-only MCP server that enables retrieval and analysis of Google Ads reporting data (campaigns, ad groups, keywords, search terms, cost, conversions) from authorized accounts through a locally operated server.

Category
访问服务器

README

Google Ads MCP — Internal Reporting Prototype

A private, read-only MCP integration prototype for retrieving and analyzing Google Ads reporting data from authorized accounts.

Status: Development prototype. Not intended for public SaaS usage.

This project is under active development. The read-only tool interfaces and documentation are complete, but the live Google Ads API calls have not yet been fully tested end-to-end against a production developer token. Parts of the client are intentionally marked with TODO until they are verified.


What this is

Google Ads MCP is a small tool that connects Claude Code (or any MCP-compatible client) to the Google Ads API through a locally operated Model Context Protocol server. It exposes a handful of read-only reporting functions so that an authorized developer can pull campaign, ad group, keyword, search-term, cost and conversion data into an analysis workflow.

It is a personal / internal developer tool. It is not a public product, it is not offered as a SaaS, and it does not resell or redistribute Google Ads data.

Features

  • List accessible Google Ads accounts
  • List client accounts connected to a manager account (MCC)
  • Retrieve campaign performance
  • Retrieve ad group performance
  • Retrieve keyword performance
  • Retrieve search terms
  • Retrieve conversion metrics
  • Retrieve daily spend
  • Return structured JSON for analysis in Claude Code

Limitations (by design)

This tool is deliberately constrained. It is read-only and cannot change anything in a Google Ads account:

  • Read-only — no write / mutate operations of any kind
  • No campaign creation
  • No budget changes
  • No bid changes
  • No pausing or deleting campaigns
  • No access to accounts without explicit authorization
  • No public user access

Architecture

Claude Code
  → local MCP server
    → official Google Ads Python client
      → Google Ads API
        → authorized Google Ads manager and client accounts

All components run locally on the developer's machine. Credentials never leave the local environment, and no intermediate server is involved. See docs/ARCHITECTURE.md for details.

Installation

Requires Python 3.12+.

python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
cp .env.example .env

Then edit .env and fill in your own credentials (see below).

Environment variables

Copy .env.example to .env and provide your own values:

GOOGLE_ADS_DEVELOPER_TOKEN=
GOOGLE_ADS_CLIENT_ID=
GOOGLE_ADS_CLIENT_SECRET=
GOOGLE_ADS_REFRESH_TOKEN=
GOOGLE_ADS_LOGIN_CUSTOMER_ID=

⚠️ Never commit real credentials. Store secrets only in a local .env file or a secure secret manager. The provided .gitignore already excludes .env and common credential files.

Running the MCP server

python -m google_ads_mcp.server

Note: the server registers the read-only tools and validates configuration on startup. Live Google Ads queries require a valid developer token and OAuth refresh token and have not yet been fully validated — see the project status note above.

Running tests

pip install -r requirements.txt
pytest

The current test suite covers configuration loading and customer-ID normalization / validation. It does not make live API calls.

Google Ads API compliance

  • Only Google Ads accounts for which the authenticated user has explicit authorization are accessed.
  • Data is used solely for internal reporting, auditing and optimization analysis.
  • Credentials are never logged.
  • Data is not sold or redistributed.
  • The tool is not offered to the general public.

See docs/SECURITY.md, docs/PRIVACY.md and docs/GOOGLE_ADS_API_TOOL_DESIGN.md for the full policy and design documentation.

Documentation

Document Purpose
docs/GOOGLE_ADS_API_TOOL_DESIGN.md Full tool design document for the Google Ads API application
docs/ARCHITECTURE.md Technical architecture and data flow
docs/SECURITY.md Security controls and procedures
docs/PRIVACY.md Privacy policy for handled data
docs/BASIC_ACCESS_APPLICATION.md Prepared answers for the Basic Access application form

License

MIT

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选