A community-driven registry for Claude, Cursor, Windsurf, Cline & more. Not affiliated with Anthropic.
Are you the author? Sign in to claim
About MCP server to access Garmin Activity data and create workouts and training plans to the Garmin Connect account cal
The Garmin Workouts Model Context Protocol (MCP) server connects to Garmin Connect APIs and exposes your fitness and health data to AI agents that support the MCP standard. Users can use this server to access your Garmin activities, workouts, and workout templates from AI clients like Claude Desktop or VS Code Copilot, enabling users to query about their activity data, get insights and get AI generated workout plans.
This project is in early development (v0.1) and currently supports read-only access to activities, workouts, and workout templates.
The source code is a simplified and refactored version of the original Garmin MCP server available at garmin_mcp. The original mcp solution is still available and maintained, but this forked version is designed to reduce the data access surface area to the AI agent and focus on the core features for creating workout training plans rather than exposing all the data and features of the Garmin Connect API.
Garmin's API is accessed via the python-garminconnect library and also the garth
Once connected in Claude Desktop/VS Code Copilot, you can ask questions like:
This MCP server implements tools for the following domains:
✅ Activity Management — 13 read-only tools 🏃
get_activities — list activities with pagination support (newest first)get_activities_by_date — list activities between two dates, optionally filtered by typeget_activities_fordate — list activities recorded on a specific dateget_activity — get detailed information for a single activityget_activity_splits — get lap/split data for an activityget_activity_typed_splits — get typed splits (run/walk/etc.) for an activityget_activity_split_summaries — get split summary statistics for an activityget_activity_weather — get weather conditions recorded during an activityget_activity_hr_in_timezones — get heart rate distribution across HR zones for an activityget_activity_gear — get gear (shoes, bike, etc.) used for an activityget_activity_exercise_sets — get exercise sets for strength training activitiesget_activity_types — list all activity types supported by Garmin Connectcount_activities — get the total number of activities in the account✅ Workouts — 11 read/write tools 💪
get_workouts — list all workouts in the Garmin Connect workout libraryget_workout_by_id — get full details for a workout by numeric ID or UUIDupload_workout — create a new workout from structured JSON dataupload_workouts — create multiple workouts from structured JSON data in a single calldelete_workout — permanently delete a workout from the librarydelete_workouts — permanently delete multiple workouts from the library in a single callschedule_workout — schedule a workout to a specific calendar dateschedule_workouts — schedule multiple workouts (or upload-and-schedule inline) in a single callget_scheduled_workouts — list workouts scheduled on the calendar between two datesget_training_plan_workouts — get Garmin Coach / training plan workouts for a given weekdownload_workout — download a workout in FIT file format✅ Workout Templates — 5 MCP resources 📂
workout://templates/simple-run — basic warmup / run / cooldown structureworkout://templates/interval-running — interval training with repeat groups (6×400 m)workout://templates/tempo-run — tempo run targeting a heart rate zoneworkout://templates/strength-circuit — strength training circuit with repeat groupsworkout://reference/structure — complete JSON structure reference for building workoutsThis server uses the garminconnect and garth libraries for authentication, which relies on Garmin's SSO OAuth tokens. The access token grants access to the Garmin Connect API with read and write permissions. The token scopes are not user-configurable in the auth library (garth). For that reason least-privilege access has been applied by design at the MCP Tool level as follows:
[!NOTE] Garmin’s official API program is available for Enterprise use only and not for individual developers to access. I tried to get access to the official API but was denied because I'm doing this as a Open Source individual project. For that reason I turner to other existing open source libraries. The
garminconnectlibrary uses reverse-engineered API endpoints and relies on OAuth tokens obtained through the Garmin Connect web/mobile login flow. Thegarmin-mcp-authtool is a workaround to obtain these tokens for use with the MCP server, but it is not an official or long-term solution.
The Garmin Workouts MCP depends on the Garmin connect library and that uses the Garth library for authentication, which relies on long lived OAuth tokens.
The Garth library uses Garmin Connect’s mobile-app SSO flow to obtain and persist long-lived (one year) session tokens, which python-garminconnect (API Wrapper) then uses to call Garmin Connect API endpoints.
The garmin-mcp-auth tool is a one-time setup utility that prompts you for your Garmin Connect credentials and MFA code (if enabled) to obtain these tokens. The tokens are then saved locally and used by the MCP server for authentication when making API requests to Garmin Connect.
The secret management in this solution can be considered insecure specially the use of long lived OAuth access tokens. We are working on alternatives such as short lived tokens with automatic refresh or integration with external secret managers or keyvaults. In the meantime, you must pre-authenticate to obtain the necessary tokens for the server to function. Use this tool at your own discretion and be aware of the security implications of storing credentials and tokens on your machine. However the scopes of the MCP tools are limited to read-only access for activities and read-write access for workouts, which minimizes potential risks.
Before adding to Claude Desktop or VS Code Copilot, authenticate once in your terminal:
# Install and run authentication tool
uvx --python 3.12 --from git+https://github.com/brunosantos/garmin-workouts-mcp garmin-mcp-auth
# You'll be prompted for:
# - Email (or set GARMIN_EMAIL env var)
# - Password (or set GARMIN_PASSWORD env var)
# - MFA code (if enabled on your account)
# OAuth tokens will be saved to ~/.garminconnect
You can verify your credentials at any time with
uv run garmin-mcp-auth --verify
Note: This will create a local file at ~/.garminconnect with your Garmin Connect long lived tokens (one year). The MCP server will read from this file to authenticate API requests. These tokens will have a one year lifespan.
[!WARNING]
Here be dragons 🐉. Long Lived Tokens are a security risk and against OAuth's best practices, but is a limitation of the underlyinggarminconnectlibrary. Use with caution and be aware of the security implications. For this reason I've restricted the scope of the MCP server to only the necessary API endpoints (read-only for activities and workout templates, read-write for workouts) to minimize potential risks. I'm working on an alternative using short lived tokens with automatic refresh.
Prerequisite: Complete Step 1: Pre-authenticate before configuring Claude Desktop.
Add to your Claude Desktop MCP settings WITHOUT credentials:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"garmin-workouts": {
"command": "uvx",
"args": [
"--python",
"3.12",
"--from",
"git+https://github.com/brunosantos/garmin-workouts-mcp",
"garmin-workouts-mcp"
]
}
}
}
Important: No GARMIN_EMAIL or GARMIN_PASSWORD needed in config! The server uses your saved tokens.
Your Garmin data is now available in Claude Desktop !
Prerequisite: Complete Step 1: Pre-authenticate before configuring VS Code.
For quick installation, use one of the one-click install buttons below:
For manual installation, you can configure the MCP server using one of these methods:
Method 1: User Configuration (Recommended) Add the configuration to your user-level MCP configuration file. Open the Command Palette (Ctrl + Shift + P) and run MCP: Open User Configuration. This will open your user mcp.json file where you can add the server configuration.
Method 2: Workspace Configuration Alternatively, you can add the configuration to a file called .vscode/mcp.json in your workspace. This will allow you to share the configuration with others.
For more details about MCP configuration in VS Code, see the official VS Code MCP documentation.
{
"servers": {
"garmin-workouts": {
"command": "uvx",
"args": [
"--python",
"3.12",
"--from",
"git+https://github.com/brunosantos/garmin-workouts-mcp",
"garmin-workouts-mcp"
]
}
}
}
Important: No GARMIN_EMAIL or GARMIN_PASSWORD needed in config! The server uses your saved tokens from the pre-authentication step.
{
"mcpServers": {
"garmin-workouts-local": {
"command": "uv",
"args": [
"--directory",
"<full path to your local repository>/garmin-workouts-mcp",
"run",
"garmin-workouts-mcp"
]
}
}
}
The Inspector runs directly through npx without requiring installation. Run from the project root:
npx @modelcontextprotocol/inspector uv run garmin--workouts-mcp
You'll be able to inspect and test the tools.
If you encounter login issues:
This project includes comprehensive tests for all MCP tools. All tests are currently passing (100%).
# Run all integration tests (default - uses mocked Garmin API)
uv run pytest tests/integration/
# Run tests with verbose output
uv run pytest tests/integration/ -v
# Run a specific test module
uv run pytest tests/integration/test_activity_management_tools.py -v
# Run end-to-end tests (requires real Garmin credentials)
uv run pytest tests/e2e/ -m e2e -v
A Jetbrains IDE IntelliJ plugin aimed to provide coding agents the ability to leverage intelliJ's indexing of the codeba
Run Claude Code as an MCP server so any agent can delegate coding tasks to it
Browser automation using accessibility snapshots instead of screenshots