garmin-mcp-server
Provides tools to access health and fitness data from Garmin Connect, including workouts, sleep, heart rate, body composition, fitness metrics, and activity file downloads.
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., "@garmin-mcp-server What's my training readiness today?"
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.
Garmin Connect MCP Server
A Model Context Protocol (MCP) server that connects AI assistants to your Garmin Connect health and fitness data. Ask Claude, ChatGPT, OpenCode, or any MCP-compatible client about your workouts, sleep, heart rate, and more -- using natural language.
Built on python-garminconnect and the MCP Python SDK.
Features
29 tools across 6 categories, giving your AI assistant access to:
Category | Tools | Examples |
Health | 5 | Daily summary, heart rate, sleep stages, stress, body battery |
Activities | 4 | Recent workouts, search by date/type, detailed splits |
Body | 3 | Weight trends, body composition, hydration tracking |
Fitness | 6 | Training readiness, VO2 Max, HRV, race predictions, endurance score |
Devices | 6 | Device info, step trends, personal records, SpO2, respiration, goals |
Export | 5 | Download FIT, GPX, TCX, KML, and CSV files |
Related MCP server: garth-mcp-server
Quick Start
Prerequisites
Python 3.10+
uv package manager
A Garmin Connect account with a paired device
1. Clone and install
git clone https://github.com/JohanBellander/garmin-mcp-server.git
cd garmin-mcp-server
uv sync2. Authenticate with Garmin
Run the one-time setup to save your OAuth tokens:
uv run garmin-mcp-setupYou'll be prompted for your email, password, and MFA code (if enabled). Tokens are saved to ~/.garminconnect/ and last approximately one year -- you won't need to re-authenticate until they expire.
3. Connect to your AI assistant
Claude Desktop
Add to ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):
{
"mcpServers": {
"garmin": {
"command": "uv",
"args": [
"--directory",
"/absolute/path/to/garmin-mcp-server",
"run",
"garmin-mcp-server"
]
}
}
}OpenCode
Add to your .opencode.json MCP config:
{
"mcp": {
"garmin": {
"command": "uv",
"args": [
"--directory",
"/absolute/path/to/garmin-mcp-server",
"run",
"garmin-mcp-server"
]
}
}
}Any MCP Client
The server uses STDIO transport. Point your client at:
uv --directory /path/to/garmin-mcp-server run garmin-mcp-serverExample Conversations
Once connected, you can ask your AI assistant things like:
"How did I sleep last night?"
"Show me my runs from the past two weeks"
"What's my training readiness today?"
"Compare my resting heart rate over the last 7 days"
"Download the GPX file for my last bike ride"
"What are my race predictions for a half marathon?"
"How many steps have I averaged this month?"
Available Tools
Health Data
Tool | Description |
| Steps, distance, calories, floors climbed, active minutes for a date |
| Resting HR, min/max, heart rate zone breakdown |
| Sleep duration, stages (deep/light/REM/awake), sleep score |
| All-day stress levels, average, duration by category |
| Energy reserve levels throughout the day |
Activities
Tool | Description |
| Most recent workouts with key metrics |
| Activities in a date range, filterable by type (running, cycling, etc.) |
| Full detail for a specific activity: pace, HR zones, elevation, training effect |
| Per-split/lap breakdown: pace, distance, HR, elevation |
Body Composition
Tool | Description |
| Weight measurements, BMI, body fat % |
| Weight, body fat, muscle mass, bone mass, body water |
| Daily water intake and progress toward goal |
Fitness Metrics
Tool | Description |
| Readiness score, HRV status, sleep quality, recovery time |
| Estimated VO2 Max for running and cycling |
| Training load and status classification |
| Predicted times for 5K, 10K, half marathon, and marathon |
| Heart Rate Variability: status, weekly average, baseline |
| Aerobic fitness score over time |
Export & Download
Tool | Description |
| Original FIT file (as ZIP) -- raw sensor data |
| GPX track -- GPS coordinates for mapping |
| TCX file -- GPS + HR + cadence |
| KML file -- for Google Earth |
| CSV file -- tabular data for spreadsheets |
Additional Tools
Tool | Description |
| Connected devices: model, firmware, battery, last sync |
| Step counts per day over a date range |
| Personal bests across all activities |
| Breathing rate: waking, sleeping, high, low |
| Blood oxygen saturation readings |
| Active fitness goals and current progress |
Configuration
Environment Variable | Default | Description |
|
| Directory where OAuth tokens are stored |
|
| Directory for downloaded activity files |
Development
Testing with MCP Inspector
uv run mcp dev src/garmin_mcp/server.pyThis opens a web UI where you can invoke tools individually and inspect responses.
Project Structure
src/garmin_mcp/
├── server.py # FastMCP server entry point
├── auth.py # OAuth token management + garmin-mcp-setup CLI
└── tools/
├── health.py # Daily health metrics
├── activities.py # Workout listing and details
├── body.py # Weight, body composition, hydration
├── fitness.py # Training metrics, HRV, race predictions
├── devices.py # Devices, steps, records, SpO2, goals
└── export.py # Activity file downloadsImportant Notes
Unofficial API -- This uses undocumented Garmin Connect endpoints via
python-garminconnect. Endpoints may change without warning.Rate Limits -- Garmin enforces rate limits. Avoid rapid-fire requests; the AI assistant handles this gracefully with error messages.
Token Refresh -- The underlying
garthlibrary handles token refresh automatically. Tokens typically last ~1 year.STDIO Safety -- The server never writes to stdout (which would corrupt the MCP transport). All logging goes to stderr.
No Interactive Auth -- The MCP server only uses pre-saved tokens. Run
garmin-mcp-setupseparately to authenticate.
License
MIT
Available Tools
29 toolsdownload_activity_csvA
Download a CSV file for a specific activity. Saves the CSV file and returns the file path. CSV files contain tabular activity data for spreadsheet analysis.
Inputs: activity_id (required). Returns: result
download_activity_fitA
Download a FIT file for a specific activity. Saves the original FIT file (as ZIP) and returns the file path. The FIT file contains the raw sensor data from the Garmin device.
Inputs: activity_id (required). Returns: result
download_activity_gpxA
Download a GPX file for a specific activity. Saves the GPX track file and returns the file path. GPX files contain GPS coordinates and are useful for mapping.
Inputs: activity_id (required). Returns: result
download_activity_kmlB
Download a KML file for a specific activity. Saves the KML file and returns the file path. KML files can be opened in Google Earth and similar tools.
Inputs: activity_id (required). Returns: result
download_activity_tcxA
Download a TCX file for a specific activity. Saves the TCX file and returns the file path. TCX files contain GPS + heart rate + cadence data.
Inputs: activity_id (required). Returns: result
get_activities_by_dateA
Get activities within a date range (YYYY-MM-DD). Optionally filter by activity type (running, cycling, swimming, etc.). Returns activity name, type, date, duration, distance, and key metrics.
Inputs: end_date (required), start_date (required), activity_type. Returns: result
get_activity_detailsB
Get detailed information for a specific activity by its ID. Returns comprehensive data including splits, HR zones, pace, elevation, etc.
Inputs: activity_id (required). Returns: result
get_activity_splitsA
Get split/lap data for a specific activity. Returns per-split pace, distance, elevation, heart rate.
Inputs: activity_id (required). Returns: result
get_body_batteryA
Get body battery data for a date (YYYY-MM-DD). Returns body battery levels showing energy reserves throughout the day.
Inputs: date (required). Returns: result
get_body_compositionA
Get body composition data for a date range (YYYY-MM-DD). Returns weight, body fat %, muscle mass, bone mass, body water %.
Inputs: start_date (required), end_date. Returns: result
get_daily_stepsA
Get daily step counts for a date range (YYYY-MM-DD). Returns step count per day, useful for trend analysis.
Inputs: end_date (required), start_date (required). Returns: result
get_daily_summaryB
Get daily activity summary for a date (YYYY-MM-DD). Returns steps, distance, calories, floors climbed, active minutes, and more.
Inputs: date (required). Returns: result
get_devicesA
Get information about connected Garmin devices. Returns device names, models, firmware versions, and last sync times.
Inputs: no named parameters. Returns: result
get_endurance_scoreB
Get endurance score for a date range (YYYY-MM-DD). Returns endurance score reflecting aerobic fitness over time.
Inputs: start_date (required), end_date. Returns: result
get_goalsA
Get active fitness goals. Returns current goals for steps, distance, calories, etc. and progress toward each.
Inputs: no named parameters. Returns: result
get_heart_rateB
Get heart rate data for a date (YYYY-MM-DD). Returns resting heart rate, min/max HR, and heart rate zones.
Inputs: date (required). Returns: result
get_hrvA
Get Heart Rate Variability (HRV) data for a date (YYYY-MM-DD). Returns HRV status, weekly average, and baseline.
Inputs: date (required). Returns: result
get_hydrationA
Get hydration data for a date (YYYY-MM-DD). Returns water intake in ml and progress toward daily goal.
Inputs: date (required). Returns: result
get_personal_recordsA
Get personal records (PRs) across all activities. Returns fastest times, longest distances, and other personal bests.
Inputs: no named parameters. Returns: result
get_race_predictionsA
Get race time predictions based on current fitness. Returns predicted times for 5K, 10K, half marathon, and marathon.
Inputs: no named parameters. Returns: result
get_recent_activitiesB
Get the most recent activities/workouts. Returns activity name, type, date, duration, distance, calories, and average HR.
Inputs: count. Returns: result
get_respirationA
Get respiration/breathing rate data for a date (YYYY-MM-DD). Returns breathing rate throughout the day.
Inputs: date (required). Returns: result
get_sleepA
Get sleep data for a date (YYYY-MM-DD). Returns sleep duration, sleep stages (deep, light, REM, awake), sleep score.
Inputs: date (required). Returns: result
get_spo2A
Get SpO2 (blood oxygen) data for a date (YYYY-MM-DD). Returns blood oxygen saturation readings.
Inputs: date (required). Returns: result
get_stressA
Get all-day stress data for a date (YYYY-MM-DD). Returns stress levels throughout the day, average stress, and stress duration breakdown.
Inputs: date (required). Returns: result
get_training_readinessA
Get training readiness score for a date (YYYY-MM-DD). Returns readiness score, HRV status, sleep quality, recovery time, and training load.
Inputs: date (required). Returns: result
get_training_statusB
Get training status for a date (YYYY-MM-DD). Returns training load, training effect, and training status classification.
Inputs: date (required). Returns: result
get_vo2maxA
Get VO2 Max / max metrics data for a date (YYYY-MM-DD). Returns estimated VO2 Max for running and cycling.
Inputs: date (required). Returns: result
get_weightA
Get weight/weigh-in data for a date range (YYYY-MM-DD). Returns weight measurements, BMI, body fat percentage if available.
Inputs: start_date (required), end_date. Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 29 tools
Most tools map to distinct Garmin data categories, but a few boundaries are fuzzy: get_weight and get_body_composition overlap on weight and body fat, and get_daily_summary overlaps with get_daily_steps and get_heart_rate on daily metrics. Still, an agent can usually select the right tool from the descriptions.
The naming follows a consistent verb_noun pattern: get_* for data retrieval and download_activity_* for file exports. Plural/singular variations are minor and do not affect predictability.
29 tools is excessive for a Garmin data server. Many could be consolidated, such as the five download_activity_format tools into a single exporter, and get_weight/get_body_composition into one body metrics tool. The broad scope helps justify the number, but the surface still feels over-split.
The server covers a comprehensive read-only Garmin domain: activities, daily summaries, body metrics, health metrics, training readiness, sleep, stress, devices, and file downloads. Minor gaps exist, such as lacking date-range endpoints for some metrics (e.g., sleep, stress) and no way to search activities beyond recent/date-based retrieval.
Maintenance
Related MCP Connectors
Adaptive running coach MCP server — training data, plans, and recovery for AI assistants.
Garmin watch data for AI assistants: activities, sleep, HRV, recovery. Never writes to Garmin.
1Garmin data in Claude & ChatGPT via the Garmin Health API. OAuth sign-in, no password sharing.
Explore Garmin activity and health data with your AI assistant.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceMCP server that connects Garmin Connect data to Claude, enabling training analysis, recovery checks, and personalized plans based on real metrics like HRV, training load, and activities.24MIT
- AlicenseNot gradedqualityDmaintenanceMCP server to interact with Garmin Connect, enabling retrieval of health, activity, and device data through natural language.66MIT
- AlicenseNot gradedqualityDmaintenanceA local MCP server that exposes your Garmin Connect data—sleep, HRV, training readiness, workouts, and more—to any MCP-compatible AI assistant. Runs entirely on your machine and keeps your Garmin credentials private.MIT
- AlicenseBqualityBmaintenanceAn MCP server that gives LLMs access to Garmin Connect data, including training, recovery, sleep, stress, VO2 Max, and running summaries for personalized fitness advice.2442 PyPI1MIT