-
Notifications
You must be signed in to change notification settings - Fork 0
Installation
John Williams edited this page Mar 6, 2026
·
1 revision
# From PyPI (once published)
pip install googleadsagent-mcp
# From GitHub
pip install git+https://github.com/itallstartedwithaidea/google-ads-mcp.git
# With uv
uv add googleadsagent-mcp
# From source
git clone https://github.com/itallstartedwithaidea/google-ads-mcp.git
cd google-ads-mcp
pip install -e .Requires Python 3.10+.
Add to your claude_desktop_config.json:
{
"mcpServers": {
"google-ads": {
"command": "python",
"args": ["-m", "ads_mcp.server"],
"env": {
"GOOGLE_ADS_CREDENTIALS": "/path/to/google-ads.yaml",
"GOOGLE_ADS_LOGIN_CUSTOMER_ID": "123-456-7890"
}
}
}
}Place .mcp.json in your project root (already included in the repo):
{
"mcpServers": {
"google-ads": {
"type": "stdio",
"command": "python",
"args": ["-m", "ads_mcp.server"],
"env": {
"GOOGLE_ADS_CREDENTIALS": "${GOOGLE_ADS_CREDENTIALS}",
"GOOGLE_ADS_LOGIN_CUSTOMER_ID": "${GOOGLE_ADS_LOGIN_CUSTOMER_ID}"
}
}
}
}Settings → MCP → Add server:
- Command:
python -m ads_mcp.server
from agents.mcp import MCPServerStdio
import os
server = MCPServerStdio(
command="python",
args=["-m", "ads_mcp.server"],
env={
"GOOGLE_ADS_CREDENTIALS": os.environ["GOOGLE_ADS_CREDENTIALS"],
"GOOGLE_ADS_LOGIN_CUSTOMER_ID": os.environ.get("GOOGLE_ADS_LOGIN_CUSTOMER_ID", ""),
}
)python -m ads_mcp.server --httpStarts an SSE server on http://localhost:8000 for remote agent connections.
Copy .env.example to .env and fill in your credentials:
cp .env.example .envSee Connecting to Google Ads API for full credential setup.
python scripts/validate.pyThis checks that your credentials are valid and the API is reachable.