Skip to main content
Glama

Garmin MCP Server

A Model Context Protocol (MCP) server that integrates with Garmin Connect to provide activity insights and training suggestions for Claude Desktop.

Features

  • Activity Tracking: Retrieve recent activities from Garmin Connect

  • Activity Insights: Get detailed analysis of individual activities or activity patterns

  • Training Suggestions: AI-powered recommendations based on your training data and health metrics

  • Health Metrics: Access to comprehensive health data including heart rate, sleep, stress, and body battery

  • Performance Analysis: Automated analysis of training load, recovery, and performance trends

Related MCP server: Garmin Workouts MCP Server

Installation

  1. Clone or download this repository

  2. Install dependencies:

    cd garmin-mcp
    npm install
  3. Build the TypeScript code:

    npm run build

Configuration

For security and convenience, you can store your Garmin Connect credentials in environment variables:

  1. Create a .env file:

    touch .env
  2. Add your credentials to the .env file:

    # .env
    GARMIN_USERNAME=your.email@example.com
    GARMIN_PASSWORD=your_secure_password
    GARMIN_AUTO_AUTH=true
  3. Secure the file:

    chmod 600 .env

With environment variables configured, the MCP server will:

  • Automatically authenticate on startup (if GARMIN_AUTO_AUTH=true)

  • Use your stored credentials as fallback for authentication commands

  • Keep your credentials secure and out of version control

Claude Desktop Setup

Add the MCP server to your Claude Desktop configuration:

macOS: ~/Library/Application Support/Claude/claude_desktop_config.json Windows: %APPDATA%\\Claude\\claude_desktop_config.json

{
  "mcpServers": {
    "garmin": {
      "command": "node",
      "args": ["path/to/garmin-mcp/dist/index.js"]
    }
  }
}

For the best coaching experience, add the triathlon expert prompt to your Claude project:

  1. Create or open your project in Claude Desktop

  2. Add the expert prompt by copying the contents of TRIATHLON_EXPERT_PROMPT.md to your project's context

  3. Enable code execution in your project settings for accurate calculations

This prompt transforms Claude into a world-class triathlon coach that:

  • Uses code for all calculations to prevent estimation errors

  • Provides data-driven training insights

  • Offers personalized coaching based on your Garmin data

  • Analyzes performance trends with scientific accuracy

Garmin Connect Authentication

The MCP server supports multiple authentication methods:

Set up your .env file as described above. The server will automatically authenticate on startup.

Option 2: Manual Authentication

Use the authenticate_garmin tool within Claude Desktop. If you have environment variables set, you can simply call:

  • "Please authenticate with Garmin Connect" (uses env vars)

  • Or provide credentials manually: "Authenticate with username X and password Y"

Important: Credentials are only stored in memory during the session and are not persisted to disk.

Available Tools

1. authenticate_garmin

Authenticate with Garmin Connect using your username and password.

Parameters:

  • username: Your Garmin Connect username

  • password: Your Garmin Connect password

2. get_activities

Retrieve recent activities from Garmin Connect.

Parameters:

  • days (optional): Number of days to look back (default: 30)

  • limit (optional): Maximum number of activities to return (default: 50)

3. get_activity_insights

Get detailed insights for a specific activity or recent activities.

Parameters:

  • activityId (optional): Specific activity ID to analyze

  • days (optional): Number of days to analyze if no activity ID specified (default: 7)

4. get_training_suggestions

Get AI-powered training suggestions based on recent activities and performance.

Parameters:

  • activityType (optional): Type of activity to focus on ('running', 'cycling', 'swimming', 'strength', 'all')

  • days (optional): Number of days of history to consider (default: 14)

5. get_health_metrics

Get health and wellness metrics from Garmin Connect.

Parameters:

  • startDate (optional): Start date in YYYY-MM-DD format

  • endDate (optional): End date in YYYY-MM-DD format

  • metrics (optional): Specific metrics to retrieve (['heartRate', 'stress', 'sleep', 'bodyBattery', 'vo2Max'])

Usage Examples

Getting Started

  1. Authenticate: "Please authenticate with my Garmin Connect account"

  2. View Recent Activities: "Show me my recent activities"

  3. Get Insights: "Analyze my running performance from the last week"

  4. Training Advice: "Give me training suggestions based on my recent workouts"

