Google Ads MCP Server

Google Ads MCP Server

Enables AI assistants to manage, report, and analyze Google Ads campaigns securely with encrypted multi-client support, real-time API integrations, and audit trail logging.

Category
Visit Server

README

Google Ads Model Context Protocol (MCP) Server

This is a Model Context Protocol (MCP) server that enables AI assistants (such as Gemini, ChatGPT, Claude, and Cursor) to manage, report, and analyze Google Ads campaigns securely.

It features an encrypted database storage for managing multiple client accounts, real-time Google Ads API integrations, and robust audit trail logging.


Features

  • Campaign Reporting: Query campaigns, budgets, keywords, search terms, ads, conversions, audience, and device performance metrics.
  • Campaign Mutations: Create campaigns, update budgets (with dry-run support), pause/resume campaigns, and add keywords or negative keywords.
  • Account Diagnostics: Automated account analysis to identify issues like budget constraints and list actionable optimization recommendations.
  • Cross-Client Performance Comparison: Compare metrics (Clicks, Cost, Conversions, CPA, ROAS) across all client accounts connected to the agency.
  • Encrypted Multi-Client Credentials: Securely store and encrypt OAuth refresh tokens in Supabase using AES-256-GCM.
  • Dual Transport Mode: Supports local command-line execution (stdio) and cloud-ready hosting (Streamable HTTP / SSE).
  • Comprehensive Audit Trails: Automatically logs every tool execution (reads and writes) to Supabase for enterprise compliance.

Setup & Local Development

1. Installation

Clone the repository and install dependencies:

npm install

2. Configure Environment Variables

Copy .env.example to a new file named .env and fill in your keys:

MOCK_MODE=false

# Supabase Configurations
SUPABASE_URL=https://your-project.supabase.co
SUPABASE_KEY=your-supabase-service-role-key
ENCRYPTION_KEY=your-32-character-encryption-key-here

# Google Ads API Credentials (from Google Cloud Console & Ads Manager Account)
GOOGLE_CLIENT_ID=your-google-oauth-client-id
GOOGLE_CLIENT_SECRET=your-google-oauth-client-secret
GOOGLE_DEVELOPER_TOKEN=your-google-ads-developer-token

Note: Set MOCK_MODE=true to test the server with simulated in-memory data without requiring Google Ads API credentials.

3. Generate OAuth Refresh Token

To allow the server to access a client's Google Ads account, run the OAuth helper script:

npx tsx src/utils/authHelper.ts
  1. Click the generated link to open the browser.
  2. Sign in with the client's Google account and grant Google Ads permissions.
  3. The script will output a Refresh Token in your terminal.

4. Register a Client

Save and encrypt the client's details in your Supabase database:

npx tsx src/utils/registerClient.ts <google_customer_id> "<client_name>" "<refresh_token>"

Example:

npx tsx src/utils/registerClient.ts 181-756-0637 "nexusdatabase" "1//0gL0Srx..."

Running the Server

Stdio Mode (Default Local)

To run the server locally on your machine (for Cursor, Claude Desktop, or Gemini CLI):

# Build TypeScript
npm run build

# Start server
npm start

Remote / Cloud Mode (Streamable HTTP / SSE)

Whenever a PORT environment variable is defined, the server will automatically start as a web server listening on /mcp.

$env:PORT="8080"
npm start

The server will now be accessible at http://0.0.0.0:8080/mcp.


Testing

Run the automated mock test suite to verify that all reporting, mutation, diagnostics, and database functions are working correctly:

npm test

Cloud Deployment

You can host this server on any cloud platform supporting Node.js (e.g., Render, Railway, or Heroku).

  1. Connect this repository to your hosting provider.
  2. Configure the following deployment commands:
    • Build Command: npm install && npm run build
    • Start Command: npm start
  3. Add your environment variables (from .env) in your cloud provider's dashboard.
  4. Connect your AI client (like Cursor or ChatGPT) directly using the hosted URL (e.g. https://your-app-name.render.com/mcp).

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
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
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
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
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
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