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.
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
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.
Next steps
- Browse the available tools.
- See usage examples on the MCP overview.
