Skip to main content
Glama

⚡ GarminSynapse

Unified Health Engine, Relational Database, Native MCP Server & Web Dashboard for Garmin Connect.

Python 3.9+ FastAPI MCP SDK 2.0 SQLite License: MIT Code Style: Black

Bridge your Garmin training data, health metrics, and raw .FIT files directly to AI Agents (Claude, Cursor, AGY) and modern web clients.

FeaturesArchitectureQuick StartMCP GuideREST APILicense


🌟 Key Features


Related MCP server: Garmin Workouts MCP Server

🏗️ System Architecture

flowchart TD
    subgraph Cloud["Garmin Connect Cloud"]
        GC["Garmin API Endpoints (180+ Methods)"]
    end

    subgraph Auth["Dual-Engine Auth Core"]
        CFFI["curl_cffi (Chrome TLS Impersonation)"]
        PW["Playwright Chromium Fallback"]
    end

    subgraph Storage["Storage & ETL Engine"]
        EXT["GarminExtractor"]
        PROC["GarminProcessor"]
        DB[("SQLite Database\n(40+ Relational Tables)")]
    end

    subgraph Access["Interfaces"]
        MCP["MCPServer (SDK 2.0)\n(STDIO & SSE)"]
        REST["FastAPI REST API\n(Port 6060)"]
        SPA["Web Dashboard SPA\n(Dark/Light Mode)"]
    end

    subgraph Clients["Clients"]
        AI["AI Agents\n(Claude, Cursor, AGY)"]
        User["User Browser / Tailscale"]
    end

    GC --> Auth
    Auth --> EXT
    EXT --> PROC
    PROC --> DB
    DB --> MCP
    DB --> REST
    REST --> SPA
    MCP --> AI
    SPA --> User

⚡ Quick Start

TIP

Zero-Friction Install: install.sh automatically checks & installs all prerequisites (Python ≥ 3.9, pip, git, system libs, Playwright browser, all 13 Python packages). Users never need to install anything manually.

Prerequisites (auto-handled by install.sh)

Requirement

Version

Notes

Python

≥ 3.9

Script checks and errors if missing

pip

Any

Auto-installed via apt/dnf/pacman/brew

git

Any

Auto-installed if missing

System libs

libnss3, libgbm1, etc.

Auto-installed for Playwright on Debian/Ubuntu

Installation

# 1. Clone Repository
git clone https://github.com/kaivyy/garminsynapse.git
cd garminsynapse

# 2. One-Click Setup (checks & installs everything)
chmod +x install.sh
./install.sh

# 3. Start Web Dashboard (Port 6060)
garminsynapse start-server
# or: python3 -m garminsynapse.cli start-server

Open your browser at http://localhost:6060 or via Tailscale IP http://<IP-Tailscale-Server>:6060.

What install.sh does

  1. ✅ Checks Python ≥ 3.9, pip, git — auto-installs if missing

  2. ✅ Installs system libraries for Playwright (Debian/Ubuntu)

  3. ✅ Runs pip install -e .[dev] (all 13 dependencies from pyproject.toml)

  4. ✅ Installs Playwright Chromium browser binary

  5. ✅ Creates garmin_files/ working directories and ~/.garminsynapse/ config

  6. Validates installation by importing all modules and testing the web server

NOTE

Norequirements.txt needed — all dependencies are declared in pyproject.toml using modern PEP 621 standards.


📦 Dependencies

All installed automatically via pyproject.toml:

Package

Purpose

fastapi + uvicorn

REST API server & web dashboard

click

CLI interface (garminsynapse command)

sqlalchemy

SQLite ORM with 40+ table schema

curl_cffi

Primary auth via Chrome TLS fingerprint

playwright

Fallback auth via headless Chromium

garminconnect

Garmin Connect API client wrapper

mcp (v2.0)

Model Context Protocol server SDK

fitdecode

Binary .FIT file parser

defusedxml

Safe XML/TCX parsing

requests

HTTP utilities

pydantic

Data validation (via FastAPI)

pytest

Test suite (dev dependency)


🤖 MCP Integration Guide

Connect GarminSynapse to your favorite AI Assistant in seconds.

Claude Desktop Setup

Add the following to your claude_desktop_config.json:

{
  "mcpServers": {
    "garminsynapse": {
      "command": "python3",
      "args": ["-m", "garminsynapse.cli", "mcp"],
      "env": {
        "PYTHONPATH": "${workspaceFolder}/src"
      }
    }
  }
}

Cursor & AGY Setup

In Editor Settings -> Model Context Protocol (MCP) -> Add New Command:

  • Name: garminsynapse

  • Command: python3 -m garminsynapse.cli mcp


🛠️ MCP Tools Reference (20 Native AI Tools)

Tool Name

Parameters

Description

garmin_status

None

Check auth, database, and MCP system status

garmin_login

email, password

Authenticate with Garmin Connect

get_garmin_devices

None

