Content
# Google Ads Marketing Campaign Platform (MCP) - FastAPI
A FastAPI implementation of the Google Ads Marketing Campaign Platform API that allows managing Google Ads campaigns.
## Features
- **Bid and Budget Control**: Update and retrieve bid and budget information for campaigns
- **Campaign Performance**: Get performance metrics for campaigns
- **Creative Performance**: Get performance metrics for ad creatives
- **Account Management**: List client accounts and campaigns
- **Unified API Gateway**: Execute all actions through a single endpoint
## Requirements
- Python 3.9+
- Google Ads API access
- Google Ads API credentials
## Installation
1. Clone the repository:
```bash
git clone https://github.com/your-username/fastapi-google-ads-mcp.git
cd fastapi-google-ads-mcp
```
2. Create a virtual environment and activate it:
```bash
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
```
3. Install dependencies:
```bash
pip install -r requirements.txt
```
4. Copy `.env.example` to `.env` and configure your Google Ads API credentials:
```bash
cp .env.example .env
```
Edit the `.env` file with your actual Google Ads API credentials.
## Running the Application
### Development mode:
```bash
uvicorn app.main:app --reload
```
### Production mode:
```bash
uvicorn app.main:app --host 0.0.0.0 --port 8000
```
### Using Docker:
```bash
docker build -t google-ads-mcp .
docker run -p 8000:8000 --env-file .env google-ads-mcp
```
## API Documentation
Once running, access the API documentation at:
- Swagger UI: http://localhost:8000/docs
- ReDoc: http://localhost:8000/redoc
## Example Requests
### Execute an action
```bash
curl -X POST http://localhost:8000/api/v1/execute \
-H "Content-Type: application/json" \
-d '{
"action": "listCampaigns",
"parameters": {
"accountId": "1234567890",
"status": "ENABLED"
}
}'
```
### List available actions
```bash
curl -X GET http://localhost:8000/api/v1/actions
```
## Available Actions
- `updateBidAndBudget`: Update bid and budget for a campaign
- `getBidAndBudgetStatus`: Get current bid and budget status for a campaign
- `getCampaignPerformance`: Get performance metrics for a campaign
- `getCampaignMetrics`: Get detailed metrics for a campaign
- `getCreativePerformance`: Get performance metrics for creative ads
- `getCreativeMetrics`: Get detailed metrics for creative ads
- `listClientAccounts`: List all client accounts
- `listCampaigns`: List campaigns for a client account
- `listAllCampaigns`: List all campaigns across all accounts
- `healthCheck`: Check the health of the Google Ads API connection
- `listAvailableActions`: List all available actions with their descriptions
## License
MIT
Connection Info
You Might Also Like
valuecell
Valuecell is a Python project for efficient data management.
hexstrike-ai
HexStrike AI is an AI-powered MCP cybersecurity automation platform with 150+ tools.
Vibe-Trading
Vibe-Trading: Your Personal Trading Agent
AP2
AP2 provides code samples and demos for the Agent Payments Protocol.
YC-Killer
YC-Killer is an AI agents library by Singularity Research, open-sourcing...
tradingview-mcp
AI-assisted TradingView chart analysis — connect Claude Code to your...