Skip to main content

Claude AI - How to connect MCPs Securely (Advanced Setup)

Connecting Claude Desktop to GAQL.app's free MCPs more securely. Put your GPT token in an Authorization header by editing Claude's config file. Covers setup for Claude Desktop, Cowork, Claude Code in Desktop, and Claude Code in the terminal.

Written by Ales Sturala

When you add the GAQL.app MCP to Claude through the regular "Add custom connector" UI, your GPT token becomes part of the connector URL.

Putting secrets in URLs is widely recognized as bad practice. Standard security guidance is explicit: passwords, security tokens, and API keys should not appear in the URL.

If you have higher security requirements, use this advanced setup instead of the URL approach. It's the only way to connect to the GAQL.app MCP in line with security best practices. Same MCP, same access, but the GPT token stays out of the URL.

It takes about 5 minutes. The only requirement is Node.js on your machine.

Don't have a GPT token yet? Generate one first by following the standard setup: Claude AI - How to Use Google Ads with Claude.


1. Install Node.js

First, check whether you already have it. Open a terminal (Terminal on Mac, Command Prompt or PowerShell on Windows) and run:

node --version

If you see something like v20.10.0 or any v18+ version, then you can skip to step "2. Add MCP to Claude".

If you see "command not found" or an error, install Node.js by running the command for your operating system:

Windows (Command Prompt or PowerShell):

winget install OpenJS.NodeJS.LTS

Mac (Terminal):

brew install node

When it finishes, close and reopen your terminal, then run node --version to confirm.


2. Add MCP to Claude

In Claude Desktop, go to Settings → Developer → Local MCP servers → Edit Config. This opens claude_desktop_config.json in your default editor.

The file will look something like this (see the "mcpServers" section):

{
"mcpServers": {
"Google Ads MCP by TrueClicks": {
"command": "npx.cmd",
"args": [
"mcp-remote",
"https://mcp.gaql.app/mcp/google-ads/",
"--header",
"Authorization: Bearer {YOUR_GPT_TOKEN}"
]
}
},
"preferences": {
"coworkScheduledTasksEnabled": true,
"ccdScheduledTasksEnabled": true,
"sidebarMode": "chat",
"coworkWebSearchEnabled": true,
"epitaxyPrefs": {
"starred-local-code-sessions": [],
"starred-cowork-spaces": [],
"starred-session-groups": [],
"dframe-local-slice": {
"pinnedOrder": [],
"customGroupAssignments": {},
"customGroupOrder": {}
}
}
}
}
  1. Update only the mcpServers section

  2. Leave the preferences section (your existing Claude settings) untouched

  3. Replace {YOUR_GPT_TOKEN} with the GPT token from gaql.app, then save the file.

Mac users: change "npx.cmd" to "npx" in the config above.

The example above uses our Google Ads MCP. The same setup applies to any MCP, including our Microsoft Ads and Meta Ads MCPs.


3. Restart Claude

Fully quit Claude Desktop and reopen it. Under Settings → Developer, Google Ads MCP by TrueClicks should show as running.


✅ You're All Set!

Your GPT token now stays out of the connector URL. You have full access to your MCP through Claude.


For Claude Code in the Terminal

The Desktop setup above covers all of Claude Desktop, including Cowork and Claude Code inside Desktop. The standalone Claude Code that you run from your terminal (CLI) is separate and keeps its own configuration.

Unlike Claude Desktop, the terminal version natively supports secure authentication, so you can add the MCP directly.

To add the MCP to Claude Code (CLI) securely, run this command:

claude mcp add --transport http "GoogleAdsMCP-TrueClicks"  https://mcp.gaql.app/mcp/google-ads/ --header "Authorization: Bearer {YOUR_GPT_TOKEN}"
  • Replace {YOUR_GPT_TOKEN} with the GPT token from gaql.app, then save the file.


💬 Need Help?

If you run into issues with setup or query logic, feel free to reach out:

We're here to support your productivity with Claude AI and the free MCPs.

Did this answer your question?