Skip to main content
Glama

selfcoach-mcp — self-coaching for Garmin athletes

An AI coach on top of your Garmin data. An MCP server that lets Claude (or any MCP client) read your Garmin Connect data, tell you what kind of session suits today, put structured workouts on your watch, and review your week with insights Garmin doesn't compute.

It is built for people who train without a coach and want a daily routine with their assistant. If you do have a coach who plans in Garmin Connect, it works with that too and never touches their workouts.

⚠️ Unofficial project, not affiliated with or endorsed by Garmin. It uses the same private API as the Garmin Connect website (through python-garminconnect), which Garmin can change at any time. Use at your own risk, and see Disclaimer.

What it does that other Garmin MCPs don't

Typical Garmin MCP

selfcoach-mcp

Tools

50–100+ raw endpoints

12 high-level tools + 8 ready-made slash commands (/today, /week, /log…)

Output

Raw Garmin JSON

Compact Markdown with the numbers that matter

"Should I train hard today?"

You interpret the data

Rest / easy / moderate / hard suggestion, with the reasons

Workouts

Read only

Builds structured workouts and schedules them on your watch (intervals with HR/pace/power targets, strength sets with reps and weight)

Insights

Garmin's metrics only

Intensity distribution vs 80/20, training monotony and strain, weekly ramp rate, rest days, resting-HR drift, RPE vs heart-rate checks

Goals

None

Target event, with phase-aware advice (base, build, peak, taper, race week)

Journal

None

Notes with perceived effort (RPE) linked to activities

Speed and reliability

Calls Garmin on every question

Local database with incremental sync: fast, works when Garmin is down, fewer rate limits

Sports

Running-centric

Any sport: strength with sets and loads, laps as motos in motocross, cycling, etc.

Related MCP server: Garmin MCP Server

How you use it

A daily loop. Use the slash commands, or just ask in plain language:

  1. Morning: today or "How am I today?" → suggests the type of session and why.

  2. Plan: plan or "Give me 5×3' in Z4 for tonight" → the workout goes on your Garmin calendar and the watch guides each step.

  3. After training: log or "Felt heavy, RPE 8" → analyses the session and saves your feedback.

  4. Sunday: week or "Review my week and plan the next one" → review, then next week's sessions go on the watch after your OK.

Start with start: it checks your data and records your goal ("half marathon on 12 April, 4 days a week, max 1h on weekdays"), so the advice follows your training phase.

Quick start

You need uv, a Garmin Connect account with an email and password, and an MCP client such as Claude Desktop or Claude Code.

# 1. Log in once: email, password and MFA code if enabled. Only tokens are saved, never the password.
uvx --from git+https://github.com/danielerpl/selfcoach-mcp selfcoach-mcp login

# 2. First download: 6 months of history, takes a few minutes.
uvx --from git+https://github.com/danielerpl/selfcoach-mcp selfcoach-mcp sync --days 180

# 3. Connect it to Claude Code…
claude mcp add selfcoach -s user -- uvx --from git+https://github.com/danielerpl/selfcoach-mcp selfcoach-mcp

…or to Claude Desktop (Settings → Developer → Edit Config), using the full path that which uvx prints:

{
  "mcpServers": {
    "selfcoach": {
      "command": "/Users/you/.local/bin/uvx",
      "args": ["--from", "git+https://github.com/danielerpl/selfcoach-mcp", "selfcoach-mcp"]
    }
  }
}

Open a new session (servers are loaded at start-up), type / and run the start command, or just ask: "How am I today?"

The setup guide explains everything in detail. It covers how the Garmin connection works, MFA, Google/Apple accounts, what data is downloaded and where it goes, other clients, running from a clone, and troubleshooting.

Commands

Ready-made routines, shipped as MCP prompts. Your client lists them as slash commands: in Claude Code type / and look for /mcp__selfcoach__today etc.; in Claude Desktop they are in the + menu under selfcoach. Arguments are optional.

Command

When

What it does

start

first time

Checks your data, asks for your goal and constraints, explains the routine

today

every morning

Readiness suggestion + one session that fits it, sent to the watch if you agree

plan [request] [day]

any time

Builds one structured workout, shows a preview, schedules it after your OK

log [notes]

after training

Analyses the latest session and saves RPE and feelings

week [week_of]

Sunday

Reviews the week and plans the next one, day by day, on your watch

progress [weeks]

every few weeks

Are you improving? Fitness, fatigue, consistency, what to change

goal [description]

when it changes

Sets the target event and constraints → training phase

coach_report [week_of]

if you have a coach

Weekly report ready to paste into a message

Commands reply in your language. To force one, set SELFCOACH_LANGUAGE (e.g. Italian).

Tools

The building blocks the commands (and free-form questions) use:

Tool

What it's for

today_status

Daily start: readiness-based suggestion (rest/easy/moderate/hard) with the reasons, goal phase, today's plan

schedule_workout

Build a structured workout and send it to the Garmin calendar and watch (preview=True to check first)

remove_workout

Remove a workout this server scheduled (coach workouts are protected)

plan_vs_done

