Connect Gemini

"Gemini" is several products, and their MCP support differs. Developer surfaces — Gemini CLI, Gemini Code Assist, and Google Antigravity — connect to the gateway the same way Claude or Cursor do: point them at https://gateway.ansvar.eu/mcp and approve one browser login. The Gemini app at gemini.google.com and Gemini Enterprise are more constrained; their sections below say exactly what works today. If you build your own agent on the Gemini API or ADK, you need the headless path at the end.

Gemini CLI

One command registers the gateway:

gemini mcp add --transport http ansvar https://gateway.ansvar.eu/mcp

By default this writes to .gemini/settings.json in the current project; add --scope user to register it globally in ~/.gemini/settings.json. Then start gemini and run:

/mcp auth ansvar

A browser opens for the OAuth login at auth.ansvar.eu — there is no client ID or key to configure; Gemini CLI discovers the gateway's OAuth endpoints and registers itself automatically. Approve the login, return to the terminal, and verify with /mcp list: the ansvar server should read connected, with the tool catalogue your tier includes.

Gemini Code Assist (VS Code and JetBrains)

Code Assist's agent mode shares the Gemini CLI engine. In VS Code it reads the same ~/.gemini/settings.json, so the CLI command above (with --scope user) also configures the extension. Or add the entry by hand — JetBrains uses a separate mcp.json in the IDE's config directory with the same schema:

{
  "mcpServers": {
    "ansvar": {
      "httpUrl": "https://gateway.ansvar.eu/mcp"
    }
  }
}

The first tool call triggers the browser OAuth flow. Agent mode is still labelled Preview by Google, and org admins can restrict which MCP servers load — if the server never appears, ask whether your organization enforces an MCP allowlist.

Google Antigravity

In the Agent panel, open the menu → MCP Servers → Manage MCP Servers → View raw config, and add:

{
  "mcpServers": {
    "ansvar": {
      "serverUrl": "https://gateway.ansvar.eu/mcp"
    }
  }
}

Note the field name — Antigravity uses serverUrl, not the httpUrl key the rest of the Gemini family reads. Restart Antigravity, then authenticate from the MCP Servers panel. Antigravity handles OAuth automatically for servers that support Dynamic Client Registration, which the gateway does — no client credentials to paste.

The Gemini app (gemini.google.com)

The regular Gemini chat — consumer or Workspace — has no custom MCP or connector support; only Google's own curated apps are available. The exception is Gemini Spark, the agentic mode Google launched 2026-06-30: it accepts custom MCP apps and registers against the gateway automatically. Spark is currently limited to personal Google AI Ultra accounts (US, 18+) and is not available on Workspace-managed accounts, so it is not a path for an enterprise rollout yet. If your team uses the Gemini app day-to-day, the practical options today are Gemini CLI or Gemini Enterprise.

Gemini Enterprise

Gemini Enterprise (formerly Agentspace) can reach the gateway through its Custom MCP Server connector — an admin-configured data store, currently in Preview and off by default until a Google Cloud org-policy admin enables it. Unlike the developer surfaces, this connector does not self-register: it asks for a pre-provisioned OAuth client ID and secret alongside the authorization and token URLs.

We provision that client for you. with your organization name, and we return the client credentials plus the exact values for each connector field. Google's side is: Google Cloud Console → Agent Platform → Data stores → Create data store → Custom MCP Server, with the server URL https://gateway.ansvar.eu/mcp. The connector speaks streamable HTTP, which is what the gateway serves.

Building your own: Gemini API, ADK, Interactions API

None of the code-level Gemini paths run the browser OAuth flow for you — they pass a fixed Authorization header. Google's ADK attaches the gateway via McpToolset(connection_params=StreamableHTTPConnectionParams(url=...)) with a header provider; the Interactions API's native mcp_server tool takes a static headers map (and does not yet support Gemini 3 models). Because gateway tokens expire within minutes, a pasted token won't hold — headless setups need a managed service credential, the same shape as n8n or CI. See Clients without OAuth.