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.json
to 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