Garmin MCP Gateway
Allows connecting a Garmin Connect account to enable tools for accessing Garmin health and fitness data.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Garmin MCP GatewayHow many steps did I take today?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Garmin MCP Gateway
π¦ This project has moved to MissingMCP. Development continues there as a multi-adapter gateway (Garmin, WHOOP, β¦); the live Garmin connector is at missingmcp.com/garmin. This repository is kept for reference only and no longer receives updates.
A multi-user, OAuth 2.1βprotected gateway that lets a small trusted circle each
connect their own Garmin Connect account to Claude
(iOS, Android, Web, Desktop). It wraps the unmodified
garmin_mcp worker and adds OAuth,
per-user token isolation, and a reverse proxy.
Claude β POST /mcp (Bearer) β Gateway β 127.0.0.1:<port>/mcp (per-user garmin_mcp) β connect.garmin.comWhy
garmin_mcp is a great MCP server, but it's single-user and stdio-only: each
person has to run it locally with their own Garmin tokens. This gateway makes it a
remote MCP server any Claude client can connect to over HTTP, with a proper
OAuth sign-in flow β so non-technical users just click "connect" and log in with
their Garmin credentials, and never touch a terminal or a token file.
Related MCP server: Garmin Connect MCP Server
Features
OAuth 2.1 β Authorization Code + PKCE (S256) with Dynamic Client Registration. Connect from any Claude client; no manual token wrangling.
Password is never stored β used once to sign in with Garmin (MFA supported); only the resulting session tokens are persisted.
Encrypted at rest β tokens sealed with AES-256-GCM; the DB is useless without
GATEWAY_SECRET. Bearer tokens are stored only as SHA-256 hashes.Per-user isolation β each account gets its own
garmin_mcpworker bound to127.0.0.1, started on demand and reaped when idle.Hardened β one-time 10-min auth codes, CSRF on forms, per-IP/-token rate limits, the
garmin_mcpworker pinned to a reviewed commit.Instructional landing page served on
/and as a friendly fallback for unknown paths.
Quick start (Docker)
cp .env.example .env # set GATEWAY_SECRET, PUBLIC_URL, pin GARMIN_MCP_REF
docker compose up -d --buildPut nginx in front for TLS + your domain (see nginx.conf.example),
then add https://<your-domain>/mcp as a remote MCP server in Claude.
Local development
uv pip install -e ".[dev]"
uv run --extra dev pytest -q # run the test suite
# Run the gateway locally (no Garmin account needed to exercise the OAuth surface).
# garmin-mcp isn't on PATH locally, so point GARMIN_MCP_CMD at uvx.
GATEWAY_SECRET="$(openssl rand -base64 48)" \
PUBLIC_URL=http://localhost:8088 PORT=8088 DATA_DIR=./.localdata \
GARMIN_MCP_CMD="uvx --python 3.12 --from git+https://github.com/Taxuspt/garmin_mcp garmin-mcp" \
uv run garmin-gatewayA .env file in the working directory is loaded automatically (real environment
variables take precedence), so you can drop the same values there instead.
Connecting from Claude
In any Claude client: Settings β Connectors β Add custom connector, or in the CLI:
claude mcp add --transport http garmin https://<your-domain>/mcp.Claude opens the gateway's sign-in page β enter your Garmin Connect email + password (and an MFA code if prompted).
Done β your Garmin tools are now available in Claude.
Configuration
Set via environment (or .env). See .env.example.
Variable | Required | Default | Description |
| yes | β | β₯32-char key for token encryption. Refuses to start with the placeholder. Generate with |
| yes |
| Public URL used in OAuth metadata + redirects. |
| no |
| Listen port. |
| no |
| Where the SQLite DB and per-user token dirs live. |
| no |
| Override the DB path. |
| no |
| Command to spawn the worker. Use a |
| no |
| Docker build arg: commit/ref of |
| no |
| Port range for per-user workers. |
| no |
| Seconds before an idle worker is reaped. |
| no |
| Seconds to wait for a worker to become healthy. |
| no |
| Max concurrent per-user workers. |
| no |
| Bearer token lifetime; user re-authenticates after it. |
| no | β | Shown on the landing page. |
| no | β | If set, tees structured + stdlib logs to this file. |
| no |
|
|
Monitoring
Two helper scripts read the gateway's state:
python scripts/status.py # snapshot: people with a token, devices/clients
# connected, registered clients, running workers
python scripts/monitor.py # live tail of structured events
python scripts/monitor.py --all # include garminconnect/urllib3 debug noise
python scripts/revoke.py --list # accounts + token counts
python scripts/revoke.py --account <email> # kill-switch: revoke all their tokens
python scripts/usage.py # per-account tool usage + leaderboard
python scripts/usage.py --account <email> # one account's per-tool breakdown
python scripts/health.py # health report: logins/workers/errors β is it all OK?With Docker the scripts are baked into the image at /app/scripts; run them
inside the container. status.py finds the DB under /data automatically:
docker compose exec gateway python /app/scripts/status.py
docker compose exec gateway python /app/scripts/monitor.py --file /data/gateway.log
docker compose logs -f gateway # live events (simplest)
docker compose logs -f gateway | grep '"event": "stats"'
docker compose logs gateway | python scripts/health.py # health report from the stdout logs
monitor.pyreadsGATEWAY_LOG_FILE(pass--fileif it isn't set). Inside a container the logs also go to stdout, sodocker compose logs -fis usually the easiest live view.
The gateway's own log is structured JSON (one event per line). Each per-user
worker's verbose output is kept out of it, in DATA_DIR/users/<account>/worker.log
(look there to debug a specific worker). The gateway also logs a stats event
(accounts / tokens / people-with-token / clients / active-workers) on startup and
whenever those counts change, and status.py lists the running workers.
How it works
Claude registers a client (DCR) and starts OAuth 2.1 (Authorization Code + PKCE).
On the authorize page the user signs in with Garmin (email + password, + MFA if prompted). The gateway logs in via
garminconnect, stores only the resulting tokens (encrypted), and discards the password.Claude exchanges the code for a Bearer token.
On each
/mcpcall the gateway ensures the user'sgarmin_mcpworker is running (its own tokens, bound to127.0.0.1) and reverse-proxies to it.
Security
Garmin password is never persisted.
Tokens encrypted at rest (AES-256-GCM); the DB is useless without
GATEWAY_SECRET.Bearer tokens stored only as SHA-256 hashes.
OAuth 2.1 PKCE (S256), one-time 10-min codes, CSRF on forms, per-IP/-token rate limits.
Workers bind
127.0.0.1only;garmin_mcpis pinned to a reviewed commit.
Deploy only on infrastructure you control and trust. Back up
DATA_DIR; keepGATEWAY_SECRETseparately.
Before you deploy
Set a real random
GATEWAY_SECRET(openssl rand -base64 48) β the app refuses to start with the placeholder from.env.example.Pin
GARMIN_MCP_REFto a reviewed commit SHA βmainis a floating ref that can change without notice (supply-chain).Revoking access β access tokens expire after
ACCESS_TOKEN_TTL_DAYS(default 90; the user just re-authenticates in Claude). To revoke sooner β a leaked token or a removed user β runpython scripts/revoke.py --account <email>(kill-switch for all of that account's tokens).Run a manual end-to-end smoke test with a real Garmin account (including the MFA path) before connecting real users β the
garminconnectlogin/token path is mocked in the automated tests.
Support
If this gateway is useful to you, you can buy me a beer πΊ.
License
MIT Β© 2026 Vaclav Slajs
Acknowledgements
Wraps the excellent garmin_mcp by Taxuspt,
unmodified. Garmin and Garmin Connect are trademarks of Garmin Ltd.; this project is
not affiliated with or endorsed by Garmin.
This server cannot be installed
Maintenance
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/VelkyVenik/garmin-mcp-gateway'
If you have feedback or need assistance with the MCP directory API, please join our Discord server