Google Ads MCP Server
Updated on March 21, 2024 - Triggering workflow run
A Model Context Protocol (MCP) server that provides access to Google Ads data through Claude Desktop.
Features
- Access Google Ads campaigns, accounts, and performance metrics via Claude
- Support for both Manager (MCC) and client account data
- Built-in caching to improve performance and reduce API calls
- Claude Artifacts integration for data visualization
- Multi-environment support (development, testing, production)
- Containerized deployment with Docker
Prerequisites
- Python 3.9 or higher
- Google Ads API credentials
- Claude Desktop
Quick Start
Local Development
Clone this repository:
git clone https://github.com/yourusername/google-ads-mcp.git
cd google-ads-mcp
Set up a virtual environment:
python -m venv .venv
source .venv/bin/activate # On Windows, use: .venv\Scripts\activate
Install dependencies:
pip install -r requirements.txt
Create a .env
file with your Google Ads credentials:
cp .env.example .env
# Edit .env file with your credentials
Run the server:
python server.py
Docker Deployment
Build the Docker image:
docker build -t google-ads-mcp:latest .
Run the container:
docker run -p 8000:8000 --env-file .env google-ads-mcp:latest
Alternatively, use docker-compose:
docker-compose up -d
Configuration
The application supports different environments (dev, test, prod) with environment-specific configurations:
- Set
APP_ENV
to dev
, test
, or prod
to specify the environment
- Configure environment variables as documented in
.env.example
- Feature flags allow enabling/disabling specific functionality
Claude Desktop Integration
Configure Claude Desktop for the MCP server in your Claude Desktop App configuration:
{
"mcpServers": {
"google-ads": {
"command": "python",
"args": [
"/absolute/path/to/server.py"
]
}
}
}
Restart Claude Desktop and look for the tools icon to appear
Use Google Ads data in Claude by asking questions like:
* "Show me my Google Ads account performance"
* "What campaigns are performing well in my account?"
* "Create a visualization of my campaign performance"
Deployment
This repository includes Kubernetes manifests for deployment:
kubernetes/dev/
- Development environment deployment
kubernetes/test/
- Test environment deployment
kubernetes/prod/
- Production environment deployment
CI/CD pipelines are configured using GitHub Actions for automated testing, building, and deployment.
Security
- All credentials are stored in Kubernetes secrets or environment variables, never in code
- The server uses proper authentication for API access
- Rate limiting is enabled in production environments
- Container security best practices are followed
Contributing
- Fork the repository
- Create a feature branch:
git checkout -b feature/my-feature
- Commit your changes:
git commit -am 'Add new feature'
- Push to the branch:
git push origin feature/my-feature
- Submit a pull request
License
This project is licensed under the MIT License - see the LICENSE file for details.
Acknowledgements
- Google Ads API team for their documentation and support
- Anthropic for Claude and the Model Context Protocol