Garmin MCP Server
Integrates with Garmin Connect to retrieve activity data, health metrics, and provide AI-powered training insights and personalized coaching recommendations based on your fitness activities and performance trends.
README
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
Installation
-
Clone or download this repository
-
Install dependencies:
cd garmin-mcp npm install -
Build the TypeScript code:
npm run build
Configuration
Environment Variables Setup (Recommended)
For security and convenience, you can store your Garmin Connect credentials in environment variables:
-
Create a .env file:
touch .env -
Add your credentials to the .env file:
# .env GARMIN_USERNAME=your.email@example.com GARMIN_PASSWORD=your_secure_password GARMIN_AUTO_AUTH=true -
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"]
}
}
}
Triathlon Expert Mode (Recommended)
For the best coaching experience, add the triathlon expert prompt to your Claude project:
- Create or open your project in Claude Desktop
- Add the expert prompt by copying the contents of
TRIATHLON_EXPERT_PROMPT.mdto your project's context - 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:
Option 1: Environment Variables (Recommended)
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 usernamepassword: 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 analyzedays(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 formatendDate(optional): End date in YYYY-MM-DD formatmetrics(optional): Specific metrics to retrieve (['heartRate', 'stress', 'sleep', 'bodyBattery', 'vo2Max'])
Usage Examples
Getting Started
- Authenticate: "Please authenticate with my Garmin Connect account"
- View Recent Activities: "Show me my recent activities"
- Get Insights: "Analyze my running performance from the last week"
- 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 TypeScriptgarmin-connect: Unofficial Garmin Connect API clientzod: 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
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.