Get registered watch model names, serial numbers, unit IDs, and firmware

get_live_metrics

None

Get live point-in-time metrics (Body Battery %, charged/drained, Stress, Steps, Nap)

garmin_sync

days (default 7)

Extract recent Garmin metrics to SQLite database

get_daily_summary

date_str (YYYY-MM-DD)

Get daily steps, RHR, stress, body battery, calories, distance

get_sleep_analysis

date_str (YYYY-MM-DD)

Get sleep stages, sleep score, and daytime nap intervals

get_training_readiness

date_str (optional)

Get Training Readiness score (0–100) and recovery factors

get_race_predictions

None

Get race time predictions for 5K, 10K, Half Marathon, and Marathon

get_earned_badges

None

Get user's earned Garmin Connect achievement badges

get_hrv_trends

date_str (optional)

Get HRV status, weekly baseline, and nightly averages

get_respiration_data

date_str (optional)

Get waking and sleep respiration rates (brpm)

get_spo2_data

date_str (optional)

Get blood oxygen saturation (SpO2 / Pulse Ox %) daily time-series

get_hydration_data

date_str (optional)

Get daily water intake and hydration logs

get_fitness_age

None

Get calculated Fitness Age vs chronological age

get_user_profile

None

Get user social and biometric profile (weight, height, gender, VO2 Max)

list_activities

limit (default 20)

List recent workouts (distance, duration, HR, calories)

get_activity_details

activity_id

Get detailed time-series metrics & map polyline

download_fit_file

activity_id

Download raw binary .FIT file to local storage

query_garmin_db

sql_query

Execute safe SELECT query on SQLite DB (40+ tables)


📡 REST API Endpoints (Port 6060)

Method

Endpoint

Description

GET

/api/v1/status

System health & authentication status

POST

/api/v1/auth/login

Authenticate Garmin Connect account

POST

/api/v1/auth/logout

Clear active token session

GET

/api/v1/devices

Connected Garmin watch info with 6-hour cache

GET

/api/v1/live

Live real-time biometric readings (Body Battery, Stress, Steps, Nap)

GET

/api/v1/summary

Health gauges (Steps, HR, Sleep, Battery, HRV, SpO2, Respiration)

GET

/api/v1/readiness

Training Readiness score & recovery factor breakdown

GET

/api/v1/predictions

Race time predictions (5K, 10K, Half Marathon, Marathon)

GET

/api/v1/badges

User's earned Garmin Connect achievement badges

GET

/api/v1/profile

User social profile & biometric parameters

GET

/api/v1/activities

List recent logged workouts with date filters

GET

/api/v1/activity/{id}

Single activity full details

POST

/api/v1/sync

Trigger manual data extraction (with 5-minute cooldown)


🖥️ CLI Commands

# Start web dashboard
garminsynapse start-server [--host 0.0.0.0] [--port 6060]

# Sync Garmin data
garminsynapse sync --email you@mail.com --password yourpass [--days 7]

# Start MCP server (for AI agents)
garminsynapse mcp

# Downsample raw 1-second time-series metrics older than 30 days
garminsynapse downsample --days-keep-raw 30

# Prune historical activities older than 1 year
garminsynapse prune --days-keep 365

🧹 Database Maintenance

NOTE

Keep disk usage optimal by downsampling high-frequency 1-second metrics.

# Downsample raw 1-second time-series metrics older than 30 days
garminsynapse downsample --days-keep-raw 30

# Prune historical activities older than 1 year
garminsynapse prune --days-keep 365

🧪 Running Tests

# Run full test suite
PYTHONPATH=src pytest tests/ -v

# Run specific module tests
PYTHONPATH=src pytest tests/test_db.py -v
PYTHONPATH=src pytest tests/test_mcp.py -v

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

F
license - not found
Not graded
quality - not tested
A
maintenance

Maintenance

Maintainers
Response time
2dRelease cycle
8Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • F
    license
    Not graded
    quality
    B
    maintenance
    Enables AI assistants to access and query Garmin Connect health and fitness data, including sleep, HRV, training load, and activities, with an optional coaching plugin for personalized training plans.
    0
    4
  • A
    license
    Not graded
    quality
    A
    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.
    144
    AGPL 3.0
  • A
    license
    Not graded
    quality
    D
    maintenance
    Enables AI assistants to query live Garmin Connect health and fitness data, including daily metrics, activities, sleep analysis, and trends via natural language.
    MIT

View all related MCP servers

Related MCP Connectors

  • Garmin data in Claude & ChatGPT via the Garmin Health API. OAuth sign-in, no password sharing.

  • Garmin data in Claude: 135 tools — activities, sleep, HRV, training, workouts. Free, open source.

  • 63 tools for Apple Health, Fitbit, Oura & Health Connect data in Claude, ChatGPT, Grok & Mistral.

View all MCP Connectors

Latest Blog Posts

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/kaivyy/garminsynapse'

If you have feedback or need assistance with the MCP directory API, please join our Discord server