Logo vun Garmin 训练计划 MCP 服务器

Garmin 训练计划 MCP 服务器

Communautéit
st3v

MCP server with tools to manage workouts on Garmin Connect

Editeurst3v
Repositorygarmin-workouts-mcp
SproochPython
Forks
7
Stären
29
Disponibel Tools
0
Transporttypstdio
Kategorien
LizenzMIT
Linken
  • Tools mat KI-Workflows verbannen

    Garmin 训练计划 MCP 服务器 stellt MCP-Funktioune bereit, déi vu kompatibele KI-Clienten a KI-Agente kënne benotzt ginn.

  • 0 disponibel Tools

    Kuckt Iech déi opruffbar Aktiounen hei drënner un, mat Nimm a Beschreiwungen, wa se vum Server geliwwert ginn.

  • Konfiguratioun fir ze kopéieren

    Benotzt d'Installatiounsbeispiller, fir dëse Server an Ärem bevorzugte MCP-Client ze konfiguréieren.

  • Indicateure fir Open Source

    29 Stären an 7 Forks aus dem verlinkte Repository.

Garmin Workouts MCP Server

CI/CD Pipeline

An MCP server that allows you to create, list, and manage Garmin Connect workouts using natural language descriptions through MCP-compatible clients.

Features

  • Create workouts: Generate structured Garmin workouts from natural language descriptions using AI
  • List workouts: View all your existing workouts on Garmin Connect
  • Get workout details: Retrieve detailed information about specific workouts
  • Schedule workouts: Schedule workouts on specific dates in Garmin Connect
  • Delete workouts: Remove workouts from Garmin Connect
  • Activity management: List, view, and get weather data for completed activities
  • Calendar integration: View calendar data with workouts and activities
  • MCP Integration: Works with any MCP-compatible client (Claude Desktop, etc.)

Setup

  1. Install and run using uvx:
bash
uvx garmin-workouts-mcp
  1. Configure in your MCP client (e.g., Claude Desktop):

Add to your MCP client configuration:

json
{
  "mcpServers": {
    "garmin-workouts": {
      "command": "uvx",
      "args": ["garmin-workouts-mcp"],
      "env": { # See Authentication section for details
        "GARMIN_EMAIL": "your_email@example.com",
        "GARMIN_PASSWORD": "your_password"
      }
    }
  }
}

Authentication

