Description
### 1. Basic Configuration
This is a minimal, realistic config to get Claude Code talking to the **Google Ads MCP by TrueClicks** server.
Assumptions:
- The MCP server is installed as an executable named `google-ads-mcp-trueclicks` on your PATH.
- You already have a Google Ads API refresh token and a TrueClicks API key.
```json
{
"mcpServers": {
"Google Ads MCP by TrueClicks": {
"command": "google-ads-mcp-trueclicks",
"args": [],
"env": {
"GOOGLE_ADS_DEVELOPER_TOKEN": "your-google-ads-developer-token",
"GOOGLE_ADS_CLIENT_ID": "your-oauth-client-id.apps.googleusercontent.com",
"GOOGLE_ADS_CLIENT_SECRET": "your-oauth-client-secret",
"GOOGLE_ADS_REFRESH_TOKEN": "your-oauth-refresh-token",
"GOOGLE_ADS_LOGIN_CUSTOMER_ID": "1234567890",
"TRUECLICKS_API_KEY": "your-trueclicks-api-key"
},
"disabled": false,
"category": "Finance"
}
}
}
```
**What each part does (explanation):**
- `"Google Ads MCP by TrueClicks"`: The name as it will appear in Claude Codeβs MCP list.
- `"command"`: The binary/script that starts the MCP server.
- `"args"`: Empty here; the default behavior of the server is used.
- `"env"`:
- `GOOGLE_ADS_DEVELOPER_TOKEN`: Your Google Ads developer token from the Google Ads UI.
- `GOOGLE_ADS_CLIENT_ID` / `GOOGLE_ADS_CLIENT_SECRET`: OAuth2 credentials from Google Cloud Console.
- `GOOGLE_ADS_REFRESH_TOKEN`: Long-lived token used for offline access to Google Ads.
- `GOOGLE_ADS_LOGIN_CUSTOMER_ID`: The manager (MCC) account ID, without dashes.
- `TRUECLICKS_API_KEY`: API key issued by TrueClicks for this integration.
- `"disabled": false`: Ensures the server is active.
- `"category": "Finance"`: Groups this MCP under Finance tools in Claude Code.
---
### 2. Advanced Configuration
This configuration adds:
- Explicit logging options
- A specific Google Ads customer ID to focus on
- Region/timeout settings
- Safer handling for multiple accounts / environments
```json
{
"mcpServers": {
"Google Ads MCP by TrueClicks": {
"command": "/usr/local/bin/google-ads-mcp-trueclicks",
"args": [
"--log-level=info",
"--log-format=json",
"--max-concurrent-requests=5",
"--default-customer-id=9876543210",
"--timeout-ms=30000"
],
"env": {
"GOOGLE_ADS_DEVELOPER_TOKEN": "your-google-ads-developer-token",
"GOOGLE_ADS_CLIENT_ID": "your-oauth-client-id.apps.googleusercontent.com",
"GOOGLE_ADS_CLIENT_SECRET": "your-oauth-client-secret",
"GOOGLE_ADS_REFRESH_TOKEN": "your-oauth-refresh-token",
"GOOGLE_ADS_LOGIN_CUSTOMER_ID": "1234567890",
"GOOGLE_ADS_LINKED_CUSTOMER_IDS": "9876543210,1122334455",
"GOOGLE_ADS_API_VERSION": "v18",
"TRUECLICKS_API_KEY": "your-trueclicks-api-key",
"TRUECLICKS_ENV": "staging",
"TRUECLICKS_BASE_URL": "https://api-staging.trueclicks.com",
"HTTP_PROXY": "",
"HTTPS_PROXY": ""
},
"disabled": false,
"category": "Finance",
"timeoutSeconds": 60
}
}
}
```
**What each part does (explanation):**
- `"command"`: Absolute path to the MCP binary for reliability.
- `"args"`:
- `--log-level=info`: Enables informative logs (could be `debug`, `warn`, etc.).
- `--log-format=json`: Structured logs for easier parsing if you pipe them somewhere.
- `--max-concurrent-requests=5`: Limit concurrency to avoid API quota spikes.
- `--default-customer-id=9876543210`: Default Google Ads account to query if not specified in a tool call.
- `--timeout-ms=30000`: Request-level timeout toward Google/TrueClicks.
- `"env"` additions:
- `GOOGLE_ADS_LINKED_CUSTOMER_IDS`: Comma-separated list of accessible customer IDs to constrain operations.
- `GOOGLE_ADS_API_VERSION`: Pin to a specific Google Ads API version.
- `TRUECLICKS_ENV`: Use `staging` vs `production` for TrueClicks API.
- `TRUECLICKS_BASE_URL`: Explicit base URL for the TrueClicks API.
- `HTTP_PROXY` / `HTTPS_PROXY`: Left blank here; set them if you need outbound proxying.
- `"timeoutSeconds": 60`: Overall timeout for a single MCP request from Claude Code, independent of the internal `--timeout-ms`.
---
### 3. Use Case Specific Configuration β Production Monitoring & Optimization
This configuration is tailored for a **production setup** where Claude Code is used to:
- Monitor performance of key Google Ads accounts
- Pull anomaly/quality insights from TrueClicks
- Enforce read-mostly behavior (no write operations) from this environment
```json
{
"mcpServers": {
"Google Ads MCP by TrueClicks (Production Monitoring)": {
"command": "/opt/mcp/google-ads-mcp-trueclicks",
"args": [
"--log-level=warn",
"--log-format=text",
"--max-concurrent-requests=3",
"--default-customer-id=5555555555",
"--timeout-ms=45000",
"--mode=readonly",
"--allowed-tools=get_campaigns,get_keywords,get_search_terms,get_quality_issues,get_anomalies"
],
"env": {
"GOOGLE_ADS_DEVELOPER_TOKEN": "prod-google-ads-developer-token",
"GOOGLE_ADS_CLIENT_ID": "prod-oauth-client-id.apps.googleusercontent.com",
"GOOGLE_ADS_CLIENT_SECRET": "prod-oauth-client-secret",
"GOOGLE_ADS_REFRESH_TOKEN": "prod-oauth-refresh-token",
"GOOGLE_ADS_LOGIN_CUSTOMER_ID": "1111111111",
"GOOGLE_ADS_LINKED_CUSTOMER_IDS": "5555555555,6666666666,7777777777",
"GOOGLE_ADS_API_VERSION": "v18",
"TRUECLICKS_API_KEY": "prod-trueclicks-api-key",
"TRUECLICKS_ENV": "production",
"TRUECLICKS_BASE_URL": "https://api.trueclicks.com",
"MCP_GOOGLE_ADS_DEFAULT_TIMEZONE": "Europe/Amsterdam",
"MCP_GOOGLE_ADS_DEFAULT_CURRENCY": "EUR",
"MCP_GOOGLE_ADS_DEFAULT_LOOKBACK_DAYS": "30",
"MCP_STRICT_RATE_LIMITING": "true"
},
"disabled": false,
"category": "Finance",
"timeoutSeconds": 90
}
}
}
```
**What each part does (explanation):**
- Name: Labeled clearly as **Production Monitoring** to avoid confusion with test/staging configs.
- `"args"`:
- `--log-level=warn`: Only warnings and errors logged in production.
- `--log-format=text`: Simpler logs for human reading on production servers.
- `--max-concurrent-requests=3`: Conservative concurrency to protect quotas.
- `--default-customer-id=5555555555`: Main production account for monitoring.
- `--timeout-ms=45000`: Slightly higher request timeout for heavy reporting queries.
- `--mode=readonly`: Ensures the MCP does not attempt to change campaigns/keywords.
- `--allowed-tools=...`: Restrict to tools that fetch data and quality insights only.
- `"env"` production specifics:
- All `prod-*` values: Separate credentials from non-production.
- `GOOGLE_ADS_LINKED_CUSTOMER_IDS`: Only specific production accounts are visible.
- `MCP_GOOGLE_ADS_DEFAULT_TIMEZONE`: For aggregations and date-based reporting.
- `MCP_GOOGLE_ADS_DEFAULT_CURRENCY`: Ensures consistent currency interpretation.
- `MCP_GOOGLE_ADS_DEFAULT_LOOKBACK_DAYS`: Default reporting window (e.g., last 30 days).
- `MCP_STRICT_RATE_LIMITING`: When `true`, the server should throttle itself more aggressively.
- `"timeoutSeconds": 90`: Allows extra time for heavy production queries from Claude Code.