Set up garmlink in Gemini

Set up garmlink in

Gemini reaches garmlink over the Model Context Protocol (MCP) — through Gemini CLI for individuals, or Gemini Enterprise for organisations. The consumer Gemini app cannot add custom connectors yet, so this guide covers the two routes that work today.

The Gemini app can't add MCP connectors

The consumer Gemini app at gemini.google.com cannot add custom MCP connectors today — the setting simply does not exist there. This guide covers the two paths that do work: the Gemini CLI for individuals, and Gemini Enterprise for organisations.

Before you start

You need a garmlink account with your Garmin connected (do that on the Connection screen), and either the Gemini CLI on your machine, or a Gemini Enterprise workspace.
1

Connect your Garmin account

On the Connection screen, enter your Garmin Connect credentials, complete the verification code if Garmin asks for one, and wait for the status to turn Connected. garmlink starts syncing your activities, sleep, HRV and training metrics right away.

Path A — Gemini CLI (individual)

2

Install the Gemini CLI

Install the CLI globally, then run it once so it creates its config directory:
  • npm install -g @google/gemini-cli
  • gemini

Sign in with your Google account when it asks.

3

Declare garmlink in the CLI settings

Open ~/.gemini/settings.json (create it if it doesn't exist) and declare garmlink as an MCP server:
{
  "mcpServers": {
    "garmlink": {
      "httpUrl": "https://api.garmlink.ai/mcp",
      "oauth": { "enabled": true }
    }
  }
}

Nothing else goes in that file — no headers, no API key, no client secret. With OAuth enabled, the Gemini CLI runs the whole OAuth 2.0 flow itself.

4

Run the CLI and approve access

Start gemini in a terminal. The first time it reaches garmlink it opens a browser window: sign in, approve read-only access, and the CLI stores the tokens locally for next time.

Then just ask, in plain language:

  • “How did I sleep this week?”
  • “Summarize my last five runs.”
  • “Is my training load trending up or down this month?”

Path B — Gemini Enterprise (organisation)

5

Add the MCP server in Gemini Enterprise

In Gemini Enterprise, open Connected apps → Add MCP Server. Fill in the MCP server details — a name, a description, and the garmlink URL:https://api.garmlink.ai/mcp

Only the StreamableHTTP transport is supported — legacy SSE MCP servers are rejected. garmlink is StreamableHTTP, so it qualifies.

6

Authenticate and set the scope

Pick OAuth as the authentication method and complete the garmlink sign-in. Then choose the scope: publish the connection to the whole organisation, or require each member to authenticate with their own garmlink account.

Troubleshooting

  • There is no MCP option in the Gemini app. Expected — the consumer app doesn't support custom connectors at all. Use the Gemini CLI, or Gemini Enterprise if your organisation has it.
  • The CLI can't authenticate. Make sure ~/.gemini/settings.json carries no header and no token next to the OAuth block — a stale Authorization header wins over the OAuth flow and the server answers 401.
  • The server is unreachable. The MCP URL must be reachable over HTTPS from the machine running the CLI (or from Gemini Enterprise) — check that no proxy or firewall is blocking it.
  • Data looks empty or stale. Check where the sync stands on the Connection screen.

Using another assistant? See all four setup guides. Curious what garmlink can read? Browse the tools reference.