Command Palette

Search for a command to run...

Browse all
MCP server № 20562

GarminSynapse

Enables AI assistants to retrieve and analyze Garmin Connect health data, including daily summaries, sleep, HRV, workouts, and raw FIT files, while also support

Free
GitHubEmbed

Installing GarminSynapse

Build from source

This server ships without a published npm/PyPI package — clone the repo and follow its README to build and run it, then add the resulting command to your client.

Open repository
github.com/kaivyy/garminsynapse

About

Enables AI assistants to retrieve and analyze Garmin Connect health data, including daily summaries, sleep, HRV, workouts, and raw FIT files, while also supporting SQL queries on the underlying database.

README

GarminSynapse Web Dashboard & Hardware Cockpit

⚡ 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.

Quick Start • Features • Architecture • MCP Guide • REST API • License


⚡ 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] No requirements.txt needed — all dependencies are declared in pyproject.toml using modern PEP 621 standards.


🌟 Key Features

🛡️ Dual-Engine Authentication

Fast 5-stage curl_cffi browser TLS impersonation (~1–2s) with automatic Playwright Chromium fallback (~7–10s) for Cloudflare Turnstile CAPTCHA. Tokens cached securely with 0600 permissions.

🤖 Native MCP Server (SDK 2.0)

Exposes 10 rich MCP tools via MCPServer (MCP SDK v2.0) allowing AI Assistants to query biometrics, analyze workouts, download .FIT files, and run SQL queries.

🗄️ Relational SQLite Storage

40+ normalized tables with UniqueConstraint upsert protection for Daily Health Stats, Sleep Stages, RHR, Stress, Body Battery, HRV Baseline, SpO2, and Activities.

🌐 Sporty Modern Web Dashboard

Responsive SPA on port 6060 with 🌗 Dark/Light toggle, Garmin branding, glassmorphism cards, health gauges, interactive workout feeds, and custom date range picker.


🏗️ 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

📦 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 (31 Native AI Tools)

Tool Name Parameters Description
System & Auth
garmin_status None Check auth, database, and MCP system status
garmin_login email, password, mfa_code Authenticate with Garmin Connect (supports 2FA / MFA resume)
get_garmin_devices None Get registered watch model names, serial numbers, unit IDs, and firmware
garmin_sync days (default 7) Extract recent Garmin metrics to SQLite database
get_user_profile None Get user social and biometric profile (weight, height, gender, VO2 Max)
Live & Daily Biometrics
get_live_metrics None Get live point-in-time metrics (Body Battery %, charged/drained, Stress, Steps, Nap)
get_daily_summary date_str (YYYY-MM-DD) Get daily steps, resting HR, min/max HR, stress, body battery, calories, distance
get_sleep_analysis date_str (YYYY-MM-DD) Get sleep stages, sleep score, and daytime nap intervals
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
Heart Rate, Training & Performance
get_heart_rate_zones None Get user's configured Zone 1 to Zone 5 BPM floors, Max HR, resting HR, and LTHR
get_activity_hr_zones activity_id Get exact time (sec/min) and percentage spent in Zone 1 through Zone 5 for a workout
get_training_status date_str (optional) Get Training Status (Productive, Peaking, etc.), Acute Training Load, and VO2 Max
get_training_readiness date_str (optional) Get Training Readiness score (0–100) and recovery factor breakdown
get_intensity_minutes date_str (optional) Get Moderate & Vigorous active intensity minutes vs weekly target
get_personal_records None Get all-time Personal Records (PRs/PBs) for 1K, 5K, 10K, Half, Marathon, longest
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 and trophies
Activities & Files
list_activities limit (default 20) List recent workouts (distance, duration, avg HR, max HR, calories, elevation gain)
get_activity_details activity_id Get detailed time-series metrics (HR, cadence, power, speed, elevation polyline)
get_activity_splits activity_id Get per-km or per-lap splits with avg HR, max HR, pace, cadence, elevation
get_activity_weather activity_id Get weather conditions during workout (temperature, humidity, wind)
get_activity_exercise_sets activity_id Get gym/strength workout sets, exercise names, reps, and weights (kg)
download_fit_file activity_id Download raw binary .FIT file to local storage
export_activity_gpx activity_id, output_dir (opt) Export workout route to standard .GPX with GPS, elevation, HR & cadence
Body & Health Composition
get_body_composition date_str (optional) Get user weight (kg), BMI, body fat %, muscle mass, water %, and bone mass
Universal Query & Power Tools
query_garmin_db sql_query Execute safe SELECT query on local SQLite DB (40+ tables)
garmin_raw_api endpoint_path, params Universal gateway: query any Garmin Connect service endpoint path directly

