Connect Garmin to VS Code
Set up garmlink in
VS Code reaches garmlink as a remote MCP server that GitHub Copilot uses in Agent mode. One entry in mcp.json, one sign-in, and Copilot 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 VS Code with GitHub Copilot, its chat in Agent mode.
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 VS Code
In your project, open
.vscode/mcp.json(create it if it doesn't exist) and add garmlink:{ "servers": { "garmlink": { "type": "http", "url": "https://api.garmlink.ai/mcp" } } }To have it in every project, run MCP: Open User Configuration from the Command Palette and add the same entry there. Or let VS Code write it: MCP: Add Server, then HTTP, the garmlink address, and garmlink as its name.
Sign in to garmlink
Start garmlink — the Start button above its entry in mcp.json, or the MCP servers list — and trust it when VS Code asks. Your browser opens on garmlink: sign in, then press Authorize.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
- Copilot doesn't use garmlink. Switch the chat to Agent mode and check that garmlink's tools are ticked in the tools picker.
- 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.