The Garmin Workouts MCP Server authenticates with Garmin Connect using garth [https://github.com/matin/garth]. There are two primary ways to provide your Garmin credentials:

1. Using Environment Variables

You can set your Garmin Connect email and password as environment variables before starting the MCP server.

  • GARMIN_EMAIL: Your Garmin Connect email address.
  • GARMIN_PASSWORD: Your Garmin Connect password.

Example:

bash
export GARMIN_EMAIL="your_email@example.com"
export GARMIN_PASSWORD="your_password"
uvx garmin-workouts-mcp

2. Out-of-Band Authentication with garth

Alternatively, you can log in to Garmin Connect once using the garth library directly and save your authentication tokens to a directory, which the MCP server will then use for subsequent sessions. This method is useful if you prefer not to store your credentials as environment variables or as part of your MCP client configuration.

To log in out-of-band:

  1. Install garth:

    bash
    pip install garth
  2. Run the following Python script in your terminal:

    python
    import garth
    from getpass import getpass
    
    email = input("Enter email address: ")
    password = getpass("Enter password: ")
    # If there's MFA, you'll be prompted during the login
    garth.login(email, password)
    
    garth.save("~/.garth")

    Follow the prompts to enter your Garmin Connect email and password. Upon successful login, garth will save your authentication tokens to ~/.garth.

    The MCP server will automatically look for these saved tokens. If you wish to store them in a custom location, you can set the GARTH_HOME environment variable.

Usage

This server provides the following MCP tools that can be used through any MCP-compatible client:

Generate Workout Data Prompt

Use the generate_workout_data_prompt tool to create a prompt for an LLM to generate structured workout data:

generate_workout_data_prompt("10 min warmup, 5x(1km at 4:30 pace, 2min recovery), 10 min cooldown")

Upload Workout

Use the upload_workout tool to upload structured workout data to Garmin Connect:

upload_workout(workout_data_json)

Schedule Workout

Use the schedule_workout tool to schedule a workout on a specific date:

schedule_workout("workout_id_here", "2024-01-15")

Delete Workout

Use the delete_workout tool to remove a workout from Garmin Connect:

delete_workout("workout_id_here")

List Workouts

list_workouts()

Get Workout Details

get_workout("workout_id_here")

List Activities

Use the list_activities tool to view completed activities (runs, rides, swims, etc.) from Garmin Connect:

list_activities()

Optional parameters:

  • limit: Number of activities to return (default: 20)
  • start: Starting position for pagination (default: 0)
  • activityType: Filter by activity type (e.g., "running", "cycling", "swimming")
  • search: Search for activities containing specific text

Example with filters:

list_activities(limit=50, activityType="running", search="Marathon")

Get Activity Details

Use the get_activity tool to retrieve detailed information about a specific activity:

get_activity("activity_id_here")

Returns comprehensive activity data including distance, duration, pace, heart rate, and more.

Get Activity Weather

Use the get_activity_weather tool to get weather conditions during a specific activity:

get_activity_weather("activity_id_here")

Returns weather data including temperature, humidity, wind conditions, and weather descriptions.

Get Calendar Data

Use the get_calendar tool to view calendar data with workouts and activities:

get_calendar(2024, 7)  # Monthly view for July 2024
get_calendar(2024, 7, 15)  # Weekly view including July 15th

The tool supports various workout types:

  • Running: pace targets, distance/time based intervals
  • Cycling: power, cadence, speed targets
  • Swimming: time/distance based sets
  • Strength training: circuit-style workouts
  • General cardio: heart rate based training

Workout Description Examples

Creating New Workouts

  • "30min easy run at conversational pace"
  • "5km tempo run at 4:15 min/km pace"
  • "10 min warmup, 3x(20min at 280w, 5min at 150w), 10min cooldown"
  • "Swimming: 400m warmup, 8x(50m sprint, 30s rest), 400m cooldown"
  • "Strength circuit: 5x(30s pushups, 30s squats, 30s plank, 60s rest)"

Querying Activities

  • "Show me my last 10 running activities"
  • "Find all cycling activities from last month"
  • "What was the weather like during my morning run on July 4th?"
  • "Get details for my longest run this year"

Supported Activity Types

The list_activities tool supports filtering by the following activity types:

  • running, cycling, swimming, walking, hiking
  • fitness_equipment, multi_sport, yoga, diving
  • auto_racing, motorcycling, surfing, windsurfing
  • skiing variants: backcountry_skiing_snowboarding_ws, cross_country_skiing_ws, resort_skiing_snowboarding_ws, skate_skiing_ws
  • climbing variants: bouldering, indoor_climbing
  • specialized: breathwork, e_sport, safety
  • water_sports: offshore_grinding, onshore_grinding
  • other and winter_sports for general categorization

Environment Variables

  • GARMIN_EMAIL: Your Garmin Connect email address (optional)
  • GARMIN_PASSWORD: Your Garmin Connect password (optional)
  • GARTH_HOME: Custom location for Garmin credentials (optional, defaults to ~/.garth)

Credits

This project incorporates ideas and prompt designs inspired by openai-garmin-workout, which is licensed under the MIT License.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Installatioun

TypingMind
Viraussetzungen:

Node.js 18+

{
  "mcpServers": {
    "st3v-garmin-workouts-mcp": {
      "command": "uvx",
      "args": [
        "garmin-workouts-mcp"
      ]
    }
  }
}

Garmin 训练计划 MCP 服务器 MCP mat verschiddene KI-Modeller benotzen

TypingMind verbënnt MCP-Tools um Niveau vum Aarbechtsberäich. Soubal Garmin 训练计划 MCP 服务器 verbonnen ass, kënnt Dir et mat verschiddene KI-Modeller an TypingMind benotzen, amplaz et fir all Modell separat anzeriichten. Dës MCP-Integratioun leeft lokal iwwer den TypingMind-MCP-Connector op Ärem Apparat.

Ariichtungsuleedung fir de lokale Connector ze benotzen

Benotzt dës Optioun, wann den MCP-Server Zougrëff op lokal Fichieren, Appen oder privat Ressourcen op Ärem Computer brauch.

1

D'MCP-Astellungen opmaachen

Gitt an TypingMind op „Astellungen“, „Erweidert Astellungen“, dann op „Model Context Protocol“ a wielt „Connector ariichten“.

  1. Maacht TypingMind an Ärem Browser op.
  2. Klickt op d'Astellungssymbol.
  3. Gitt op „Erweidert Astellungen“.
  4. Maacht d'Sektioun „Model Context Protocol“ op.
  5. Klickt op „Connector ariichten“ a wielt „Dësen Apparat“.
Ariichtungsbildschierm vum TypingMind-MCP-Connector mat „Dësen Apparat“ ausgewielt
2

De Connector-Befeel ausféieren

Wielt „Dësen Apparat“, kopéiert de Befeel aus TypingMind a féiert en am Terminal aus. Loosst de Prozess lafen, wärend Dir MCP benotzt.

  1. Kopéiert den Ariichtungsbefeel, deen TypingMind uweist.
  2. Maacht Terminal op macOS oder Windows Terminal op Windows op.
  3. Pescht de Befeel an a féiert en aus.
  4. Bestätegt d'Installatioun vum Package, wann den Terminal Iech freet, ob Dir weiderfuere wëllt.
  5. Loosst den Terminal an de Prozess doranner lafen, wärend Dir MCP-Tools benotzt.
3

Garmin 训练计划 MCP 服务器 als Server derbäisetzen

Wann de Connector-Status „Prett“ ass, klickt op „Serveren änneren“ a pescht d'MCP-Serverkonfiguratioun an.

  1. Waart, bis de Connector-Status „Prett“ weist.
  2. Klickt op „Serveren änneren“.
  3. Pescht d'MCP-Serverkonfiguratioun vu Garmin 训练计划 MCP 服务器 an.
  4. Späichert d'Serverlëscht.
  5. Aktualiséiert, wann Dir kontrolléiere wëllt, ob de Connector nach ëmmer prett ass.
MCP-Astellunge vun TypingMind mat aktivem Server an dem Knäppchen „Serveren änneren“
{
  "mcpServers": {
    "st3v-garmin-workouts-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "garmin-workouts-mcp"
      ]
    }
  }
}
4