📡 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, Resting HR, Min/Max HR, Sleep, Battery, HRV, SpO2, Respiration)
GET /api/v1/readiness Training Readiness score & recovery factor breakdown
GET /api/v1/hr-zones User profile Heart Rate Zones (Zone 1 to Zone 5 thresholds)
GET /api/v1/training-status Training Status, Acute Training Load, and VO2 Max metrics
GET /api/v1/personal-records User all-time Personal Records (PRs/PBs)
GET /api/v1/intensity-minutes Daily/weekly active intensity minutes vs goal
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 (includes max HR & elevation)
GET /api/v1/activity/{id} Single activity full details
GET /api/v1/activities/{id}/splits Per-km / per-lap workout splits
GET /api/v1/activities/{id}/hr-zones Time and percentage spent in Zone 1–5 for workout
GET /api/v1/activities/{id}/export/gpx Download activity GPX route file with GPS, elevation, HR & cadence
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]

# Export workout to GPX file (GPS, elevation, HR & cadence)
garminsynapse export <activity_id> [--output ./] [--format gpx]

# Sync Garmin data
garminsynapse sync --email [email protected] --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.

from github.com/kaivyy/garminsynapse

FAQ

Is GarminSynapse MCP free?

Yes, GarminSynapse MCP is free — one-click install via Unyly at no cost.

Does GarminSynapse need an API key?

No, GarminSynapse runs without API keys or environment variables.

Is GarminSynapse hosted or self-hosted?

Self-hosted: the server runs locally on your machine via the install command above.

How do I install GarminSynapse in Claude Desktop, Claude Code or Cursor?

Open GarminSynapse on unyly.org, pick your client tab (Claude Desktop, Claude Code, Cursor) and press Install — the config is generated automatically, no JSON editing.

Related MCPs

№ 56430

Postgres

AnthropicAnthropic

Query your database in natural language

postgressqldatabase
Install now
№ 72083

wenb1n-dev/SmartDB_MCP

wenb1n-devwenb1n-dev

Connect to multiple databases at once (MySQL, PostgreSQL, SQL Server, MariaDB, Dameng, Oracle) for operations, health analysis and SQL optimization.

wenb1ndevsmartdb
Install now
№ 08825

Postgres Server

madhurprashmadhurprash

This server enables interaction with PostgreSQL databases through the Model Context Protocol, optimized for the AWS Bedrock AgentCore Runtime. It provides tools

Install now
№ 29587

PostgreSQL

modelcontextprotocolmodelcontextprotocol

Read-only database access with schema inspection.

postgresqlarchived
VerifiedInstall now
№ 12820

Redis

modelcontextprotocolmodelcontextprotocol

Interact with Redis key-value stores.

redisarchived
VerifiedInstall now
№ 75813

SQLite

modelcontextprotocolmodelcontextprotocol

Database interaction and business intelligence capabilities.

sqlitearchived
VerifiedInstall now
№ 51499

mxcp

raw-labsraw-labs

Open-source framework for building enterprise-grade MCP servers using just YAML, SQL, and Python, with built-in auth, monitoring, ETL and policy enforcement.

mxcpforservers
VerifiedInstall now
№ 93433

julien040/anyquery

julien040julien040

Query apps with SQL from a single local-first binary; also connects to PostgreSQL, MySQL and SQLite-compatible databases.

julien040anyqueryname
Install now
№ 67869

drakonkat/wizzy-mcp-tmdb

drakonkatdrakonkat

Search and retrieve movie, TV show and person information from The Movie Database (TMDB) API.

drakonkatwizzymcp
Install now
№ 89447

longevity-genie/opengenes-mcp

longevity-genielongevity-genie

Query the OpenGenes database for aging and longevity research.

longevitygenieopengenes
Install now

Compare GarminSynapse with

Not sure what to pick?

Find your stack in 60 seconds

Author?

Embed badge for your README

Browse similar

All data MCPs