Connect an agent
Connect Gemini CLI.
Connect Gemini CLI to Ad Superpowers and check your first advertising report.
On this page
Use this guide to work with your advertising data in the Gemini CLI terminal. Connect through a browser sign-in, then check an account and a small report.
Before you begin
You need access to Gemini CLI and an Ad Superpowers account with an active trial or paid subscription. Create an account if needed; see pricing for current access and limits.
In the dashboard, select the intended workspace and connect your platform in Integrations. Use that workspace when approving the connection.
1. Install Gemini CLI
The npm installation requires Node.js 20 or later. Follow Google's installation requirements for your system, then run:
npm install -g @google/gemini-cli
gemini
Complete Gemini CLI's own authentication when prompted.
2. Add Ad Superpowers
Add this entry to ~/.gemini/settings.json, your user settings file. Create the file if needed. If it already contains mcpServers, merge the new entry into that object and preserve your other settings.
{
"mcpServers": {
"ad-superpowers": {
"httpUrl": "https://mcp.adsuperpowers.ai/v1"
}
}
}
Use httpUrl for Streamable HTTP. In Gemini CLI, url selects the older SSE transport. See Google's MCP configuration.
3. Sign in to Ad Superpowers
Restart Gemini CLI after saving the file. Inside Gemini CLI, run:
/mcp auth ad-superpowers
Complete the browser authorization with your Ad Superpowers account and check the workspace shown before approving. Return to the terminal and run /mcp to inspect the connection and available tools.
API key alternative
If you use an API key, create it in the intended workspace's API Keys. Set AD_SUPERPOWERS_KEY in the environment that launches Gemini CLI, using your local secret-management method. Replace the server entry with:
{
"mcpServers": {
"ad-superpowers": {
"httpUrl": "https://mcp.adsuperpowers.ai/v1",
"headers": {
"Authorization": "Bearer ${AD_SUPERPOWERS_KEY}"
}
}
}
}
Gemini CLI resolves environment references in settings when it loads them. Restart after setting the variable. Keep the actual key out of chat and shared configuration files. See the settings reference.
4. Check the result
Ask Gemini CLI:
List the advertising accounts I can access through Ad Superpowers.
Do not change anything.
Confirm that the expected account appears, then ask:
For [account name and ID], show campaign spend and conversions
for the last 7 days. Include the date range and currency.
Do not change any campaigns.
Review any tool approval and check the account, dates and currency against the platform.
If the connection fails
- The server is missing: check the JSON file and run
/mcp reloadto reload servers. A project.gemini/settings.jsoncan override user settings. - Sign-in fails: run
/mcp auth ad-superpowersagain and check your Ad Superpowers account and workspace. For the key alternative, check that the launching process hasAD_SUPERPOWERS_KEYand the key is still active. - Tools appear, but the account is missing: check Integrations in the workspace used for authorization. Reload the server after adding a platform, then follow troubleshooting.
Official documentation
Gemini CLI installation · MCP configuration · MCP commands
Next steps
Try an example question or browse the tool reference.
