mcp-google-ads
An MCP tool that connects Google Ads with Claude AI/Cursor and others, allowing you to analyze your advertising data through natural language conversations. This integration gives you access to campaign information, performance metrics, keyword analytics, and ad management—all through simple chat with Claude, Cursor or Windsurf.
claude mcp add --transport stdio cohnen-mcp-google-ads npx -y mcp-google-ads \ --env GOOGLE_ADS_REFRESH_TOKEN="Refresh token (for OAuth flow)" \ --env GOOGLE_ADS_OAUTH_CLIENT_ID="OAuth client ID (if using OAuth 2.0)" \ --env GOOGLE_ADS_API_DEVELOPER_TOKEN="Your developer token" \ --env GOOGLE_ADS_OAUTH_CLIENT_SECRET="OAuth client secret" \ --env GOOGLE_ADS_SERVICE_ACCOUNT_KEY="Service account key JSON (for service account authentication)"
How to use
This MCP server provides a bridge between Google Ads data and Claude AI, enabling natural language conversations to access and analyze advertising metrics. Once set up, Claude can request account listings, GAQL queries, and performance metrics through the available tools. The core tools exposed by the server are: list_accounts to enumerate Google Ads accounts, execute_gaql_query to run a GAQL query with your account context, get_campaign_performance to fetch campaign-level metrics over a time range, get_ad_performance for ad-level insights, and run_gaql to execute arbitrary GAQL queries with output formats like table, JSON, or CSV. Authentication is handled via OAuth 2.0 or Service Account credentials, allowing secure access to the Google Ads API and token management. The server processes your requests, fetches data from Google Ads, and returns structured results suitable for visualization and further analysis in Claude or Cursor’s code editor.
How to install
Prerequisites:
- Node.js and npm (or access to npm via npx)
- A Google Ads API developer token and proper credentials (OAuth 2.0 client or service account)
- Basic familiarity with GAQL if you plan to build custom queries
Installation steps:
-
Ensure Node.js and npm are installed on your machine. Verify with: node -v npm -v
-
Install or run the MCP server package via npm/npx: npm install -g mcp-google-ads # or use npx -y mcp-google-ads
-
Prepare Google Ads credentials:
- For OAuth 2.0: obtain client_id, client_secret, and refresh_token
- For a Service Account: obtain the JSON key file and ensure the account has access to the Google Ads resources
-
Configure environment variables for authentication:
- GOOGlE_ADS_API_DEVELOPER_TOKEN: your developer token
- GOGlE_ADS_OAUTH_CLIENT_ID: your OAuth client ID
- GOGlE_ADS_OAUTH_CLIENT_SECRET: your OAuth client secret
- GOGlE_ADS_REFRESH_TOKEN: your OAuth refresh token
- OR GOGlE_ADS_SERVICE_ACCOUNT_KEY: path or contents of the service account key JSON
-
Run the MCP server: npx -y mcp-google-ads
-
Connect Claude or Cursor to the server using the exposed endpoints/tools as described in the README. If running locally, ensure network access to Google Ads API endpoints is allowed.
Additional notes
Tips and common considerations:
- Ensure your Google Ads developer token is approved for the API and that you meet any sandbox/production access requirements.
- If using OAuth, token refreshing is automatic in the server, but you may need to re-authenticate if refresh tokens become invalid.
- When using run_gaql, specify the account_id, the GAQL query, and the desired output format (table, JSON, or CSV).
- For service accounts, grant the service account access to the Google Ads accounts you want to query.
- If you encounter API quota errors, review your developer token quota and request quota increases if needed.
- Keep your credentials secure and do not hard-code sensitive tokens in shared files; use environment variables or secret managers.
- The available tools can be extended; if you add more GAQL-related endpoints, update Claude prompts to reflect new capabilities.
Related MCP Servers
MCP-Bridge
A middleware to provide an openAI compatible endpoint that can call MCP tools
mcp-rquest
A MCP server providing realistic browser-like HTTP request capabilities with accurate TLS/JA3/JA4 fingerprints for bypassing anti-bot measures. It also supports converting PDF and HTML documents to Markdown for easier processing by LLMs.
asterisk
Asterisk Model Context Protocol (MCP) server.
google-search-console
It connects directly to your Google Search Console account via the official API, letting you access key data right from AI tools like Claude Desktop or OpenAI Agents SDK and others .
system_information_mcp
DevEnvInfoServer - Cursor MCP Server for Development Environment Information
rednote-analyzer
MCP server that lets AI assistants search, analyze, and generate Xiaohongshu (小红书) content with real-time data via browser automation