Garmin data in Claude: 135 tools β activities, sleep, HRV, training, workouts. Free, open source.
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β or use 1-click editor setup below.
π‘ Paste into ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows)
The MCP servers exist. Connecting them shouldn't be complicated.
A multi-user, OAuth 2.1βprotected gateway that hosts the connectors Claude is
missing, so a small trusted circle can connect their own accounts from any
Claude client (iOS, Android, Web, Desktop). The flagship connector is
Garmin Connect: the gateway wraps the
unmodified garmin_mcp worker and
adds OAuth, per-user token isolation, and a reverse proxy. WHOOP
is served the same way but in-process, on WHOOP's own official OAuth v2 API.
The core is adapter-based and supports three forward strategies β worker
(garmin), local (whoop, in-process, no subprocess), and remote (MCP +
header injection, for services with a hosted MCP that lacks its own OAuth) β
see Connectors. The reference deployment runs at
missingmcp.com.
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.
GATEWAY_SECRET. Bearer tokens are stored only as SHA-256 hashes.garmin_mcp worker bound to
127.0.0.1, started on demand and reaped when idle.garmin_mcp worker pinned to a reviewed commit./ and as a friendly fallback for
unknown paths.Railway (how missingmcp.com runs): one service built from the Dockerfile,
a volume mounted at /data, a single replica (the gateway keeps process-local
state by design), and TLS terminated at the Railway edge. Set the env vars from
Configuration on the service; pushes to main deploy
automatically once the service is connected to the GitHub repo. An optional
Railway bucket enables Backups (railway bucket create backups,
then wire its credentials as the BACKUP_S3_* variables).
Self-hosted (plain Docker):
Put any TLS-terminating proxy in front (Caddy, nginx, Traefik). One non-obvious
requirement: /β<adapter>/mcp streams SSE, so disable response buffering and
raise the read timeout (nginx: proxy_buffering off; proxy_read_timeout 3600s;).
Then add https://<your-domain>/garmin/mcp as a remote MCP server in Claude.
A .env file in the working directory is loaded automatically (real environment
variables take precedence), so you can drop the same values there instead.
Each connector is mounted under its own path prefix with its own OAuth flow and
its own Bearer tokens (there is no bare /mcp). The landing page on / lists
the available connectors.
/garmin/mcpSign in with your Garmin Connect email + password (MFA supported). The password
is used once for the Garmin login and discarded; only the resulting Garmin
session tokens are stored (AES-256-GCM encrypted). Each account gets its own
garmin_mcp worker process, bound to 127.0.0.1, started on demand and reaped
when idle.
/whoop/mcpSign in on WHOOP's own OAuth page β the gateway never sees your WHOOP password, only the resulting (encrypted, read-only) tokens. Covers recovery, sleep, strain & daily cycles, workouts, and body measurements. Served in-process on WHOOP's official v2 API (no worker subprocess, no shared upstream). Requires the operator to register a WHOOP developer app β see WHOOP connector setup in Configuration.
The gateway briefly served a RohlΓk connector (remote strategy: credential
headers injected into the hosted RohlΓk MCP). It was retired in 2026-07 when
RohlΓk shipped its own OAuth-protected MCP β add
https://mcp.rohlik.cz/mcp directly as a custom connector in Claude and sign
in in the browser (RohlΓk's guide).
The remote-forward strategy remains a first-class, tested part of the core
(tests/test_remote_forward.py) for the next service that needs it.
claude mcp add --transport http garmin https://<your-domain>/garmin/mcp
(whoop: claude mcp add --transport http whoop https://<your-domain>/whoop/mcp).Set via environment (or .env). See .env.example.
| Variable | Required | Default | Description |
|---|---|---|---|
GATEWAY_SECRET | yes | β | β₯32-char key for token encryption. Refuses to start with the placeholder. Generate with openssl rand -base64 48. |
PUBLIC_URL | yes | http://localhost:8080 | Public URL used in OAuth metadata + redirects. |
PORT | no | 8080 | Listen port. |
DATA_DIR | no | /data | Where the SQLite DB and per-user token dirs live. |
DB_PATH | no | $DATA_DIR/gateway.db | Override the DB path. |
GARMIN_MCP_CMD | no | garmin-mcp | Command to spawn the worker. Use a uvx β¦ invocation when garmin-mcp isn't on PATH. |
GARMIN_MCP_REF | no | pinned SHA in Dockerfile | Docker build arg: commit of garmin_mcp to install. Bumping it is a deliberate, reviewed action β afterwards run python scripts/gen_garmin_tools.py to refresh the tool listing on the /garmin page. |
WORKER_PORT_START / WORKER_PORT_END | no | 9000 / 9099 | Port range for per-user workers. |
WORKER_IDLE_TTL | no | 900 | Seconds before an idle worker is reaped. |
WORKER_STARTUP_TIMEOUT | no | 20 | Seconds to wait for a worker to become healthy. |
MAX_WORKERS | no | 10 | Max concurrent per-user workers. |
ACCESS_TOKEN_TTL_DAYS | no | 90 | Bearer token lifetime; user re-authenticates after it. 0 disables expiry. |
OPERATOR_NAME / OPERATOR_EMAIL | no | β | Shown on the landing page. |
OPERATOR_URL | no | β | Homepage the operator name links to (footer, trust notes). Unset β plain text. |
WHOOP_CLIENT_ID / WHOOP_CLIENT_SECRET | no | β | Credentials of your WHOOP developer app (see WHOOP connector setup); both unset β the whoop connector is disabled. |
WHOOP_API_BASE | no | https://api.prod.whoop.com | WHOOP API origin; override only for testing. |
BACKUP_S3_ENDPOINT / BACKUP_S3_BUCKET / BACKUP_S3_ACCESS_KEY / BACKUP_S3_SECRET_KEY | no | β | S3-compatible bucket for off-box DB backups (see Backups). Backups are disabled unless all four are set. |
BACKUP_S3_REGION | no | auto | SigV4 region of the bucket. |
BACKUP_S3_URL_STYLE | no | virtual-host | virtual-host (Railway buckets) or path. |
BACKUP_INTERVAL_HOURS | no | 6 | Hours between backup uploads. First backup runs right after startup. |
POSTHOG_API_KEY | no | β | Public phc_ project key. Unset β all PostHog telemetry (events, log tee, web analytics) is off. |
POSTHOG_HOST | no | https://eu.i.posthog.com | Server-side ingestion host (SDK events + OTLP log tee). |
POSTHOG_WEB_HOST | no | $POSTHOG_HOST | posthog-js api_host β set it to the managed reverse proxy (e.g. https://j.missingmcp.com) for ad-blocker resilience. |
POSTHOG_UI_HOST | no | https://eu.posthog.com | PostHog app host; posthog-js needs it when POSTHOG_WEB_HOST is a proxy. |
GATEWAY_LOG_FILE | no | β | If set, tees structured + stdlib logs to this file. |
GATEWAY_LOG_LEVEL | no | info | debug|info|warning|error|critical. debug is verbose (logs garminconnect/urllib3 internals) β avoid in production. |
https://<your-domain>/whoop/oauth/callback β exact match required.read:recovery read:cycles read:workout read:sleep read:profile read:body_measurement offline
(offline is required β without it WHOOP issues no refresh token and sessions die after an hour).WHOOP_CLIENT_ID / WHOOP_CLIENT_SECRET.Note: an unapproved WHOOP app is limited to 10 WHOOP members. To lift the limit, submit the app for approval: https://developer.whoop.com/docs/developing/app-approval/ (requirements: API Terms of Use compliance, tested with β₯1 member, accurate app name / contact email / privacy-policy URL in the dashboard, brand-guidelines compliance, and their Typeform submission).
Operating obligations under the WHOOP API Terms of Use (the gateway's design already covers the technical ones β no WHOOP data stored, encrypted tokens, auto-purge of revoked accounts):
invalid_grant), deletes the stored tokens, and revokes the
member's gateway access tokens (log event whoop-account-revoked).When the BACKUP_S3_* variables are set, the gateway uploads a consistent
SQLite snapshot (via the SQLite backup API, WAL-safe) to the bucket right
after startup and then every BACKUP_INTERVAL_HOURS. Keys rotate by weekday
(db/gateway-mon.db β¦ db/gateway-sun.db), giving seven days of retention
with no cleanup logic. Watch the backup-ok / backup-failed log events.
Only the DB is backed up β per-user token dirs under DATA_DIR/users/ are
re-materialized from the DB on demand.
The backup is useless without
GATEWAY_SECRET(account blobs stay AES-256-GCM encrypted inside it) β and that is the point. Keep a copy ofGATEWAY_SECRETsomewhere that is not the bucket and not Railway (e.g. your password manager). Losing the secret = losing every account.
Restore: download the newest object, put it at $DATA_DIR/gateway.db
(delete any stale gateway.db-wal/-shm next to it), set the same
GATEWAY_SECRET, start the gateway. Bearer tokens and logins survive;
workers respawn lazily.
Three helper scripts work directly on the gateway's DB (safe to run while the gateway is live):
The gateway also posts this daily user-stats report to Slack on its own each
morning (DAILY_REPORT_HOUR, default 08:00 DAILY_REPORT_TZ) when
SLACK_WEBHOOK_URL is set; scripts/daily_report.py runs the same report on
demand for testing.
Hourly health digest β a GitHub Actions workflow
(.github/workflows/hourly-digest.yml) runs scripts/hourly_digest.py every
hour: it reads the last 60 min of the gateway's Railway logs via the Railway API,
does a liveness probe, and posts to Slack only on an anomaly (β₯3 5xx/error, any
critical, or a failed probe β <!here>) or once a day as a healthy heartbeat β
silent otherwise. Requires repo secrets RAILWAY_API_TOKEN + SLACK_WEBHOOK_URL
(service/environment ids are set as workflow env). RAILWAY_API_TOKEN may be a
Railway project token (narrowest scope β reaches only this project; sent via
the Project-Access-Token header) or an account/workspace token (sent as
Authorization: Bearer); the script tries both. Run it by hand with
python scripts/hourly_digest.py --dry-run (needs RAILWAY_API_TOKEN,
RAILWAY_SERVICE_ID, RAILWAY_ENVIRONMENT_ID in the environment).
PostHog telemetry β with POSTHOG_API_KEY set (see the env table), the
gateway also ships analytics to PostHog (EU cloud; design:
docs/superpowers/specs/2026-07-20-posthog-telemetry-design.md):
per-request $mcp_* events (PostHog's built-in MCP analytics), a lean
connect-funnel/conversion event set, an OTLP tee of the structured log stream
(PostHog Logs, beta β Railway stays the durable archive), and posthog-js on the
site (UTM campaign attribution; autocapture disabled on OAuth pages). Egress
rule: identity + metadata only β never MCP bodies, credentials, or form
contents; the account email travels only as distinct_id. Everything is
fire-and-forget: a PostHog outage never blocks a request. The Slack reports
above keep running unchanged β PostHog complements them. When off-boarding a
user (revoke.py --purge), also delete the person in PostHog (People β delete)
to complete the GDPR path.
Beer supporters β scripts/add_beer.py records a "buy me a beer" donation
(buymeacoffee.com/venik) into a local beers audit table and emits a
beer_purchased PostHog event, best-effort attributed to the supporter's
gateway account (matched when the email is a known login). The event is meant to
feed the operator's connectβpaying funnel and "beers this month" metric on the
Growth dashboard β those PostHog insights are set up manually and don't exist
until built. Ingestion is manual for now (BMC automation deferred; design:
docs/superpowers/specs/2026-07-24-beer-supporters.md). Same egress rule as
above β the email travels only as distinct_id, never the supporter name or
note.
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:
On Railway run them over railway ssh; logs live in the Railway dashboard
(railway logs --service gateway for a live tail):
All logging is structured JSON on stdout (one event per line) with a proper
level attribute β including uvicorn/stdlib records (event stdlib-log) and
each worker's own output (event worker-log, with an account attribute;
lines matching ERROR/Traceback are elevated to error severity). On Railway
that makes everything searchable in the log explorer β filter e.g.
@event:worker-log @account:<email> to trace one user's worker, or
@level:error for problems. Request latency is recorded per call in the
mcp-response event (ttfb_ms, total_ms, bytes, tool, account);
login/verify and worker-spawn events carry ms durations. 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.
The gateway keeps its own DB tidy β no manual grooming needed. Alongside expiring old auth codes and access tokens, the background loop (roughly once a minute):
status.py's OAuth-client count tracks
the number of connected devices rather than growing with every failed attempt.
Revoking a device also leaves its client token-less, so it's swept the same way.Both are logged only when they actually delete something β cleanup-orphan-clients
(count) and cleanup-dead-adapter (adapter + per-table counts) β so a quiet
log means there was nothing to clean. The one-hour threshold is a fixed constant,
not an env var, by design.
garminconnect, stores only the resulting
tokens (encrypted), and discards the password./garmin/mcp call the gateway ensures the user's garmin_mcp worker is running
(its own tokens, bound to 127.0.0.1) and reverse-proxies to it.Adapters using the remote strategy replace steps 2 and 4 with a probe-verify against the upstream MCP and a direct header-injected forward β no worker.
Adapters using an upstream-OAuth login (whoop) replace step 2 with a redirect to the provider's own OAuth page; the provider calls back with tokens, which the gateway verifies and persists the same way (verify-then-persist is unchanged). Adapters using the local strategy (whoop) replace step 4: the request is handled in-process β no worker, no shared upstream β and the gateway refreshes the account's rotating WHOOP tokens itself as needed.
GATEWAY_SECRET.127.0.0.1 only; garmin_mcp is pinned to a reviewed commit.Deploy only on infrastructure you control and trust. Back up
DATA_DIR; keepGATEWAY_SECRETseparately.
GATEWAY_SECRET (openssl rand -base64 48) β the app
refuses to start with the placeholder from .env.example.GARMIN_MCP_REF to a reviewed commit SHA β main is a floating ref that
can change without notice (supply-chain).ACCESS_TOKEN_TTL_DAYS (default
90; the user just re-authenticates in Claude). To revoke sooner β a leaked token
or a removed user β run python scripts/revoke.py --account [<adapter>:]<email> (kill-switch
for all of that account's tokens). A single device can be revoked with --device <hash-prefix> (prefixes are shown by status.py).If this gateway is useful to you, you can buy me a beer πΊ.
MIT Β© 2026 Vaclav Slajs
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.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/garmin-missingmcp)<a href="https://allmcps.com/mcp/garmin-missingmcp"><img src="https://allmcps.com/api/badge/garmin-missingmcp?style=directory" alt="Garmin β MissingMCP on AllMCPs" /></a>