D'Verbindung mat verschiddene Modeller benotzen

Späichert d'Serverlëscht, maacht „Plugins“ op an aktivéiert d'MCP-Tools vu Garmin 训练计划 MCP 服务器. Wielt dann e belibegen ënnerstëtzte KI-Modell an TypingMind a benotzt d'Tools am Chat oder weist se engem KI-Agent zou.

  1. Maacht d'Säit „Plugins“ an TypingMind op.
  2. Aktivéiert d'MCP-Tools vu Garmin 训练计划 MCP 服务器.
  3. Start e Chat a wielt de KI-Modell, deen Dir benotze wëllt.
  4. Benotzt d'MCP-Tools am Chat oder weist se engem KI-Agent zou.
  5. Wiesselt bei Bedarf op en anere KI-Modell, ouni MCP nei ze verbannen.
TypingMind-Chat mat aktivéierte MCP-Tools an engem ausgewielte KI-Modell
Hëlleft Dir mir bei dëser Aufgab mat Garmin 训练计划 MCP 服务器?
Garmin 训练计划 MCP 服务器
Jo. Ech hunn et gelies.
Dat hunn ech mat Garmin 训练计划 MCP 服务器 fonnt.

Heefeg gestallte Froen

Fir wat gëtt de MCP-Server Garmin 训练计划 MCP 服务器 benotzt?

Garmin 训练计划 MCP 服务器 ass e MCP-Server, deen et kompatibele KI-Clienten erlaabt, sech mat externen Tools a Kontext ze verbannen. An TypingMind kënnt Dir dëse MCP-Server eemol derbäisetzen a seng Tools an Ärem KI-Aarbechtsberäich zur Verfügung stellen.

Kann ech Garmin 训练计划 MCP 服务器 MCP mat méi KI-Modeller an TypingMind benotzen?

Jo. TypingMind verbënnt MCP-Tools um Niveau vum Aarbechtsberäich. Sou kënnt Dir Garmin 训练计划 MCP 服务器 mat verschiddene KI-Modeller wéi Claude, ChatGPT, Gemini oder anere Modeller benotzen, déi Dir an TypingMind konfiguréiert hutt, ouni de MCP-Server fir all Modell separat anzeriichten.

Firwat Garmin 训练计划 MCP 服务器 MCP mat TypingMind benotzen?

TypingMind ass eng vun de beschte Benotzeruewerfläche fir LLM-Chat, well et méi KI-Modeller, Prompts, Plugins, KI-Agenten, API-Schlësselen a MCP-Tools an engem Aarbechtsberäich zesummebréngt. Wann Garmin 训练计划 MCP 服务器 verbonnen ass, kënnt Dir seng MCP-Tools mat Äre bevorzugte Modeller benotzen a gläichzäiteg Är Chataarbecht an TypingMind organiséieren.

Wéi verbannen ech Garmin 训练计划 MCP 服务器 MCP mat TypingMind?

Garmin 训练计划 MCP 服务器 leeft iwwer de lokale MCP-Connector vun TypingMind. Dat eegent sech am beschten, wann de MCP-Server Zougrëff op lokal Fichieren, Desktop-Apps, Kommandozeilen-Tools oder privat Ressourcen op Ärem Computer brauch.

Wéi eng Tools stellt Garmin 训练计划 MCP 服务器 MCP an TypingMind zur Verfügung?

Garmin 训练计划 MCP 服务器 stellt MCP-Funktiounen zur Verfügung, déi Dir op der Plugins-Säit vun TypingMind aktivéiere kënnt, fir se am Chat ze benotzen oder KI-Agenten zouzeweisen.

Muss ech meng API-Schlëssele mat TypingMind deelen, fir Garmin 训练计划 MCP 服务器 MCP ze benotzen?

Nee. TypingMind setzt op lokal Veraarbechtung a léisst Iech d'Kontroll iwwer Är Modellubidder, API-Schlësselen, Prompts a MCP-Konfiguratioun. Wann Garmin 训练计划 MCP 服务器 eng Authentifizéierung verlaangt, setzt déi néideg Headeren, OAuth-Astellungen oder lokal Konfiguratioun fir dee MCP-Server derbäi, wann Dir d'Verbindung erstallt.

Änlech MCP-Serveren

All weisen

Elo Ären eegene KI-Workspace ariichten

Abonnéiert Iech op eisen Newsletter, fir iwwer nei Funktiounen an zukünfteg Gewënnspiller informéiert ze ginn 👇