Detailed Analysis

  • "What are my sleep patterns and how do they affect my recovery?"

  • "Analyze my heart rate trends during cycling activities"

  • "Give me specific recommendations for improving my running pace"

  • "How is my training load compared to my recovery metrics?"

Data Privacy

  • This MCP server accesses your Garmin Connect data only during active sessions

  • No data is stored permanently on your device

  • Authentication credentials are not persisted between sessions

  • All data processing happens locally on your machine

Dependencies

  • @modelcontextprotocol/sdk: MCP SDK for TypeScript

  • garmin-connect: Unofficial Garmin Connect API client

  • zod: Schema validation

Development

To run in development mode:

npm run dev

To build:

npm run build

Limitations

  • Requires valid Garmin Connect credentials

  • Depends on the unofficial Garmin Connect API (may break with Garmin updates)

  • Some advanced metrics may not be available depending on your Garmin device

  • Rate limiting by Garmin Connect may apply

Troubleshooting

Authentication Issues

  • Ensure your Garmin Connect credentials are correct

  • Check if your account requires two-factor authentication (not currently supported)

  • Verify your account is not locked or suspended

Missing Data

  • Some metrics require specific Garmin devices

  • Ensure your device is synced with Garmin Connect

  • Check that the requested date range contains activities

Connection Issues

  • Verify your internet connection

  • Check if Garmin Connect services are operational

  • Try authenticating again if the session has expired

License

MIT License - see LICENSE file for details

Available Tools

14 tools
authenticate_garminB

Authenticate with Garmin Connect using username and password (can use environment variables)

Inputs: username, password.

create_running_workoutC

Create a new running workout plan

Inputs: name (required), distance (required), description (required).

custom_garmin_requestC

Make custom API requests to Garmin Connect (advanced users)

Inputs: method (required), endpoint (required), data, params.

get_activitiesC

Get recent activities from Garmin Connect

Inputs: days, limit.

get_activity_insightsC

Get detailed insights for a specific activity or recent activities

Inputs: activityId, days.

get_activity_statsC

Get comprehensive activity statistics and counts

Inputs: no named parameters.

get_golf_dataC

Get golf performance data and scorecards

Inputs: scorecardId.

get_health_metricsC

Get health and wellness metrics from Garmin Connect

Inputs: startDate, endDate, metrics.

get_training_suggestionsB

Get AI-powered training suggestions based on recent activities and performance

Inputs: activityType, days.

get_user_profileB

Get detailed user profile and settings from Garmin Connect

Inputs: no named parameters.

get_workout_detailC

Get detailed information about a specific workout

Inputs: workoutId (required).

get_workoutsC

Get workout plans and schedules from Garmin Connect

Inputs: start, limit.

manage_activitiesC

Upload, delete, or modify activities

Inputs: action (required), activityId, filePath.

update_health_dataC

Update weight or hydration data in Garmin Connect

Inputs: type (required), value (required), date, timezone.

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    B3.2/5.0

    Scored across 14 tools

    Disambiguation4/5

    Most tools have distinct purposes, but some overlap exists between get_activities and get_activity_insights, and between get_workouts and get_workout_detail, which could cause minor confusion. However, descriptions clarify their specific focuses, and other tools like create_running_workout and manage_activities are clearly differentiated.

    Naming Consistency4/5

    The naming follows a consistent verb_noun pattern (e.g., get_activities, create_running_workout) with one exception: custom_garmin_request uses 'custom' as an adjective, slightly deviating from the pattern. Overall, it's mostly predictable and readable.

    Tool Count5/5

    With 14 tools, the count is well-scoped for a Garmin fitness and health data server, covering authentication, activities, workouts, health metrics, and golf data. Each tool appears to serve a specific function without redundancy, fitting the domain's complexity.

    Completeness4/5

    The tool set provides broad coverage for Garmin Connect operations, including CRUD for activities and health data, plus specialized features like training suggestions and golf data. Minor gaps might include lack of direct workout modification or more granular health metric updates, but core workflows are well-supported.

    Maintenance

    ActivityInactive
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers

    • F
      license
      Not graded
      quality
      C
      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.
      4
      -
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables AI assistants to read Garmin activities and create/schedule structured workouts and multi-week training plans on Garmin Connect, syncing to the user's watch.
      1
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables AI assistants to read Garmin activities and create/schedule structured workouts and multi-week training plans directly on Garmin Connect, syncing to your watch with guided prompts.
      1
      MIT