fitness-mcp
Provides tools to read Garmin Connect fitness data, including activities, activity details, sleep, daily wellness summaries, and trend metrics. Data is fetched on demand from the Garmin Personal API and cached locally in SQLite.
Click on "Deploy 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., "@fitness-mcp how was my training this week?"
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.
fitness-mcp
A Model Context Protocol server that lets Claude read your Garmin fitness data.
Ask Claude "how was my training this week?", "is my resting heart rate trending down?", "find me every run over 10 km since April" — and get real answers from your own Garmin data. The server runs on your machine; nothing is uploaded, nothing is shared with the author of this project. Bring your own Garmin Personal API key.
Built on the official garmin-connect-personal-api-python client — no reverse engineering, no scraping.
┌───────────────────────────┐ ┌────────────────────────┐
│ Claude Desktop / Code / │ stdio │ fitness-mcp │
│ claude.ai (via connector) │ ───────► │ (MCP + SQLite cache) │
└───────────────────────────┘ └──────────┬─────────────┘
│ Garmin Personal API
│ (on cache miss only)
▼
┌─────────────────────────┐
│ Garmin Connect │
└─────────────────────────┘Features
Five high-level tools for activities, sleep, daily wellness, trends, and per-activity detail.
Lazy, on-demand sync — the first call to a fresh date range fetches from Garmin; subsequent calls read from local SQLite. Recent days auto-refresh as Garmin finalises sleep/HRV.
Multi-provider by design — adding Strava, Coros, or Apple Health is a new file under
providers/and one line of registration.Corporate-friendly — if your network uses Zscaler/Netskope TLS inspection, point it at your CA bundle and it just works.
Two transports — stdio for local Claude installs (default) or Streamable HTTP for self-hosting.
Related MCP server: Garmin Connect MCP
Install
Not published on PyPI. Install from GitHub.
Option A — uvx (no install, recommended)
uvx --from "git+https://github.com/letsjustrun/fitness-mcp.git" fitness-mcp --helpOption B — pipx (keep it on your PATH)
pipx install "git+https://github.com/letsjustrun/fitness-mcp.git"
fitness-mcp --helpOption C — from source
git clone https://github.com/letsjustrun/fitness-mcp.git
cd fitness-mcp
uv venv --python 3.12
uv pip install -e ".[dev]"
.venv/bin/fitness-mcp --helpGet a Garmin Personal API key
Sign in to Garmin Connect on the web.
Settings → Account → Personal API Token.
Create a key. It looks like
GCDC_<uuid>.<uuid>.<base64>.<id>.Keep it private — treat it like a password.
This is a per-user, read-only, own-data-only key. Garmin's Personal API does not support "sharing" or "delegation" — this project cannot use anyone else's data on your behalf and vice versa.
Register with Claude Desktop
Option 1 — DXT (one-click, recommended once released)
Download fitness-mcp.dxt from the Releases page and double-click. Claude Desktop will prompt for your Garmin key during install.
Option 2 — manual config
Open Settings → Developer → Edit Config and add:
{
"mcpServers": {
"fitness": {
"command": "uvx",
"args": [
"--from",
"git+https://github.com/letsjustrun/fitness-mcp.git",
"fitness-mcp"
],
"env": {
"GARMIN_PERSONAL_API_KEY": "paste-your-key-here"
}
}
}
}Fully quit and relaunch Claude Desktop. Ask a new chat "Using the fitness tools, show my last 3 nights of sleep."
If you installed from source, replace "command": "uvx", "args": ["fitness-mcp"] with the absolute path to your venv's fitness-mcp script.
Register with Claude Code
claude mcp add fitness \
-e GARMIN_PERSONAL_API_KEY=your-key-here \
-- uvx --from "git+https://github.com/letsjustrun/fitness-mcp.git" fitness-mcpTools exposed
Tool | Purpose |
| Summary list of workouts in a date range |
| One activity — splits, HR zones, elevation profile if upstream exposes them |
| Per-night sleep: hours, deep/REM/light/awake, score |
| Daily wellness + sleep rollup |
| Aggregated time series: |
Dates are YYYY-MM-DD. Full tool reference: docs/mcp-tools.md.
Running behind corporate TLS inspection (Zscaler, Netskope, …)
If your machine's HTTPS goes through a corporate proxy that re-signs certificates, Python won't trust the chain by default. Export the inspection root CA and point this server at it:
mkdir -p ~/.fitness_mcp
# macOS, Zscaler example:
security find-certificate -a -c "Zscaler" -p /Library/Keychains/System.keychain \
> ~/.fitness_mcp/zscaler_ca.pem
CERTIFI=$(python -c 'import certifi; print(certifi.where())')
cat "$CERTIFI" ~/.fitness_mcp/zscaler_ca.pem > ~/.fitness_mcp/ca_bundle.pemThen add FITNESS_MCP_CA_BUNDLE=$HOME/.fitness_mcp/ca_bundle.pem to your env (or the env block in your Claude Desktop config).
Self-host over HTTP (optional)
If you want one long-running server that many clients share:
# Generate a bearer token (anyone with this token can call the server)
TOKEN=$(python -c 'import secrets; print(secrets.token_urlsafe(32))')
FITNESS_MCP_HTTP_BEARER_TOKENS="$TOKEN" \
GARMIN_PERSONAL_API_KEY="your-key" \
fitness-mcp --http --host 127.0.0.1 --port 8000Safety rail: the server refuses to bind off localhost without a token set.
Clients then connect to http://your-host:8000/mcp with Authorization: Bearer <token>. For public exposure, terminate TLS at a reverse proxy (cloudflared, Caddy, nginx) and keep the token strong. Full HTTP + scaling notes in docs/architecture.md.
Configuration reference
All settings are env vars (loaded from the process environment or .env in the working directory or ~/.fitness_mcp/.env):
Variable | Default | Purpose |
| — | Required. Your Garmin Personal API key. |
|
|
|
|
| SQLite cache location. |
|
|
|
|
| Per-request Garmin timeout, seconds. |
|
| Hard cap on tool-call date ranges. Clamped silently. |
| (certifi default) | Path to a custom CA bundle for TLS-inspected networks. |
|
| HTTP bind host. |
|
| HTTP port. |
|
| HTTP mount path. |
| (empty) | Comma-separated list of accepted bearer tokens. Required to bind off localhost. |
| (empty) | Comma-separated origins for claude.ai web. |
Development
uv venv --python 3.12
uv pip install -e ".[dev]"
.venv/bin/pytest # 26 unit tests, no network
.venv/bin/ruff check . # lintTests stub the Garmin provider — no real API calls happen in CI.
Add a new provider? Walk-through: docs/adding-a-provider.md.
Privacy
This server runs on your machine. Your Garmin data is cached to a SQLite file under your home directory. The author receives nothing, sees nothing, and keeps nothing.
If you self-host over HTTP, you become the data custodian — anyone with a valid bearer token can read your data. Keep tokens secret, keep TLS on, keep logs trimmed.
License
MIT — see LICENSE.
Credits
Built on the official
garmin-connect-personal-api-pythonclient.MCP transport, routing, and schema generation by the official MCP Python SDK.
Available Tools
5 toolsget_activitiesA
List workouts between start and end (YYYY-MM-DD, inclusive).
Returns a summary per activity: sport, name, start time, duration (min),
distance (km), avg/max HR, elevation, training load. Use this to answer
"what did I do last week?" or "show me every run since April".
- `sport`: optional filter (e.g. "running", "cycling"). Matches case-insensitively.
- `force_refresh`: skip the freshness cache and refetch every day in range.
Use `get_activity_detail(activity_id)` for splits / HR zones of one activity.
Inputs: end (required), start (required), sport, force_refresh.
get_activity_detailA
Full detail for one activity: splits, HR zones, elevation profile
where the provider exposes them. Call after get_activities to drill in.
Inputs: activity_id (required).
get_daily_summaryB
One row per day combining wellness (steps, resting HR, stress, body battery) and sleep (hours, score). Use this for "how was my recovery last week?" style questions.
Inputs: end (required), start (required), force_refresh.
get_sleepA
Per-night sleep in [start, end] (YYYY-MM-DD, inclusive).
Returns hours slept, deep/REM/light/awake minutes, and sleep score per
night. Recent nights may silently refresh — watches sync late and Garmin
finalises sleep scoring the following morning.
Inputs: end (required), start (required), force_refresh.
get_trendsC
Aggregate a daily metric into day/week/month buckets.
`metric` is one of:
resting_hr, steps, stress_avg, body_battery_high, body_battery_low,
sleep_score, sleep_hours, training_load, vo2max, hrv
Sums are used for steps and training_load; everything else is averaged.
`bucket` is "day", "week", or "month" (default "week").
Inputs: end (required), start (required), metric (required), bucket.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 5 tools
The tools mostly have distinct purposes: listing activities, drilling into one activity, aggregating daily metrics, retrieving per-night sleep, and combining wellness/sleep into a daily summary. There is some overlap because sleep data appears in get_sleep, get_trends, and get_daily_summary, but the descriptions clarify different granularities and use cases.
All tools use the same get_ verb prefix and snake_case noun style: get_activities, get_activity_detail, get_trends, get_sleep, get_daily_summary. The pattern is predictable and easy to scan.
Five tools is well-scoped for a read-only fitness analytics server. Each tool covers a meaningful slice of the domain without redundant operations.
The surface covers activity listing/detail, trends, sleep, and daily recovery summaries, which addresses core fitness questions. Minor gaps may exist around richer activity streams or profile/settings data, but most agent workflows can be handled with the provided tools.
Maintenance
Related MCP Connectors
Garmin data in Claude: 135 tools — activities, sleep, HRV, training, workouts. Free, open source.
Garmin data in Claude & ChatGPT via the Garmin Health API. OAuth sign-in, no password sharing.
Garmin watch data for AI assistants: activities, sleep, HRV, recovery. Never writes to Garmin.
Explore Garmin activity and health data with your AI assistant.
Related MCP Servers
- AlicenseBqualityBmaintenanceEnables Claude to access and query your Garmin Connect data—sleep, training, heart rate, and more—through a suite of read-only tools, with an optional write path for creating strength workouts.63MIT
- AlicenseNot gradedqualityBmaintenanceEnables Claude and any MCP client to read a user's own Garmin account in plain language, covering activities, time-series charts, thresholds, sleep, HRV, Body Battery, stress, readiness and trends. It also serves a private local dashboard that downloads the full training and health history, correlates metrics across views, and exports any table as CSV.MIT
- AlicenseAqualityBmaintenanceEnables Claude to read and review your own Garmin training and recovery data through Garmin's official Connect Personal API, with tools for activities, daily summaries, sleep, HRV, and period analytics.71MIT
- AlicenseNot gradedqualityNot gradedmaintenanceEnables Claude to answer questions about your own Garmin Connect data — sleep, steps, heart rate, HRV, Body Battery, weight, and workouts including strength sets — by exposing read-only tools backed by Garmin's official Personal API. Access is locked behind GitHub OAuth and responses are stripped of names, photos, and GPS coordinates to keep the data private.MIT