Skip to main content
Glama

google-ads-mcp-server

by gomarble-ai
env.example5.13 kB
# Google Ads MCP Server Configuration # Copy this file to .env and update with your actual values # ============================================================================ # AUTHENTICATION TYPE # ============================================================================ # Choose authentication method: "oauth" or "service_account" GOOGLE_ADS_AUTH_TYPE=oauth # ============================================================================ # OAUTH 2.0 CONFIGURATION (for GOOGLE_ADS_AUTH_TYPE=oauth) # ============================================================================ # OPTION 1: Use downloaded client secret JSON file (RECOMMENDED) # Download OAuth 2.0 Client ID credentials from Google Cloud Console # and specify the path to the downloaded JSON file GOOGLE_ADS_CREDENTIALS_PATH=/path/to/client_secret_xxxxx.apps.googleusercontent.com.json # OPTION 2: Use environment variables (if no JSON file) # If you don't have a client secret file, you can set these manually: # GOOGLE_ADS_CLIENT_ID=your_client_id_here.apps.googleusercontent.com # GOOGLE_ADS_CLIENT_SECRET=your_client_secret_here # ============================================================================ # SERVICE ACCOUNT CONFIGURATION (for GOOGLE_ADS_AUTH_TYPE=service_account) # ============================================================================ # If using service account, point to your service account key JSON file: # GOOGLE_ADS_CREDENTIALS_PATH=/path/to/service_account_key.json # GOOGLE_ADS_IMPERSONATION_EMAIL=user@example.com # Optional: for domain-wide delegation # ============================================================================ # GOOGLE ADS API CONFIGURATION # ============================================================================ # Your Google Ads Developer Token (required) GOOGLE_ADS_DEVELOPER_TOKEN=your_developer_token_here # Optional: Manager Account ID (for MCC accounts) GOOGLE_ADS_LOGIN_CUSTOMER_ID=your_manager_account_id # ============================================================================ # HOW THE CREDENTIALS PATH WORKS: # ============================================================================ # # For OAuth (GOOGLE_ADS_AUTH_TYPE=oauth): # - If GOOGLE_ADS_CREDENTIALS_PATH points to a client secret JSON file: # * The app reads OAuth config from the file # * Saves tokens to a new file in the same directory # # - If GOOGLE_ADS_CREDENTIALS_PATH points to a saved token file: # * The app loads existing tokens # * Refreshes them automatically when needed # # - If the file doesn't exist: # * The app uses GOOGLE_ADS_CLIENT_ID and GOOGLE_ADS_CLIENT_SECRET # * Creates OAuth config from environment variables # * Saves new tokens to GOOGLE_ADS_CREDENTIALS_PATH # # For Service Account (GOOGLE_ADS_AUTH_TYPE=service_account): # - GOOGLE_ADS_CREDENTIALS_PATH must point to service account key JSON file # ============================================================================ # ============================================================================ # QUICK SETUP EXAMPLES: # ============================================================================ # # Example 1: OAuth with downloaded client secret file # GOOGLE_ADS_AUTH_TYPE=oauth # GOOGLE_ADS_CREDENTIALS_PATH=./client_secret_123456.apps.googleusercontent.com.json # GOOGLE_ADS_DEVELOPER_TOKEN=your_dev_token # # Example 2: OAuth with environment variables # GOOGLE_ADS_AUTH_TYPE=oauth # GOOGLE_ADS_CREDENTIALS_PATH=./google_ads_token.json # GOOGLE_ADS_CLIENT_ID=123456.apps.googleusercontent.com # GOOGLE_ADS_CLIENT_SECRET=your_client_secret # GOOGLE_ADS_DEVELOPER_TOKEN=your_dev_token # # Example 3: Service Account # GOOGLE_ADS_AUTH_TYPE=service_account # GOOGLE_ADS_CREDENTIALS_PATH=./service_account_key.json # GOOGLE_ADS_DEVELOPER_TOKEN=your_dev_token # ============================================================================ # ============================================================================= # REQUIRED FILES # ============================================================================= # You need to create these files in your project directory: # # 1. client_secret.json - Download from Google Cloud Console # - Go to: https://console.cloud.google.com/apis/credentials # - Create OAuth 2.0 Client ID (Desktop Application) # - Set redirect URI to: https://localhost:3000/api/authorise/google/callback # - Download and save as client_secret.json # # 2. credentials.json - Auto-generated after first OAuth authentication # - Contains access token and refresh token # - Created automatically when you run generate_google_ads_token # ============================================================================= # NOTES # ============================================================================= # 1. OAuth setup requires client_secret.json from Google Cloud Console # # 2. Customer IDs are discovered automatically - no need to configure them here # # 3. After authentication, tokens are stored in credentials.json in your project directory # # 4. The redirect URI for OAuth must be: https://localhost:3000/api/authorise/google/callback

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/gomarble-ai/google-ads-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server