The week: planned vs executed, adherence, load, Z4+Z5, unplanned sessions

analyze_session

One session: HR zones, laps with cardiac drift, strength sets, comparison with the plan, RPE check

trends

1–52 week table plus insights (intensity mix, monotony/strain, ramp, rest days, resting-HR drift)

weekly_review

Weekly review to plan the next week; for_coach=True formats it as a report for a coach

set_goal

Target event, constraints (days, hours, equipment, injuries) → phase-aware advice

add_note

Journal: RPE 1–10, feelings, pain, conditions

list_activities

Recent activities with ids, filterable by sport

chart_data

Compact JSON for charts and visual reports

sync_garmin

Backfill up to 2 years or force a refresh

The suggestions are rules of thumb built from your watch's data. They are training guidance, not medical advice.

Configuration

All optional, set as environment variables (in Claude Desktop add an "env": {…} block next to "args").

Variable

Default

Meaning

SELFCOACH_HOME

~/.selfcoach

Where tokens and the database live

SELFCOACH_TOKENS

$SELFCOACH_HOME/tokens

Token directory

SELFCOACH_DB_URL

sqlite:///$SELFCOACH_HOME/garmin.db

Any SQLAlchemy URL; Postgres needs the postgres extra

SELFCOACH_AUTO_SYNC_MINUTES

30

Re-sync recent days when data is older than this

SELFCOACH_INITIAL_SYNC_DAYS

60

History downloaded on first use if you skipped sync

SELFCOACH_ALLOW_WRITE

1

0 = read-only: never write to Garmin Connect

SELFCOACH_CHINA

0

1 for accounts on garmin.cn

SELFCOACH_LANGUAGE

(empty)

Language for the slash commands, e.g. Italian; empty = the language you write in

Privacy

  • Your Garmin password is never stored. Only OAuth tokens are kept, in ~/.selfcoach/tokens with 0700/0600 permissions.

  • Data is stored only on your machine, in a SQLite file. The server talks to nobody but Garmin.

  • Whatever a tool returns is read by the AI model of your MCP client (e.g. Anthropic for Claude), like anything else you paste into a chat.

  • The server writes to your Garmin account only through schedule_workout and remove_workout, and the system prompt asks the model to get your consent first. Set SELFCOACH_ALLOW_WRITE=0 to rule it out entirely.

Development

git clone https://github.com/danielerpl/selfcoach-mcp && cd selfcoach-mcp
uv sync
uv run pytest            # tests use synthetic data, no Garmin account needed
uv run selfcoach-mcp check  # with your own account

Code map: sync.py (Garmin → database), analysis.py (all Markdown summaries and insights), workouts.py (structured workout builder), server.py (MCP tools), cli.py (commands).

Contributions are welcome, especially insights for more sports and testing on more watch models.

Disclaimer

This project is not affiliated with, endorsed by or connected to Garmin Ltd. "Garmin" and "Garmin Connect" are trademarks of Garmin Ltd. or its subsidiaries. The software uses an unofficial interface that may stop working, and automated access may conflict with Garmin's terms of use. Excessive requests can get your account temporarily rate-limited. Training suggestions are generated from heuristics and are not medical advice. Consult a professional for pain, illness or before starting a new training programme.

License

MIT

Available Tools

12 tools
add_noteB

Save a note in the training journal: perceived effort rpe (1-10), feelings, pain, sleep, conditions. Linked to the day's activity when there is only one. Notes appear in analyze_session, trends and weekly_review. Stored locally only.

Inputs: text (required), day, rpe, tags, +1 more. Returns: result

analyze_sessionA
Read-only

Deep dive into one activity (by id, else the latest on day, else the latest overall): HR zones, per-lap table with cardiac drift, strength exercises with sets/reps/load, comparison with the planned workout, athlete notes and an RPE vs heart-rate consistency check.

Inputs: day, activity_id. Returns: result

chart_dataA
Read-only

Compact JSON for charts and visual reports: daily metrics (resting HR with rhr_reliable false when no sleep was recorded, readiness, Body Battery, acute/chronic load, stress, VO2max), activities with HR zones and strength sets, planned workouts matched to what was done, notes and goals. Defaults to the last 28 days. Dates are YYYY-MM-DD.

Inputs: end, start. Returns: result

list_activitiesB
Read-only

Activities of the last days days with id, optionally filtered by sport (e.g. 'running', 'strength', 'cycling', 'moto').

Inputs: days, sport. Returns: result

plan_vs_doneA
Read-only

Planned vs executed for the Monday-Sunday week containing week_of (YYYY-MM-DD, default this week): each planned workout (source self, AI plan or coach) marked done/missed/upcoming with duration, HR, Z4+Z5 minutes and sets, plus unplanned sessions, adherence % and weekly load. Shows the calendar item id needed by remove_workout.

Inputs: week_of. Returns: result

remove_workoutA
Destructive

Remove from the Garmin calendar a workout that this server scheduled (ids are in plan_vs_done). Workouts from a coach or other apps are never removed. Only call after the athlete agreed.

Inputs: calendar_item_id (required). Returns: result

