Webtangular/google-ads-mcp
If you are the rightful owner of google-ads-mcp and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
A comprehensive Model Context Protocol (MCP) server providing Google Ads API integration.
Google Ads MCP Server
A comprehensive Model Context Protocol (MCP) server providing Google Ads API integration. This tool enables you to manage Google Ads campaigns, keywords, ads, conversions, and performance metrics programmatically.
🚀 About
This MCP server is designed to integrate Google Ads API with Claude Desktop or other MCP-compatible applications. Written in TypeScript, it serves as a powerful bridge for programmatically managing your Google Ads accounts.
🎯 Key Features
- Account Management: Manage multiple Google Ads accounts
- Campaign Creation & Management: Search, Display, Shopping, Video campaign types
- Ad Group Management: Bidding strategies and budget control
- Keyword Management: Add/edit positive and negative keywords
- Performance Tracking: Detailed metrics and reporting
- Conversion Tracking: Conversion action management
📋 Available Tools
🎯 Campaign Tools
list_campaigns- List all campaigns with performance metricscreate_campaign- Create new campaign (Search, Display, Shopping, Video, Multi-channel)update_campaign- Update campaign settings (name, status, budget)
📁 Ad Group Tools
list_ad_groups- List ad groups with metricscreate_ad_group- Create new ad groupupdate_ad_group- Update ad group settingsget_ad_group- Get specific ad group details
📢 Ad Tools
list_ads- List ads with performance datacreate_responsive_search_ad- Create responsive search adsupdate_ad_status- Update ad status
🔍 Keyword Tools
list_keywords- List keywords with performance dataadd_keywords- Add new keywords to ad groupadd_negative_keywords- Add negative keywords (campaign or ad group level)update_keyword- Update keyword status and bid
🎯 Conversion Tracking Tools
list_conversions- List all conversion actionscreate_conversion- Create new conversion actionupdate_conversion- Update conversion settings
📊 Performance & Analytics Tools
get_account_performance- Account-level performance metricsget_campaign_performance- Campaign performance report (daily segmentation)get_ad_group_performance- Ad group performance reportget_search_terms_report- Search terms analysis
🛍️ Shopping Campaign Tools
get_shopping_performance- Shopping campaign performanceget_product_performance- Product-based performance analysis
👤 Account Management Tools
list_accounts- List all accessible Google Ads accountsget_account_hierarchy- Show Manager/Client account relationships
🛠️ Installation Steps
1. Prerequisites
- Node.js (v18 or higher)
- npm or yarn
- Google Ads API access
- Claude Desktop (for MCP integration)
2. Clone the Repository
git clone https://github.com/yourusername/google-ads-mcp.git
cd google-ads-mcp
3. Install Dependencies
npm install
4. Obtain Google Ads API Credentials
a) Get Developer Token
- Visit https://developers.google.com/google-ads/api/docs/get-started/dev-token
- Sign in with your Google Ads account
- Apply for a developer token
b) Create OAuth2 Credentials
- Go to https://console.cloud.google.com/
- Create a new project or select existing one
- Navigate to "APIs & Services" > "Credentials"
- Click "Create Credentials" > "OAuth client ID"
- Select "Desktop app" as application type
- Save your Client ID and Client Secret
c) Get Refresh Token
- Use Google OAuth2 Playground: https://developers.google.com/oauthplayground/
- Or use helper scripts from Google Ads API examples
5. Set Environment Variables
Copy .env.example to .env and fill in your values:
cp .env.example .env
Edit .env file:
GOOGLE_ADS_CLIENT_ID=your-client-id-here
GOOGLE_ADS_CLIENT_SECRET=your-client-secret-here
GOOGLE_ADS_DEVELOPER_TOKEN=your-developer-token-here
GOOGLE_ADS_REFRESH_TOKEN=your-refresh-token-here
GOOGLE_ADS_CUSTOMER_ID=your-customer-id-here
# For manager accounts (optional)
GOOGLE_ADS_LOGIN_CUSTOMER_ID=your-login-customer-id-here
6. Build the Project
npm run build
7. Claude Desktop Configuration
To add the MCP server to Claude Desktop:
- Open Claude Desktop settings
- Use the example from
claude-desktop-config.example.jsonto configure:
{
"mcpServers": {
"google-ads": {
"command": "node",
"args": ["/absolute/path/to/google-ads-mcp/dist/index.js"],
"env": {
"GOOGLE_ADS_CLIENT_ID": "your-client-id",
"GOOGLE_ADS_CLIENT_SECRET": "your-client-secret",
"GOOGLE_ADS_DEVELOPER_TOKEN": "your-developer-token",
"GOOGLE_ADS_REFRESH_TOKEN": "your-refresh-token",
"GOOGLE_ADS_CUSTOMER_ID": "your-customer-id"
}
}
}
}
- Restart Claude Desktop
💻 Development
Run in Development Mode
npm run dev
Production Build
npm run build
Start in Production Mode
npm start
🏗️ Project Structure
google-ads-mcp/
├── src/
│ ├── index.ts # Main MCP server file
│ ├── config.ts # Configuration management
│ ├── google-ads-client.ts # Google Ads API client
│ └── tools/ # MCP tool implementations
│ ├── accounts.ts # Account management tools
│ ├── campaigns.ts # Campaign tools
│ ├── ad-groups.ts # Ad group tools
│ ├── ads.ts # Ad tools
│ ├── keywords.ts # Keyword tools
│ ├── conversions.ts # Conversion tracking tools
│ ├── performance.ts # Performance reporting tools
│ ├── analytics.ts # Analytics tools
│ └── shopping.ts # Shopping campaign tools
├── dist/ # Compiled JavaScript files
├── .env.example # Example environment variables
├── claude-desktop-config.example.json # Example Claude Desktop config
├── package.json # Project dependencies
├── tsconfig.json # TypeScript configuration
└── README.md # This file
🤝 Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
📄 License
MIT