How davidmosiah/google-ads-mcp-unofficial works
This repository is a local-first MCP server that lets AI agents inspect Google Ads accounts, analyze performance, and make explicitly authorized, gated changes. The principal workflow is: an agent invokes an MCP tool, the tool applies configuration and privacy rules, the Google Ads client fetches or mutates account data, and the tool returns a formatted response. Setup and OAuth establish credentials; diagnostics, reporting, profile, inventory, and audit tools provide supporting capabilities. Relationships are based on the README and SOURCE INDEX references; unsampled tool internals are represented at the module level.
Main entry points: google-ads-tools.ts MCP Tools · google-ads-client.ts Google Ads Client · commands.ts CLI Commands · auth.ts OAuth Flow
Components 25
MCP And CLI
- Server Entry
src/index.ts - CLI Commands
src/cli/commands.ts - CLI Tool Calls
src/cli/tool-calls.ts - Agent Manifest
src/services/agent-manifest.ts
Setup And Credentials
- Setup Wizard
src/cli/setup.ts - OAuth Flow
src/cli/auth.ts - Config Resolution
src/services/config.ts - Local Config
src/services/local-config.ts - Token Store
src/services/token-store.ts
Google Ads Operations
- MCP Tools
src/tools/google-ads-tools.ts - Google Ads Client
src/services/google-ads-client.ts - SQLite Cache
src/services/cache.ts - HTTP Retry
src/services/http-retry.ts - Response Formatting
src/services/format.ts - Tool Schemas
src/schemas/common.ts
Privacy And Diagnostics
- Privacy Modes
src/services/privacy.ts - Redaction
src/services/redaction.ts - Privacy Audit
src/services/audit.ts - Shared Profile
src/services/profile-store.ts - Connection Status
src/services/connection-status.ts - Capabilities
src/services/capabilities.ts - Data Inventory
src/services/inventory.ts
Other components
- AI Agent
- Google Ads API
- Google OAuth
Connections 32
- AI Agent → Server Entry: invokes MCP
README.md - Server Entry → MCP Tools: registers tools
src/index.ts - Server Entry → CLI Commands: dispatches commands
src/index.ts - CLI Commands → Setup Wizard: runs setup
src/cli/commands.ts - CLI Commands → OAuth Flow: runs auth
src/cli/commands.ts - CLI Commands → CLI Tool Calls: runs tool call
src/cli/commands.ts - CLI Tool Calls → MCP Tools: calls tool
src/cli/tool-calls.ts - Setup Wizard → Local Config: writes config
src/cli/setup.ts - Setup Wizard → OAuth Flow: starts OAuth
src/cli/setup.ts - OAuth Flow → Config Resolution: loads config
src/cli/auth.ts - OAuth Flow → Google Ads Client: exchanges code
src/cli/auth.ts - Google Ads Client → Google OAuth: requests tokens
src/services/google-ads-client.ts - Google Ads Client → Token Store: stores tokens
src/services/google-ads-client.ts - MCP Tools → Google Ads Client: queries account
src/tools/google-ads-tools.ts - Google Ads Client → Google Ads API: sends API requests
README.md - Google Ads Client → SQLite Cache: reads or writes
src/services/google-ads-client.ts - Google Ads Client → HTTP Retry: retries requests
src/services/google-ads-client.ts - MCP Tools → Tool Schemas: validates inputs
src/tools/google-ads-tools.ts - MCP Tools → Config Resolution: resolves settings
src/tools/google-ads-tools.ts - Config Resolution → Local Config: loads sources
src/services/config.ts - MCP Tools → Response Formatting: formats responses
src/tools/google-ads-tools.ts - MCP Tools → Privacy Modes: resolves mode
src/tools/google-ads-tools.ts - Privacy Modes → Redaction: redacts output
src/services/privacy.ts - MCP Tools → Redaction: redacts identifiers
src/tools/google-ads-tools.ts - MCP Tools → Privacy Audit: runs audit
src/tools/google-ads-tools.ts - MCP Tools → Shared Profile: reads or updates
src/tools/google-ads-tools.ts - MCP Tools → Connection Status: checks connection
src/tools/google-ads-tools.ts - MCP Tools → Capabilities: reports capabilities
src/tools/google-ads-tools.ts - MCP Tools → Data Inventory: reports inventory
src/tools/google-ads-tools.ts - MCP Tools → Agent Manifest: provides manifest
src/tools/google-ads-tools.ts - CLI Commands → Connection Status: runs diagnostics
src/cli/commands.ts - CLI Commands → Agent Manifest: selects client
src/cli/commands.ts