Provides comprehensive tools for managing Google Ad Manager operations, including creating and managing orders, line items, creatives, and advertisers, with support for campaign workflows, delivery verification, and bulk operations.
Google Ad Manager MCP Server
Automate Google Ad Manager with AI. An MCP server that lets AI assistants like Claude, ChatGPT, Gemini, Cursor, and VS Code manage your ad campaigns, line items, creatives, and more through natural language.
Why This Exists
Managing Google Ad Manager is tedious. Creating campaigns, uploading creatives, and configuring line items involves countless clicks through a complex UI.
This MCP server changes that. Connect it to Claude and manage your entire ad operations through conversation:
"Create a new campaign for Nike ending December 31st"
"Upload all creatives from this folder and associate them with the Display line item"
"Check which orders are currently delivering"
No more clicking. Just tell Claude what you need.
Features
Order Management: List, create, and manage orders
Line Item Management: Create, duplicate, and configure line items
Creative Management: Upload images, associate with line items, bulk upload
Advertiser Management: Find, create, and list advertisers
Verification Tools: Verify line item setup, check delivery status
Campaign Workflow: Complete campaign creation in one operation
Installation
Or with uv:
Dependencies
FastMCP: MCP server framework with native middleware support
googleads: Google Ad Manager SOAP API client
Configuration
The server uses environment variables for configuration:
Variable | Description | Required |
| Path to service account JSON | Yes |
| Ad Manager network code | Yes |
| Transport mode:
or
| No (default:
in Docker,
otherwise) |
| Server host (HTTP mode only) | No (default:
) |
| Server port (HTTP mode only) | No (default:
) |
| Authentication token (HTTP mode only) | No (auto-generated if not set) |
Authentication
The server implements Bearer token authentication using FastMCP native middleware, following MCP security best practices.
Security Features
FastMCP Native Middleware: Uses FastMCP 2.x middleware for proper MCP lifecycle management
Cryptographically secure tokens: Generated using
secrets.token_hex(32)Timing attack prevention: Uses constant-time comparison (
hmac.compare_digest)Tool-level authentication: Auth validated on every tool call
Audit logging: All authentication failures logged
How It Works
Authentication is enforced at the tool level using FastMCP's middleware system:
When a tool is called, the middleware validates the
AuthorizationheaderIf no token is configured (
GAM_MCP_AUTH_TOKENnot set), requests are allowedInvalid or missing tokens return a
ToolErrorwith a helpful message
Setup
For remote deployments, set a fixed authentication token:
If not set, a random token is generated at startup and displayed in the logs.
Clients must include the token in the Authorization header:
Endpoints
Endpoint | Description |
| MCP protocol endpoint (auth validated on tool calls) |
Running the Server
Local Development
Docker Deployment
The Docker image runs as a non-root user (appuser) for security.
Build the Image
Run the Container
View Logs
Docker Compose
Create a docker-compose.yml file:
Run with:
Verify the Container
Cloud Deployment (Railway, Fly.io, etc.)
Set environment variables in your cloud provider:
GAM_CREDENTIALS_PATH: Path to credentials (or use secrets)GAM_NETWORK_CODE: Your Ad Manager network codeGAM_MCP_AUTH_TOKEN: A secure authentication token
Deploy using the included Dockerfile
Connecting to AI Assistants
Claude Desktop (Docker - Recommended)
Add to ~/Library/Application Support/Claude/claude_desktop_config.json:
Claude Desktop (HTTP Mode)
If running the server in HTTP mode:
Remote Server with Authentication
If deploying remotely with authentication enabled:
Other MCP Clients
This server works with any MCP-compatible client, including:
ChatGPT Desktop - OpenAI adopted MCP in March 2025
Cursor - AI-powered IDE with MCP support
VS Code - Via MCP extensions
Windsurf, Zed, Codeium - Various IDE integrations
Refer to each client's documentation for MCP server configuration.
Testing with MCP Inspector
Available Tools
Order Tools
Tool | Description |
| List all orders with delivering line items |
| Get order details by ID or name |
| Create a new order |
| Find existing or create new order |
Line Item Tools
Tool | Description |
| Get line item details |
| Create a new line item |
| Duplicate an existing line item |
| Rename a line item |
| List all line items for an order |
Creative Tools
Tool | Description |
| Upload an image creative |
| Associate creative with line item |
| Upload and associate in one step |
| Upload all creatives from a folder |
| Get creative details |
| List creatives for an advertiser |
Advertiser Tools
Tool | Description |
| Find advertiser by name |
| Get advertiser details |
| List all advertisers |
| Create a new advertiser |
| Find or create advertiser |
Verification Tools
Tool | Description |
| Verify line item configuration |
| Check delivery progress |
| Verify entire order setup |
Workflow Tools
Tool | Description |
| Complete campaign creation workflow |
Example Usage with Claude
Development
Setup
Running Tests
Code Quality
Roadmap
The following features are planned for future releases:
Near-term
Ad Unit Management - List, get, and create ad units with hierarchy support
Placement Management - Manage inventory placements and targeting
Line Item Status Control - Pause, resume, archive, and approve line items
Forecast & Availability - Check inventory availability and forecast impressions
Creative Preview Links - Generate preview URLs for creative-line item combinations
Medium-term
Advanced Targeting - Geographic, device, daypart, and custom key-value targeting
Reporting Tools - Generate and retrieve performance reports
Bulk Operations - Batch updates for line items, creatives, and targeting
HTML5/Video Creatives - Support for rich media and video creative uploads
Long-term
Audience Management - Create and manage audience segments
User & Permissions - Manage users, roles, and order assignments
Yield Management - Configure yield groups and optimization
Custom Reporting - Scheduled reports with export capabilities
Community Requests
Have a feature request? Open an issue to suggest new functionality.
Contributing
Contributions are welcome! Please see CONTRIBUTING.md for guidelines.
Changelog
See CHANGELOG.md for version history.
API Version
Uses Google Ad Manager SOAP API version v202411.
License
MIT - see LICENSE for details.
Need a Custom MCP Server?
This project is built and maintained by Matious.
We specialize in building custom AI tools and MCP servers that integrate with your existing systems. Whether you need to connect Claude to your CRM, ERP, ad platforms, or internal tools — we can help.
What we build:
Custom MCP servers for any API or platform
AI-powered automation workflows
Claude integrations for business operations
Get in touch: matious.com