Splitline Garmin MCP
Stages, previews, pushes, updates in place, reschedules and removes structured Running, Cycling, Swimming and Strength workouts on the user's Garmin Connect calendar so they sync to the watch. Also lists saved workout templates, fetches full step details for a workout, lists calendar items (including adaptive Garmin Coach workouts) in a date range, searches Garmin's bundled strength exercise catalog for valid exercise names, and unschedules individual calendar entries or deletes managed plans — all backed by a local ledger of Garmin template/schedule IDs and a configurable write ceiling (full push vs. staged-only).
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
Splitline Garmin MCP
Self-hosted Garmin Connect workout and training-plan MCP server and setup Web UI built on python-garminconnect, designed as a companion to Splitline.
Splitline MCP (read-only) handles your historical activities, PMC training load (CTL/ATL/TSB/ACWR), HRV/sleep trends, aerobic decoupling, HR zones, and best efforts via Garmin's official Personal API.
Splitline Garmin MCP (this repo) stages, previews, pushes, updates, and removes structured Running, Cycling, Swimming, and Strength workouts on your Garmin Connect calendar so they sync to your watch.
Personal-use disclaimer: Uses
python-garminconnectagainst Garmin Connect's unofficial mobile/web endpoints for your own personal account. Not affiliated with or endorsed by Garmin Ltd.
Features
Single container, one port (
8081), one/datavolume:/: Setup Web UI (offline-first with bundled fonts, zero third-party browser requests) for Garmin sign-in with MFA, VPS token import, MCP Bearer token management, client snippets, and plan review./mcp: Streamable HTTP MCP endpoint (fails closed401without Bearer token; validatesHost,Origin, CORS preflights, and per-IP rate limits)./health: Minimal liveness endpoint ({"status": "ok"}).garmin-mcp stdio: Local ordocker execstdio MCP transport sharing/data.
Configurable write control:
GARMIN_WRITE_MODE=enabled(default): AI stages plans withstage-planfor preview and conflict checks, then syncs withpush-plan(plan_id)after approval. Can be switched to Staged Only in the Web UI at any time.GARMIN_WRITE_MODE=staged_only: Hard server-side ceiling. MCP can read and stage plans, while pushing to Garmin requires clicking Push in the Web UI. Unrecognized values fail closed tostaged_only.
Local plan ledger (SQLite WAL): Tracks Garmin template and schedule IDs per account so revisions update modified workouts in place (
PUT), reschedule moved dates, skip unchanged sessions, checkpoint partial failures safely, and remove dropped workouts without hitting Garmin's 500-template library cap.Supported sports:
Running: pace (
min/km), HR zone or custom bpm, cadence, distance/time/lap-button steps, repeats,skip_last_rest.Cycling: power zones or custom watts with optional cadence secondary target, speed, HR.
Swimming: pool length,
min/100mpace, andswim_css_offset_sec(mapped to Garmin's secondary CSS offset target).Strength: rep-based and timed sets, target weight in kg, and search/validation across Garmin's bundled strength exercise catalog.
Related MCP server: wearable-mcp
Quick Start (Docker Compose)
curl -fsSLO https://raw.githubusercontent.com/splitline-php/garmin-mcp/main/compose.yaml
curl -fsSLO https://raw.githubusercontent.com/splitline-php/garmin-mcp/main/.env.example
cp .env.example .env
docker compose up -dTo build locally from a cloned checkout:
docker compose -f compose.yaml -f compose.local.yaml up -d --buildOpen
http://localhost:8081.Sign in to Garmin Connect (including your 6-digit MFA code if prompted). Your password is never stored; auto-refreshing OAuth tokens are saved to
/data/garmin_tokens/garmin_tokens.json(0600).Click Generate Token in the MCP Server card and copy the OpenCode, Claude Code, Cursor, or VS Code snippet.
Importing Tokens on a Cloud VPS
If Cloudflare rate-limits login from a cloud VPS IP, sign in once on your laptop (nothing is left on disk unless DATA_DIR is set) and paste the printed JSON into the Import Tokens (VPS) tab:
uvx --from "git+https://github.com/splitline-php/garmin-mcp@v0.1.0" garmin-mcp login --exportPairing with Splitline (opencode.json)
{
"mcp": {
"splitline": {
"type": "remote",
"url": "http://localhost:8080/mcp",
"headers": {
"Authorization": "Bearer <SPLITLINE_MCP_TOKEN>"
},
"oauth": false
},
"garmin": {
"type": "remote",
"url": "http://localhost:8081/mcp",
"headers": {
"Authorization": "Bearer <GARMIN_MCP_TOKEN>"
},
"oauth": false
}
}
}MCP Tools
Tool | Purpose |
| Garmin auth state, write mode, library template count (vs 500 ceiling), and tracked plans. |
| List saved Garmin Connect workout templates (optional sport filter). |
| Fetch full step details for one workout by |
| Calendar items in a date range, including adaptive Garmin Coach workouts. |
| Search Garmin's strength exercise catalog for valid names and category/exercise pairs. |
| Validate, compile, check conflicts, save a new draft locally, and return preview and review URL. |
| Revise an existing plan by |
| Sync a staged plan to Garmin Connect (create, update in place, reschedule, delete dropped sessions). |
| Preview ( |
| Preview ( |
Environment Variables
Variable | Default | Description |
|
| External URL of this Web UI and |
|
| Splitline URL used to prefill the combined OpenCode snippet. |
|
| Fallback IANA timezone for date checks (Garmin profile timezone is preferred when connected). |
|
| Bind host and port ( |
|
| Persistent directory for |
|
| Hard write ceiling ( |
|
| Minimum delay in ms between Garmin write calls. |
|
| Warning and hard-stop workout template thresholds. |
|
| In-memory lifetime of a pending MFA challenge. |
|
| Hard ceilings for stdio and HTTP |
| (empty) | Optional static Bearer token (32+ chars recommended; locks UI rotation). |
| (empty) | Comma-separated trusted browser origins (never use |
|
| Per-IP requests per minute on |
| (empty) | Reverse-proxy IPs/CIDRs trusted for |
|
| Mark CSRF/flash/MFA cookies |
Local Development
uv sync --locked
uv run ruff check src tests
uv run mypy src tests
uv run pytest -v
uv run garmin-mcp serveSecurity
See SECURITY.md for deployment isolation, reverse-proxy forward-auth configuration, CSRF/Host protections, and MCP Bearer token handling.
License
Licensed under the MIT License.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
AI coach for Garmin: builds training plans and structured workouts, synced straight to your watch.
Garmin watch data for AI assistants: activities, sleep, HRV, recovery. Never writes to Garmin.
Your training data in Claude, ChatGPT and any MCP client. Shape syncs workouts, sleep, HRV and daily health from Garmin (official partner API), Apple Health, Wahoo, Polar and more. It works out fitness, fatigue, form and readiness, and sends structured workouts to your Garmin, Apple Watch or Wahoo. Hosted, signs in with OAuth, no passwords in config files.
Build structured workouts and training plans with AI and send them to Apple Watch.
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceEnables 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.1MIT
- AlicenseNot gradedqualityBmaintenanceEnables an AI agent to read Garmin sleep, readiness and activity data, build an athlete profile, check proposed sessions against code-enforced limits and real calendar availability, and then push approved structured workouts to a Garmin watch. Plans are proposed and stored under a plan ID, so only explicitly approved sessions are ever written.MIT
- AlicenseAqualityCmaintenanceEnables AI clients to preview, search, read, create, update, schedule, and unschedule Garmin Connect workouts using a local Garmin session, with guarded writes and a limited tool set. Supports running, cycling, cardio, and strength workouts without exposing generic API, filesystem, or shell access.5MIT
- AlicenseNot gradedqualityCmaintenanceEnables users to turn structured training plans into Garmin Connect workouts, schedule them, queue delivery to registered devices, and optionally coordinate timed Google Calendar events with workout summaries.MIT