Documentation

Connect your marketing data to Claude, ChatGPT and other LLMs.

Connect a headless agent (Hermes, n8n, cron, scripts)

The OAuth 2.1 flow (used by Claude.ai) needs an interactive browser for consent — which a headless agent doesn't have. For those clients, gadspilot supports a Personal Access Token (PAT): a long-lived token you pass as an Authorization: Bearer header. OAuth stays available and unchanged — the PAT is an additional, optional method.

1. Generate a token

Open your Google Ads dashboard“Connect an agent or script (headless)” block → name it (e.g. “Hermes VPS”) → Generate token. The token is shown once — copy it immediately. It carries access to all your Google Ads resources and never expires until you revoke it.

A PAT is a full read + write credential (write tools stay dry-run by default). Store it like a password — in an environment variable or a secret manager, never in code or logs. Revoke it from the dashboard the moment it leaks.

2. Test the connection (curl)

Confirm the token works by listing the available tools:

curl -sS https://gadspilot.com/mcp \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'

A JSON response listing tools means you're connected. A 401 invalid_token means the token is wrong, revoked, or missing the Bearer prefix.

3. Wire it into your agent

Claude Code (CLI), no browser:

claude mcp add --transport http gadspilot-ads https://gadspilot.com/mcp --header "Authorization: Bearer YOUR_TOKEN"

Any MCP client (JSON config):

{
  "mcpServers": {
    "gadspilot-ads": {
      "type": "http",
      "url": "https://gadspilot.com/mcp",
      "headers": { "Authorization": "Bearer YOUR_TOKEN" }
    }
  }
}

Raw JSON-RPC (custom script / Hermes): POST to https://gadspilot.com/mcp with the Authorization: Bearer header. Each call is a standard MCP JSON-RPC 2.0 message (tools/list, then tools/call).

💡
Need n8n or Make instead? See n8n & Make — same token, HTTP node.
Need help? Ask Léa 💬
gadspilot assistant
Léa
AI assistant · gadspilot
Need a human? Contact support