Skip to Content
MCPSetupGemini CLI

Gemini CLI logoGemini 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/mcp

Or 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

  1. Start the Gemini CLI:
gemini
  1. On first connect it opens your default browser to sign in. If it doesn’t open automatically, run /mcp auth syncgtm inside the CLI
  2. 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.

Connecting Sync GTM to an AI client — the Organization dropdown on the authorization screen sets which organization the connection uses for data and credits.

Verify the connection

Inside the CLI, ask it to list the tools or run a quick check:

Check my connected MCP servers

Don’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:

  1. Run /mcp auth syncgtm inside the Gemini CLI.
  2. On the Sync GTM authorization screen, open the Organization dropdown and pick the client’s organization, then click Approve.
  3. 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

Keep learning

Connected? These two courses turn the tool list into workflows you actually run.