schedule_workoutA

Create a structured workout and put it on the Garmin Connect calendar for day (YYYY-MM-DD). It syncs to the watch, which then guides each step. Only call after the athlete agreed; use preview=True to show it without sending.

`sport`: running, cycling, strength, cardio, hiit, walking, hiking, yoga,
mobility, swimming or other (use other/cardio for sports Garmin has no workout
type for, e.g. motocross).

`steps` is a list of objects:
- timed/distance step: {"type": "warmup"|"interval"|"recovery"|"rest"|"cooldown",
  one of "minutes" | "seconds" | "km" | "meters" (omit for 'press lap to continue'),
  optional target: "hr_zone" (1-5) | "hr_bpm" [low, high] | "power_zone" |
  "watts" [low, high] | "pace_per_km" ["5:40", "5:20"] | "cadence" [low, high],
  optional "note"}
- repeat: {"type": "repeat", "times": 5, "steps": [...]}
- strength exercise: {"type": "exercise", "name": "Barbell Back Squat",
  "sets": 4, "reps": 8 (or "seconds": 45 for holds), "kg": 60,
  "rest_seconds": 90, "note": "..."}. Names must match Garmin's exercise catalog;
  an unknown name returns the closest matches.

Example (intervals): [{"type":"warmup","minutes":15,"hr_zone":2},
{"type":"repeat","times":5,"steps":[{"type":"interval","minutes":3,"hr_zone":4},
{"type":"recovery","minutes":2,"hr_zone":1}]},{"type":"cooldown","minutes":10}]

Inputs: day (required), name (required), sport (required), steps (required), +2 more. Returns: result

set_goalA

Record the athlete's goal so advice follows a training phase (base, build, peak, taper, race week). title e.g. 'Half marathon under 1h45'; event_date YYYY-MM-DD if there is a target event; details for constraints such as available days, hours per week, equipment, injuries. clear=True removes previous goals (combine with a title to replace them). Stored locally only.

Inputs: clear, sport, title, details, +1 more. Returns: result

sync_garminA

Download the last days days from Garmin Connect (activities, calendar, daily metrics). Tools already auto-sync recent days; use this for a deeper backfill (up to 730 days) or with force=True to refresh days already stored.

Inputs: days, force. Returns: result

today_statusA
Read-only

Start here every day. Suggests what kind of session suits today (rest / easy / moderate / hard) with the reasons, from resting HR vs 4-week baseline, Training Readiness, Body Battery, acute/chronic load, HRV, sleep, recent hard sessions and days without rest. Also shows the goal and training phase, today's planned workout and the last 3 days. day is YYYY-MM-DD (default today).

Inputs: day. Returns: result

weekly_reviewA
Read-only

Weekly review for the week containing week_of: goal and phase, plan adherence, sessions, 4-week trends with insights and athlete notes. Use it to plan next week. With for_coach=True it is formatted as a report to send to a human coach (includes the athlete's name).

Inputs: week_of, for_coach. Returns: result

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    A3.9/5.0

    Scored across 12 tools

    Disambiguation4/5

    Most tools target clearly distinct actions or resources: sync, daily status, weekly review, trends, session analysis, scheduling, notes, and goals. A few reporting tools (chart_data, trends, weekly_review, plan_vs_done) surface overlapping training data, but their descriptions distinguish formats and use cases.

    Naming Consistency4/5

    All names use snake_case and are readable. Most are verb_noun (sync_garmin, analyze_session, list_activities, add_note, set_goal, schedule_workout, remove_workout), but several are noun phrases (today_status, plan_vs_done, trends, weekly_review, chart_data), so the convention is not fully predictable.

    Tool Count5/5

    The 12 tools are well-scoped for a self-coaching server covering sync, analysis, planning, review, notes, goals, and workout scheduling. Each tool appears to earn its place without excessive surface area.

    Completeness4/5

    The surface covers the core lifecycle: data sync, activity analysis, trends, weekly review, planning, workout scheduling/removal, notes, and goals. Minor gaps exist, such as no update/edit operation for scheduled workouts and no update/delete for notes, though remove-and-recreate workarounds are available.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables MCP clients to read and update Garmin Connect data, including activities, health metrics, training status, and more, with per-account multi-tenant authentication.
      3
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      Connects to Garmin Connect and exposes fitness and health data to MCP-compatible clients, enabling activity management, health metrics, training and performance analytics, workout creation/scheduling, gear, nutrition, and related data access.
      MIT
    • A
      license
      A
      quality
      B
      maintenance
      Enables an MCP client to read and write a personal Garmin Connect account: activities with per-set strength detail, daily health metrics (sleep, HRV, stress, steps, readiness), planned and completed workouts, and weigh-ins with body composition. It also logs finished strength sessions and body-composition readings as FIT files so they appear in Garmin Connect like natively recorded ones.
      38
      2
      MIT
    • A
      license
      A
      quality
      B
      maintenance
      Enables MCP clients to read Garmin training and health data and manage structured workouts on a Garmin account, including creating, updating, scheduling, and deleting them.
      14
      MIT