Gemini CLI
Connect Sync GTM to the Gemini CLI, Google’s command-line agent. (Custom MCP servers are supported in the Gemini CLI, not the gemini.google.com app.)
Sync GTM uses browser-based sign-in (OAuth). There is no API key — don’t pass -H/--header, and approve in your browser.
Why connect Gemini CLI to Sync GTM?
Sync GTM extends the Gemini CLI with live B2B data — query it directly from your terminal as part of any agentic task:
- Find leads from the command line — “Find the CTO and VP of Engineering at Stripe” returns contact-ready profiles
- Enrich people and companies mid-task — pull work emails, mobile numbers, LinkedIn, and funding data inline
- Verify emails before sending — check deliverability without opening a browser
- Research tech stacks and hiring signals — understand your target account before a call or campaign
- Build enrichment scripts on the fly — Gemini CLI can write and run enrichment pipelines using Sync GTM tools in the same session
- Track job changes and LinkedIn posts — surface signals on prospects you’re already pursuing
For developers and GTM operators using the Gemini CLI for automation — add live B2B data without adding another tool to the stack.
Step by step guide
Add the Sync GTM server
Add the Sync GTM MCP server with one command:
gemini mcp add -t http --scope user syncgtm https://api.syncgtm.com/mcpOr add it manually to ~/.gemini/settings.json (the httpUrl key selects streamable HTTP):
{
"mcpServers": {
"syncgtm": {
"httpUrl": "https://api.syncgtm.com/mcp"
}
}
}Authenticate with Sync GTM
- Start the Gemini CLI:
gemini- On first connect it opens your default browser to sign in. If it doesn’t open automatically, run
/mcp auth syncgtminside the CLI - Sign in to Sync GTM and approve — return to the Gemini CLI, you’re connected
Select the correct organization. The authorization screen opens with an Organization dropdown at the top. Whichever organization is selected when you click Approve is the one this connection reads data from and spends credits from. In more than one organization? Open the dropdown and pick the right one before approving. To change it later, connect again and pick a different one — see Managing more than one organization.
Verify the connection
Inside the CLI, ask it to list the tools or run a quick check:
Check my connected MCP serversDon’t pass -H/--header — Sync GTM authenticates through browser OAuth, with no token.
Managing more than one organization
Agencies and consultants often sit in several Sync GTM organizations — their own plus each client’s. The connection uses the organization you picked on the authorization screen, and spends that organization’s credits. Choosing a different organization in the Sync GTM app does not move an existing connection across, so Gemini CLI keeps using the one you approved until you connect again.
To work in a client’s account:
- Run
/mcp auth syncgtminside the Gemini CLI. - On the Sync GTM authorization screen, open the Organization dropdown and pick the client’s organization, then click Approve.
- Run
check_credits(free) to confirm which organization the connection is now pointing at.
Full detail in Working in a client’s organization.
Next steps
- Browse the available tools.
- See usage examples on the MCP overview.
Keep learning
Connected? These two courses turn the tool list into workflows you actually run.
