Connect Gemini CLI to Agent Authority

Connect Google's Gemini CLI to SecureAuth Agent Authority

Google's open-source AI agent for the terminal, built on Gemini. Once connected, Gemini CLI reaches every tool your organization has approved through a single governed endpoint — every call authenticated, policy-checked, and audited.

Setup

  1. Add the MCP server — Add the following to ~/.gemini/settings.json:
{
  "mcpServers": {
    "secureauth": {
      "url": "https://your-gateway-url/gateway/mcp",
      "type": "http",
      "oauth": {
        "scopes": ["mcp_gateway", "profile", "email"]
      }
    }
  }
}
  1. Authenticate — Start Gemini CLI (gemini), then type /mcp auth secureauth. A browser window opens for sign-in.

  2. Start using — Gemini CLI picks up the tools on the next turn.

The agent is auto-registered on first connect.

Connecting to just one MCP? To stay under an agent's tool limit, point the URL at a single MCP — /gateway/mcp/{slug} instead of /gateway/mcp. Grab the exact URL from the resource's detail page; see Scope a connection to one MCP.

Next steps

  • Create a policy — control which tools Gemini CLI can call.
  • Monitor activity — watch its tool calls appear in the dashboard and audit log.
  • Audit log — filter and search every tool call Gemini CLI makes.

On this page