Connect Garmin to Codex
Set up garmlink in
OpenAI's Codex reaches garmlink as a remote MCP server — in the CLI, the IDE extension or the app. One command adds it, one sign-in links your account, and Codex answers from your real, synced Garmin history.
Before you start You need a garmlink account with your Garmin connected (do that on the Connection screen), and Codex, which comes with ChatGPT plans — in the terminal, the IDE extension or the app.
Connect your Garmin account
On the Connection screen, sign in to Garmin Connect with your email and password (used once, never stored), 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.Add garmlink to Codex
In a terminal, run:codex mcp add garmlink --url https://api.garmlink.ai/mcp
In the Codex app or the IDE extension, the same server goes in the settings, under MCP servers, Add server: name it garmlink, choose Streamable HTTP, and paste the garmlink address ending in /mcp.
Sign in to garmlink
Codex opens your browser on garmlink as soon as the server is added: sign in, then press Authorize. If it doesn't, or to sign in again later, run:codex mcp login garmlink
In the Codex app or the IDE extension, restart it and click Authenticate next to garmlink instead.
Ask your first question
Then ask in plain language, in the tool's chat or agent panel:- “How did I sleep this week?”
- “Summarize my last five runs.”
- “Is my training load trending up or down this month?”
Troubleshooting
- No browser on this machine. Run codex mcp login garmlink --no-browser, open the address it prints on a device that has a browser, sign in, then paste the address of the page you land on back into the terminal — even if that page shows an error.
- It asks for an API key or a token. garmlink needs none: leave every key, header and client secret field empty. You sign in through your browser, with your garmlink account.
- Data looks empty or stale. Check where the sync stands on the Connection screen.
Using another assistant? See all the setup guides. Curious what garmlink can read? Browse the tools reference. Want to see real answers first? Read twelve examples from a real account.