Skip to main content
Glama

garmin-connect-mcp

A modular, testable Garmin Connect MCP Server

Bring sleep, heart rate, stress, and training data from your Garmin watch into any MCP-capable AI assistant, and generate visual daily and weekly health reports.

CI Python MCP License: MIT


Table of Contents


Related MCP server: Garmin Health MCP Server

Why This Project

Most Garmin MCP implementations are thin wrappers around the API. This project focuses on engineering quality:

  • Ready out of the box — start with a single command; 14 tools register automatically; try everything in mock mode without a real account

  • Reports as a product — not just JSON responses, but daily/weekly reports with charts that open directly in your browser

  • Clear security boundaries — read-only design, credential redaction, and token directory protection; sensitive data never appears in logs

  • Proven by tests — three test layers (unit + integration + end-to-end), verified on Python 3.10 through 3.13 via GitHub Actions


Feature Overview

📊 14 Data Tools

Profile, activities, steps, sleep, stress, HRV, body composition, training status, training readiness, and VO2max trends — all read-only and safe.

📈 Daily / Weekly Health Reports

Data coverage, trend analysis, and anomaly alerts. Outputs Markdown or self-contained HTML+SVG reports with zero external dependencies.

🔐 Two Authentication Modes

Username/password or token authentication, with Garmin China region support. Credentials can be injected via environment variables or files.

🧪 Mock Mode

Set GARMIN_MCP_MOCK=true to run without a real account, so CI and demos never depend on external services.


Quick Start

1. Install

git clone https://github.com/JaJum/garmin-connect-mcp.git
cd garmin-connect-mcp
uv sync

2. Configure

Create a .env file in the project root (or set environment variables directly):

GARMIN_EMAIL=your@email.com
GARMIN_PASSWORD=your-password
GARMIN_IS_CN=true          # Required for China region accounts

Just want to try it out? Set GARMIN_MCP_MOCK=true to skip a real account and explore every feature with simulated data.

3. Run

uv run garmin-connect-mcp

The startup log shows the running mode (mock / live), the region, and the number of registered tools.

Variable

Description

Required

GARMIN_EMAIL

Garmin account email

One of the pair

GARMIN_PASSWORD

Garmin account password

One of the pair

GARMIN_EMAIL_FILE / GARMIN_PASSWORD_FILE

Read credentials from a file (more secure)

One of the pair

GARMINTOKENS

Token authentication directory (alternative to username/password)

One of the pair

GARMINTOKENS_BASE64

Base64-encoded token directory

No

GARMIN_IS_CN

true to use Garmin China region

No

GARMIN_REPORT_DIR

Report output directory (default ./reports)

No

GARMIN_MCP_MOCK

true to enable mock mode; no real account needed

No


Connecting an MCP Client

Using Claude Desktop's claude_desktop_config.json as an example:

{
  "mcpServers": {
    "garmin-connect-mcp": {
      "command": "uv",
      "args": ["--directory", "C:/path/to/garmin-connect-mcp", "run", "garmin-connect-mcp"],
      "env": {
        "GARMIN_EMAIL": "your@email.com",
        "GARMIN_PASSWORD": "your-password",
        "GARMIN_IS_CN": "true"
      }
    }
  }
}

Any client that supports the MCP stdio transport (Cursor, Windsurf, etc.) can connect the same way.


Tool List

Category

Tool

Description

Profile

get_profile

Basic athlete profile

Profile

get_settings

Account settings

Activity

get_recent_activities

Recent activity list

Activity

get_activity

Single activity details

Activity

get_daily_steps

Daily step count

Health

get_sleep_summary

Sleep summary

Health

get_stress_summary

Stress summary

Health

get_hrv_summary

HRV summary

Health

get_body_composition

Body composition

Training

get_training_status

Training status

Training

get_training_readiness

Training readiness

Training

get_vo2max_trend

VO2max trend

Report

generate_health_daily_report

Generate a daily health report

Report

generate_health_weekly_report

Generate a weekly health report


Health Reports

The report engine automatically computes data coverage, draws trend charts, and flags anomalous metrics:

  • Output formats: Markdown, or self-contained HTML+SVG (directly shareable, no internet required)

  • Daily report: single-day sleep, resting heart rate, HRV, stress, training load, steps + trend charts

  • Weekly report: 7-day aggregation, per-day detail table, anomaly alerts, data quality assessment

  • Output directory: reports/ under the project by default (already in .gitignore, so health data is never committed)


Security Design

  • Read-only toolset — no operations that modify Garmin data are provided

  • Credential redaction — passwords and tokens never appear in logs, error messages, or tool return values

  • Token directory protection — the report output directory is forbidden from pointing at the token storage location

  • Sensitive file isolation — .env and the token directory are excluded by .gitignore by default

  • Allowlist / denylist — filter which tools are exposed to the MCP client as needed


Testing

The default tests require no real Garmin account:

uv sync
uv run pytest tests/unit tests/integration

Real-account E2E tests are skipped by default; enable them manually when needed:

$env:RUN_GARMIN_E2E = "1"
uv run pytest tests/e2e

CI automatically runs unit and integration tests on Python 3.10, 3.11, 3.12, and 3.13.


Documentation

Document

Contents

docs/tool-list.md

Final tool list and parameter reference

Tech stack: Python 3.10+ · FastMCP · python-garminconnect · pytest · GitHub Actions


Acknowledgements

This project draws on the modular design ideas of Taxuspt/garmin_mcp (MIT License), but uses an independent project name, an independent package structure, and a reduced tool scope.

Disclaimer: Garmin is a registered trademark of Garmin Ltd. Copyrights for Garmin Connect interface screenshots and product images belong to Garmin Ltd., and they are used here solely to illustrate this tool's data sources. This is a community-developed third-party tool with no official affiliation with Garmin Ltd.

License

MIT

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      B
      quality
      B
      maintenance
      Downloads all your Garmin health and fitness data into a local SQLite database and exposes 45 MCP tools for AI analysis, enabling assistants to query sleep, training load, HRV, and more.
      48
      99 PyPI
      173
      AGPL 3.0
    • A
      license
      Not graded
      quality
      C
      maintenance
      Exposes your own Garmin Connect activity, health, and training data as read-only MCP tools, covering activities, workouts, sleep, heart rate, HRV, stress, body battery, weight, and women's health. Most tools use Garmin's official Personal API key, with a clearly labeled unofficial fallback for data the official API doesn't yet cover, such as training readiness and VO2 max.
      MIT
    • A
      license
      B
      quality
      B
      maintenance
      A read-only MCP server that lets AI agents query a user's own Garmin Connect data via Garmin's official Personal API. It exposes activities, daily wellness metrics, sleep and recovery, and body/profile data as tools for natural-language analysis.
      21
      Apache 2.0